| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140754 | 谭思宸 | 环形密码 | C++ | Compile Error | 0 MS | 0 KB | 351 | 2025-12-20 12:00:08 |
#include<iostream> using namespace std; int main(){ int a[31]={0}; int n,m; cin >> n >> m; for(int i=1;i<=n;i++) while(cnt<n){ if(a[i]==0){ t++; if(t==m){ cnt++; cout<<i<<" "; a[i]=1; t=0; } } i++; if(i>n){ i=1; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:8:11: error: 'cnt' was not declared in this scope
while(cnt