Run ID:93130

提交时间:2024-10-11 15:18:45

#include<bits/stdc++.h> using namespace std; int a[31]; int main(){ queue<int>q; int s=0; for(int i=1;i<=30;i++){ q.push(i); } while(q.empty()==false){ for(int i=1;i<9;i++){ q.push(q.front()); q.pop(); } s++; q.pop(); if(s==15) break; } while(q.empty()==false){ a[q.front()]=1; q.pop(); } for(int i=1;i<=30;i++){ if(a[i]==1) cout<<i<<" "; } return 0; }