| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 76686 | 张誉腾 | 猴子选大王 | C++ | Wrong Answer | 0 MS | 276 KB | 366 | 2024-06-02 16:34:54 |
#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a[n+1]= {0}; int sr=0; int ren=0,bao=0; while(sr!=n-1) { ren++; if(ren>n) { ren=0; } if(a[ren]==0) { bao++; if(bao==m) { a[ren]=0; bao=0; sr++; } } } for(int i=0;i<=n;i++){ if(a[n]==0){ cout<<a[n]; } } }
------Input------
226 188
------Answer-----
15
------Your output-----
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000