P5737 【深基7.例3】闰年展示(py)
练一下手感
yyq=input()
s=[int(i) for i in yyq.split()]
lmq=[]
hgz=[]
Ai=0
for i in range(0,3001):
lmq.append(0)
for i in range(s[0],s[1]+1):
# print(i,end=' ')
if i%100==0 :
if i%400==0 :
Ai+=1
hgz.append(i)
elif i%4==0 :
Ai+=1
hgz.append(i)
print(Ai)
for i in hgz:
print(i,end=" ")