- C++
怎么编写随机数
- 2024-8-19 13:01:26 @
怎么编写随机数
6 条评论
-
大眼仔Happy LV 1 @ 2024-9-26 9:12:30
-
2024-9-21 17:38:09@
#include<bits/stdc++.h> using namespcae std; int main() { int x=rand(); return 0; }
-
2024-9-16 20:50:18@
#include<cstdio> #include<random> int main(){ std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(33, 126); printf("%c",dis(gen)); return 0; }
-
2024-8-25 11:17:04@
HAHA
的确“万能”
-
2024-8-25 11:05:46@
e……
#include <bits/stdc++.h> using namespace std; int main() { for (long long i=1;;i++) { srand(time(0)); long long x=rand(); cout << x*i; } return 0; }
-
2024-8-19 13:02:35@
C++
srand(time(0)); int x=rand(); cout<<x;
就懒得写头文件了
- 1