死到临头发现还不会对拍
C++随机数生成:↓


1 #include<bits/stdc++.h> 2 3 using namespace std; 4 5 int main() { 6 srand((unsigned)time(NULL)); 7 cout << rand() << " "; // <=32767 8 cout << (rand() << 15 | rand()) << " "; 9 return 0; 10 }
死到临头发现还不会对拍
C++随机数生成:↓
1 #include<bits/stdc++.h> 2 3 using namespace std; 4 5 int main() { 6 srand((unsigned)time(NULL)); 7 cout << rand() << " "; // <=32767 8 cout << (rand() << 15 | rand()) << " "; 9 return 0; 10 }
转载于:https://www.cnblogs.com/m-m-m/p/8723472.html