codingfresher @ 2022-10-04 22:21:21
#include<iostream>
using namespace std;
int main()
{
int begin,end,k;
cin >> begin;
cin >> end;
cout << (end-begin)/4 << endl;
for(k=begin;k>=begin&k<=end;k++)
{
if(k%4==0&k%100!=0||k%400==0)
{
cout << k << "\t";
}
}
return 0;
}
by pengzihao @ 2022-10-04 22:41:37
cout << (end-begin)/4 << endl;
错了