http://codeup.kr/problem.php?id=1214
Codeup 1214 - 이 달은 며칠까지 있을까?
xxxxxxxxxxyear, month = input().split()year = int(year)month = int(month)february = 0if(((year % 4 == 0) and (year % 100 != 0)) or (year % 400 == 0)): february = 29else: february = 28if(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')
'알고리즘 문제 풀기 > Codeup' 카테고리의 다른 글
| Codeup 1218 - 삼각형 판단하기 (0) | 2018.12.29 |
|---|---|
| Codeup 1216 - 컨설팅 회사 (0) | 2018.12.29 |
| Codeup 1212 - 삼각형의 성립 조건 (0) | 2018.12.28 |
| Codeup 1210 - 칼로리 계산하기 (0) | 2018.12.28 |
| Codeup 1207 - 윷놀이 (0) | 2018.12.28 |