| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77086 | 邓嘉懿 | 19灯的编号 | C++ | Accepted | 1 MS | 288 KB | 371 | 2024-06-08 12:01:46 |
#include <bits/stdc++.h> using namespace std; int main () { int n,m; cin>>n>>m; int d[5001]= {0}; for(int i=1; i<=m; i++) { for(int j=1; j<=n; j++) { if(j%i==0) { d[j]++; } } } int f=0; for(int j=1; j<=n; j++) { if(d[j]%2==1&&f==0) { cout<<j; f=1; } else if(d[j]%2==1&&f!=0) { cout<<","<<j; } } return 0; }