| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 143662 | 马俊潇 | [在线测评解答教程] 闰年 | C++ | Compile Error | 0 MS | 0 KB | 275 | 2026-01-17 14:32:01 |
#include<iostream> using namespace std; int main(){ int t,a[10]={}; cin>>t; for(int i=1;i<=t;i++){ cin>>a[t]; if(a[t]%4==0&&a[t]!=0||a[t]%400==0){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl;}} return 0;
Main.cc: In function 'int main()':
Main.cc:8:19: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(a[t]%4==0&&a[t]!=0||a[t]%400==0){
^
Main.cc:17:9: error: expected '}' at end of input
return 0;
^