Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
38487 姜皓轩 狐狸吃兔子 C++ Accepted 1 MS 260 KB 293 2022-09-11 12:01:03

Tests(1/1):


Code:

#include<iostream> using namespace std; int main() { bool a[105]={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; }