| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 41583 | Xiyou | 报数模拟 | C++ | Accepted | 0 MS | 252 KB | 355 | 2024-02-21 19:33:58 |
#include<bits/stdc++.h> using namespace std; int main(){ bool a[605]; int n,j=0,k; cin>>n; k=n; for(int i=1;i<=n;i++){ a[i]=true; } while(true){ for(int i=1;i<=n;i++){ if(a[i]){ j++; if(j%3==0){ a[i]=false; j=0; k--; if(k==0){ cout<<i; return 0; } } } } } }