MapleStory Finger Point Cute Line Smiley Blinking Hello Kitty Angel MapleStory Finger Point

๐Ÿƒ‍โ™‚๏ธBaekjoon/Python

หšโ‚Šโœฉโ€งโ‚Š #2501 - python ์•ฝ์ˆ˜ ๊ตฌํ•˜๊ธฐ หšโ‚Šโœฉโ€งโ‚Š

HYEJU01 2024. 5. 17. 16:10

์•ฝ์ˆ˜ ๊ตฌํ•˜๊ธฐ

N,K = map(int,input().split())
cnt = 0
flag = 0
for i in range (1,N+1):
    if ( N % i == 0):
        tmp = i
        cnt+=1
    if (cnt == K):
        print (i)
        flag = 0
        break
    elif (cnt < K):
        flag = 1

if (flag == 1):
    print(0)