| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80983 | 石晋骁 | 19灯的编号 | C++ | Accepted | 1 MS | 280 KB | 379 | 2024-07-11 17:18:28 |
#include<bits/stdc++.h> using namespace std; int arr[5001]; 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(arr[j]==0){ arr[j]=1; }else{ arr[j]=0; } } } } cout << "1"; for(int k =2;k<=n;k++){ if(arr[k] == 1){ cout << "," << k; } } return 0; }