bird_秒切橙题 @ 2020-05-27 20:07:11
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
long long x,y,s=0,a[1001];
cin>>x>>y;
long long i;
for(i=x;i<=y;i++)
{
if(i%4==0&&i%100!=0)
{
s+=1;
a[i]=i;
}
else if(i%100==0&&i%400==0)
{
s+=1;
a[i]=i;
}
else
{
continue;
}
}
cout<<s<<"\n";
for(i=x;i<=y;i++)
{
cout<<a[i]<<" ";
}
}
by k3v1n070828 @ 2020-05-27 20:08:21
评测记录?
by critnos @ 2020-05-27 20:08:26
就交了一次就来求助吗,,ssd
by asasas @ 2020-05-27 20:08:39
红题。。。
by k3v1n070828 @ 2020-05-27 20:09:04
建议弄一个判断闰年的函数
by kjy_ttcl @ 2020-05-27 20:09:36
ssd,jbl
by bird_秒切橙题 @ 2020-05-27 20:10:11
@kjy_tdcl 咋了提个问不行吗
by FZzzz @ 2020-05-27 20:10:30
不懂,为什么求助帖是ssd
by liqingyang @ 2020-05-27 20:10:33
@small_bird 狼来了
by k3v1n070828 @ 2020-05-27 20:10:45
话说那个
else
{
continue;
}
有用吗?
by critnos @ 2020-05-27 20:10:45
这个过不了样例吧