#include <bits/stdc++.h> using namespace std; string s[100]; int main () { srand(time(NULL)); int n; while (1) { cin>>n; for (int i=1;i<=n;i++) { cout<<s[rand()%53+1]<<' '; } cout<<"\n"; } }
以上代码是一个类似点名系统,但这个代码本地运行好像直接炸了,蒟蒻不了解随机数,求大佬指点