Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7296 刘芃伽 08有几个闰年 C++ Compile Error 0 MS 0 KB 268 2025-04-18 23:45:42

Tests(0/0):


Code:

# include<iostream> using namespace std; int main() { int y,z=0; cin>>y; if(y%100==0){ if(y%400==0){ z+1; } else{ if(y%4==0){ z+1; } } cout<<z<<endl; return 0; }


Run Info:

Main.cc:5:5: error: stray '\357' in program
     int y,z=0;
     ^
Main.cc:5:5: error: stray '\274' in program
Main.cc:5:5: error: stray '\214' in program
Main.cc: In function 'int main()':
Main.cc:5:13: error: expected initializer before 'z'
     int y,z=0;
             ^
Main.cc:6:10: error: 'y' was not declared in this scope
     cin>>y;
          ^
Main.cc:9:13: error: 'z' was not declared in this scope
             z+1;
             ^
Main.cc:13:13: error: 'z' was not declared in this scope
             z+1;
             ^
Main.cc:16:11: error: 'z' was not declared in this scope
     cout<z<<endl;
           ^
Main.cc:18:1: error: expected '}' at end of input
 }
 ^