Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61861 张江鹏 19灯的编号 C++ Compile Error 0 MS 0 KB 368 2023-12-10 17:59:58

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:4: error: expected ';' before '}' token
    }
    ^
Main.cc:16:20: error: 'suo' was not declared in this scope
   if(deng[j]%2==1&&suo==1){
                    ^
Main.cc:14:6: warning: unused variable 's' [-Wunused-variable]
  int s=0;
      ^