Run ID:38485

提交时间: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; }