-
카테고리
-
세부 분야
알고리즘 · 자료구조
-
해결 여부
미해결
채점기 오류
22.12.19 19:16 작성 조회수 185
0
저기 이름이 뭐 ++++++2 로나오고 프로그램 자체가 안돌아가요
답변을 작성해보세요.
0
geonheechoi
질문자2022.12.20
import sys
sys.stdin=open("input.txt","rt")
n,k= map(int, input.split())
cnt=0
for i in range(1,n+1):
if n%i==0:
cnt+=1
if cnt==k:
print(i)
break
else:
print(-1)
0
답변 2