백준 2501 약수 구하기 [Python]

지구온난화·2023년 3월 9일
0

백준 브론즈

목록 보기
3/52

n, k = map(int, input().split())
for i in range(1, n+1):
    if(n%i == 0):
        k -= 1
    if(k == 0):
        print(i)
        break
if(k > 0): print(0)

2023-03-09

0개의 댓글