Run ID:83956
提交时间:2024-07-15 10:38:00
#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 % 100 == 0 && i % 400 == 0){ c++; }else if(i % 4 == 0){ c++; } } cout << c; } int main(){ int x,y; cin >> x >>y; sum(x,y); return 0; }