Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83991 杜奕辰 闰年的数量 C++ Compile Error 0 MS 0 KB 341 2024-07-15 10:50:15

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; bool m(int a) { if(a%4==0&&a%100!=0||a%400==0) { return true; } else { return false; } } int main() { int x,y,n=0;ac cin>>x>>y; for(int i=x; i<=y; i++) { if(m(i)) { n++; } } cout<<n; return 0; }


Run Info:

Main.cc: In function 'bool m(int)':
Main.cc:4:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(a%4==0&&a%100!=0||a%400==0) {
              ^
Main.cc: In function 'int main()':
Main.cc:11:17: error: 'ac' was not declared in this scope
     int x,y,n=0;ac
                 ^