| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80985 | 揭伟琦 | 19灯的编号 | C++ | Accepted | 1 MS | 280 KB | 514 | 2024-07-11 17:21:17 |
# include<iostream> using namespace std; int ar[5001]; int main(){ int n,m; cin >>n>>m; for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ if(j%i==0){ if(ar[j]==0){ ar[j]=1; } else{ ar[j]=0; } } } } cout <<1; for(int j=2;j<=n;j++){ if(ar[j]==1){ cout <<","<<j; } } return 0; }