| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 42203 | jiabokai | 选猴王 | C++ | Wrong Answer | 1 MS | 240 KB | 335 | 2024-02-24 12:09:28 |
#include<bits/stdc++.h> using namespace std; int main() { int n,m,p=0,cnt=0,i=0; while(cin>>n>>m&&n&&m){ bool s[300]={true}; while(cnt>0){ p++; if(p==m){ cnt--; s[i]=false; } i++; i%=n; } for(int i=0;i<n;i++){ if(s[i]==true){ cout<<i+1<<endl; } } } return 0; }