반응형
1476 날짜 계산 (실버 V)
earth, sun, moon = map(int, input().split())
e, s, m = 1, 1, 1
year = 1
while True:
if earth == e and sun == s and moon == m:
break
year += 1
e += 1
s += 1
m += 1
if e == 16:
e = 1
if s == 29:
s = 1
if m == 20:
m = 1
print(year)
'Baekjoon' 카테고리의 다른 글
[Baekjoon] 10815 숫자 카드 (실버 V) - Python (1) | 2023.11.26 |
---|---|
[Baekjoon] 9012 - 괄호 with Python (0) | 2023.07.20 |
[Baekjoon] 1914번 하노이탑(Silver I) with Python (0) | 2023.05.24 |
[Baekjoon] 9663번 N-Queen(Gold-IV) (0) | 2023.05.23 |
[Baekjoon] 단계별로 풀어보기 2. 조건문 with Python (0) | 2023.04.28 |