#include<bits/stdc++.h>
using namespace std;
bool rn(int s)
{
if(s%4==0||s%100==0||s%400==0)
return true;
else return false;
}
int main()
{
int x,y,i,a[1150],j=1;
cin>>x>>y;
for(i=x;i<=y;i++)
{
if(rn(i))
{
a[j]=i;
j++;
}
}
cout<<j<<endl;
for(i=1;i<=j;i++)
cout<<a[i]<<' ';
return 0;
}
我用的是函数,求帮忙检查问题