| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 73163 | sh25_wangsj | 开关灯 | C++ | Wrong Answer | 0 MS | 248 KB | 739 | 2025-11-07 14:36:24 |
#include <iostream> #include <cstring> using namespace std; int main() { int N, M,x; cin >> N >> M; bool lt[666]; for(int i=1;i<=N;i++){ lt[i]=false; } for(int j=1;j<=M;j++){ x=1; while(x<=N){ if(x%j==0){ if(lt[x]=false){ lt[x]=true; }else{ lt[x]=false; } } x=x+1; } } for(int y=1;y<=N;y++){ if(lt[y]==true){ if(y!=1){ cout<<","<<y; }else{ cout<<y; } } } return 0; }