Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
39385 | yuzhengxun | 开关灯 | C++ | 编译错误 | 0 MS | 0 KB | 388 | 2024-02-01 14:32:39 |
#include<bits/stdc++.h> using namespace std; int a[5005]; 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){ a[j]=!a[j]; } } } int b[5005]={}; int s=0; for(int i=1;i<=n;i++){ if(a[i]==1){ if(b[s])=i{ s++; } } } for(int i=0;i<=s-2;i++){ cout<<b[i]<<","; } cout<<b[s-1]; return 0; }