Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156212 张蔚林 哪几扇门是打开的 C++ Compile Error 0 MS 0 KB 271 2026-06-27 11:14:38

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int t[100]={0}; for(int i=2;i<=100;i++){ for(int j=1;j<=100;i++){ if(j%i==0){ a[j]=!a[j]; } } } for(int y=1;i<=100;i++){ if(a[i]==0){ cout<<i<<' '; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:8: error: 'a' was not declared in this scope
        a[j]=!a[j];
        ^
Main.cc:12:14: error: 'i' was not declared in this scope
  for(int y=1;i<=100;i++){
              ^
Main.cc:13:6: error: 'a' was not declared in this scope
   if(a[i]==0){
      ^
Main.cc:12:10: warning: unused variable 'y' [-Wunused-variable]
  for(int y=1;i<=100;i++){
          ^
Main.cc:4:6: warning: unused variable 't' [-Wunused-variable]
  int t[100]={0};
      ^