728x90

n, k = map(int, input().split())
q = []

for i in range(n):
    if n%(i+1)==0:
        q.append(i+1)


if len(q)<k:
    print(0)
else :
    print(q[k-1])

'I.sly() > 10기 심화 - 프로그래밍' 카테고리의 다른 글

백준 2476번 주사위게임  (0) 2024.09.13

+ Recent posts