如果是整百年,需要被400整除才是闰年,不是整百年被4整除就是闰年
a = input()
b, c, d = map(int,a.split(' '))
def m(b,c,d):
if c == 1:
print(d)
elif c == 2:
print(d+31)
elif c == 3:
print(d + 31 + 29)
elif c == 4:
print(d+31+29+31)
elif c == 5:
print(d + 31 + 29 + 31 + 30)
elif c == 6:
print(d + 31 + 29 + 31 + 30 + 31)
elif c == 7:
print(d + 31 + 29 + 31 + 30 + 31 + 30)
elif c == 8:
print(d + 31 + 29 + 31 + 30 + 31 + 30 + 31)
elif c == 9:
print(d + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31)
elif c == 10:
print(d + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30)
elif c == 11:
print(d + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31)
elif c == 12:
print(d + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 +30)
def n(b,c,d):
if c == 1:
print(d)
elif c == 2:
print(d+31)
elif c == 3:
print(d + 31 + 28)
elif c == 4:
print(d+31+28+31)
elif c == 5:
print(d + 31 + 28 + 31 + 30)
elif c == 6:
print(d + 31 + 28 + 31 + 30 + 31)
elif c == 7:
print(d + 31 + 28 + 31 + 30 + 31 + 30)
elif c == 8:
print(d + 31 + 28 + 31 + 30 + 31 + 30 + 31)
elif c == 9:
print(d + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31)
elif c == 10:
print(d + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30)
elif c == 11:
print(d + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31)
elif c == 12:
print(d + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 +30)
if b %100 ==0 and b%400 == 0:
m(b, c, d)
elif b%100 != 0 and b%4==0:
m(b,c,d)
else:
n(b,c,d)