Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
32706 于俊杰 报数模拟 C++ Accepted 4 MS 736 KB 343 2022-07-26 12:07:27

Tests(4/4):


Code:

#include<iostream> using namespace std; int main(){ int n,t=0,s=0; bool f[605]={0}; cin>>n; for(int i=1;;i++){ if(i==n+1) i=1; if(!f[i]){ t++; if(t==3){ f[i]=1; s++; t=0; if(s==n){ cout<<i; break; } } } } for(int i=1;i<=n;i++) if(!f[i]) cout<<i; return 0; }