Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3124 莫业祁 闰年的数量 C++ Wrong Answer 0 MS 256 KB 336 2024-04-05 19:27:03

Tests(0/10):


Code:

# include<iostream> using namespace std; bool Leap_year_judgment(int x){ if(x%400==0||x%100!=0&&x%4==0) return 0; else return 1; } int main(){ int n,m; cin>>n>>m; int sum=0; for(int i=n;i<=m;i++){ if(Leap_year_judgment(i)==0) n++; } cout<<n; return 0; }


Run Info:

------Input------
507 2591
------Answer-----
506
------Your output-----
1013