Run ID:67109
提交时间:2024-03-13 22:13:29
#include<bits/stdc++.h> using namespace std; bool is_leap(int ye){ if(ye%4==0&&ye%100!=0||ye%400==0){ return true; } return false; } int main(){ int x,y,c=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(is_leap(i)) c++; } cout << c; return 0; }