WuXingRui_wxr @ 2020-04-11 12:22:17
#include<bits/stdc++.h>
using namespace std;
bool judge_Leap_year(int n){
if((n%10==0&&n/10%10==0)&&(n%400==0)) return true;
if(n%4==0) return true;
return false;
}
int main(){
int n,m; cin>>m>>n;
for(int i=m;i<=n;i++) if(judge_Leap_year(i)) cout<<i<<" ";
return 0;
}
by 老子是北瓜 @ 2020-04-11 12:49:41
n%100==0 不好吗
by WuXingRui_wxr @ 2020-04-11 12:53:02
AC了,感谢大佬。 @老子是白菜 @limaopipi2022