| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 71747 | sh25_ganzy | 开关灯 | C++ | 解答错误 | 0 MS | 248 KB | 491 | 2025-10-28 10:25:06 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; int off[n]={0}; bool first=true; for(int i=1;i<=m;i++){ for(int j=0;j<n;j++){ if(j%i==0){ off[j]=1-off[j]; } } } for(int i=0;i<n;i++){ if(off[i]==0){ if(first==false){ cout<<","; } cout<<i; first=false; } } return 0; }