Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113648 谭思宸 19灯的编号 C++ Accepted 1 MS 276 KB 377 2025-03-16 11:59:37

Tests(10/10):


Code:

#include<iostream> using namespace std; int main() { int n,m; cin>>n>>m; int a[n+1]={0}; for(int j=1;j<=m;j++){ for(int i=1;i<=n;i++){ if(i%j== 0) { a[i]++; } } } cout<<1; for(int i = 2; i <= n; i++){ if(a[i]%2==1){ cout<<","<< i; } } }