Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61857 段文昊 19灯的编号 C++ Compile Error 0 MS 0 KB 383 2023-12-10 17:56:47

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:17:20: error: expected ';' before ')' token
  for(int j=j<=n;j++){
                    ^