Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
38485 | 朱铮浩 | 狐狸吃兔子 | C++ | Accepted | 2 MS | 264 KB | 290 | 2022-09-11 12:00:08 |
#include<bits/stdc++.h> using namespace std; int main(){ bool a[101]={0}; int n=10,m=1,i,f=0,t=0,s=0; while(f!=1000){ t++; if(t>n)t=1; s++; if(s==m){ s=0; a[t]=1; f++; m++; } } for(int i=1;i<=n;i++){ if(!a[i]) cout<<i<<" "; } return 0; }