| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 58069 | littletwleve | 开关灯 | C++ | Accepted | 0 MS | 252 KB | 343 | 2024-12-03 13:10:48 |
#include<bits/stdc++.h> using namespace std; bool l[5010]; 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) l[j]=!l[j]; } } bool flag=true; for(int i=1;i<=n;i++){ if(l[i]==1){ if(flag==false){ cout<<","; } cout<<i; flag=false; } } return 0; }