Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3125 莫业祁 闰年的数量 C++ Accepted 0 MS 268 KB 327 2024-04-05 19:30:29

Tests(10/10):


Code:

# include<iostream> using namespace std; bool Leap_year_judgment(int x){ if(x%100!=0&&x%4==0||x%400==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) sum++; } cout<<sum; return 0; }