| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 76700 | 何嘉乐 | 猴子选大王 | C++ | Compile Error | 0 MS | 0 KB | 448 | 2024-06-02 16:41:17 |
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; cin>>n>>m; int die[n+1]={0};//一开始所有人都活着设为0 int sr=0; int ren=0,bao=0; while(sr!=n-1){ ren++; if(ren>n){ ren=1; } if(die[ren]==0){ bao++; if(bao==m){ die[ren]=1;// bao=0; sr++; } } } for(int i=1;i<=n;i++){ if(i!=0){ continue; } else{ cout<<i; } } return 0;
Main.cc: In function 'int main()':
Main.cc:36:10: error: expected '}' at end of input
return 0;
^