알고리즘 문제 풀기/Codeup
Codeup 1214 - 이 달은 며칠까지 있을까
bug_maker
2018. 12. 29. 11:00
http://codeup.kr/problem.php?id=1214
Codeup 1214 - 이 달은 며칠까지 있을까?
xxxxxxxxxx
year, month = input().split()
year = int(year)
month = int(month)
february = 0
if(((year % 4 == 0) and (year % 100 != 0)) or (year % 400 == 0)):
february = 29
else:
february = 28
if(month < 8):
if(month == 2):
print(february)
elif(month % 2 == 0):
print('30')
else:
print('31')
else:
if(month % 2 == 0):
print('31')
else:
print('30')