반응형
# 그냥 말 그대로 브루트포스로 푼 풀이
import sys
input = sys.stdin.readline
e,s,m = map(int,input().split())
x,y,z = 0, 0, 0
result = 0
while True:
x, y, z = x+1, y+1, z+1
if x%16 == 0: x = 1
if y%29 == 0: y = 1
if z%20 == 0: z = 1
result += 1
if e==x and s==y and m==z: break
print(result)
'알고리즘' 카테고리의 다른 글
[백준, 2748번] 피보나치 수 2 (0) | 2023.07.29 |
---|---|
[백준, 2747번] 피보나치 수 (0) | 2023.07.29 |
[백준, 2501번] 약수 구하기 (0) | 2023.07.28 |
[백준, 14502번] 연구소 (0) | 2023.07.28 |
[백준, 14501번] 퇴사 (0) | 2023.07.27 |