| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 124524 | 李昊宇 | 19灯的编号 | C++ | Accepted | 2 MS | 280 KB | 432 | 2025-07-11 16:46:33 |
#include<bits/stdc++.h> using namespace std; int a[5000]; int main(){ int n,m; cin>>n>>m; for(int i=1;i<=n;i++){ a[i]=1; } for(int j=1;j<=m;j++){ for(int i=1;i<=n;i++){ if(i%j==0){ a[i] = !a[i]; } } } cout<<1; for(int i=2;i<=n;i++){ if(a[i]==0){ cout<<","<<i; } } return 0; }