| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 124544 | 王金檐 | 19灯的编号 | C++ | Accepted | 1 MS | 280 KB | 374 | 2025-07-11 16:59:38 |
#include <iostream> using namespace std; int a[5001]; int main(){ int n,m; cin>>n>>m; for (int i=1;i<=n;i++){ a[i]=1; } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ if(j%i==0){ if(a[j]==0){ a[j]=1; }else{ a[j]=0; } } } } cout<<1; for(int j=2;j<=n;j++){ if(a[j]==0){ cout<<","<<j; } } return 0; }