Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
90262 hby 闰年的数量 C++ Accepted 0 MS 268 KB 239 2024-09-08 20:38:33

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int rn(int n,int y){ int c=0; for(int i=n;i<=y;i++){ if(i%4==0&&i%100!=0||i%400==0){ c++; } } return c; } int main(){ int n,y; cin>>n>>y; cout<<rn(n,y); return 0; }