黄雯 • 2年前
#include<bits/stdc++.h>
using namespace std;
bool is_leap(int year){
if(year%4==0&&year%100!=0||year%400==0){
return true;
}
return false;
}
int main(){
int x,y,cnt=0;
cin >> x >> y;
for(int i=x;i<=y;i++){
if(is_leap(i)) cnt++;
}
cout << cnt;
return 0;
}
评论:
666666666666666666666
66666
6
6
66
6
66
6666666666 666 6 6 6 6 6 6 66 6 6 6 6 6 6 6 66 66 6 - -- - - ----- - -- - - -- - - - -- -- - - -- -- - - - - - - - - -- ---- - ------- - -- - - - - - - - - -- - - - -- --- - -
------- - - - - - - --- - - - -- -- -- -- - - - - - - - -- - - - - - - - - - -- ----- - -- - - - - - -- ---- - -- -- -- - - - ---- - - - -- - - --