Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83958 石晋骁 闰年的数量 C++ Accepted 3 MS 268 KB 269 2024-07-15 10:40:42

Tests(10/10):


Code:

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