BOJ - 1145 - 적어도 대부분의 배수

Updated:

def solution():
    data = list(map(int, input().split()))
    N = min(data)

    while True:
        
        cnt = 0

        for i in range(5):
            
            if N % data[i] == 0:
                cnt += 1

        if cnt > 2:
            print(N)
            break

        N += 1

solution()

https://www.acmicpc.net/problem/1145

Categories:

Updated:

Leave a comment