-Code
n = int(input())
h_list = list(map(int, input().split()))
tree_h = int(input())
min_tree = 3000
res = 500
for h in h_list:
if min_tree > tree_h % h:
min_tree = tree_h % h
res = h
print(res)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 22524번 koukyoukoukokukikou (0) | 2024.01.21 |
---|---|
[백준/파이썬] 21143번 Magic Trick (0) | 2024.01.20 |
[백준/파이썬] 29823번 Pakirobot Manhattanis (0) | 2024.01.18 |
[백준/파이썬] 31261번 I MADE UP A NUMBER (0) | 2024.01.17 |
[백준/파이썬] 24088번 運動会 (Sports Day) (0) | 2024.01.16 |