| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 128794 | 林嘉乐 | 环形密码 | C++ | Compile Error | 0 MS | 0 KB | 367 | 2025-08-19 17:31:29 |
#include<bits/stdc++.h> using namespace std; int main() { int n,m; bool a[31]={0}; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>a[i] } int c=0; int i=0; int p=1; while(c<n){ if(a[p]!=0){ i++; if(i==m){ c++; m=a[p]; cout<<a[p]<<" "; a[p]=0; i=0; } } p++; if(p==n+1)p=1; } cout<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:10:2: error: expected ';' before '}' token } ^