| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155759 | 陈骏睿 | 猴子选大王 | C++ | Compile Error | 0 MS | 0 KB | 610 | 2026-06-13 11:29:20 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ bool a[301]={0}; int n,m,w=0,x=0,b=0; cin>>n>>m; while(x!=n-1){ w++; if(w==n)w=1; if(!a[w])++; if(b==m){ b=0; x++; a[w]=1; } } for(int i=1;i<=n;i++){ if(a[i]==0) cout<<i; } return 0; }
Main.cc: In function 'int main()':
Main.cc:14:22: error: expected primary-expression before ';' token
if(!a[w])++;
^