Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2237 孙浚轩 [在线测评解答教程] 闰年 C++ Compile Error 0 MS 0 KB 256 2023-12-22 23:33:06

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int t,n; cin>>t; for(int i=1;i<=t:i++) { cin>>n; if(n%400==0||n%4==0&&n%100!=0) cout<<Yes; else cout<<No; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:21: error: found ':' in nested-name-specifier, expected '::'
     for(int i=1;i<=t:i++)
                     ^
Main.cc:7:20: error: 't' is not a class, namespace, or enumeration
     for(int i=1;i<=t:i++)
                    ^
Main.cc:7:25: error: expected ';' before ')' token
     for(int i=1;i<=t:i++)
                         ^
Main.cc:10:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         if(n%400==0||n%4==0&&n%100!=0)
                            ^
Main.cc:11:16: error: 'Yes' was not declared in this scope
          cout<<Yes;
                ^
Main.cc:13:19: error: 'No' was not declared in this scope
             cout<<No;
                   ^