| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 131906 | 王丞杰 | 19灯的编号 | C++ | Accepted | 1 MS | 272 KB | 303 | 2025-10-01 17:39:11 |
#include<bits/stdc++.h> using namespace std; bool a[5000]; 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(a[j]==1) a[j]=0; else a[j] = 1; } } } cout<<1; for(int j=2;j<=n;j++){ if(a[j]==1)cout<<","<<j; } }