| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 90605 | 梁敖铭 | 闰年的数量 | C++ | Compile Error | 0 MS | 0 KB | 208 | 2024-09-16 09:35:07 |
#include<iostream> using namespace std; int x,y,s,i; void qww(){ for(i=x;i<=y;i++){ if(i%4==0&&i%100!=0||i%400==0) s++; } cout<<s; int main(){ cin>>x>>y; qww(); return 0; }
Main.cc: In function 'void qww()':
Main.cc:7:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(i%4==0&&i%100!=0||i%400==0)
^
Main.cc:11:11: error: a function-definition is not allowed here before '{' token
int main(){
^
Main.cc:15:1: error: expected '}' at end of input
}
^