강의

멘토링

커뮤니티

Inflearn Community Q&A

No author

This post's author information has been deleted.

Introduction to Python Algorithm Problem Solving (Coding Test Preparation)

1. Setting the environment and solving the Kth divisor

채점오류

Written on

·

204

0

코드는 맞게 작성한것 같은데 이렇게 뜹니다 ㅠ.. 

python코테 준비 같이 해요!

Answer 2

0

코드입니다

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

codingcamp님의 프로필 이미지
codingcamp
Instructor

안녕하세요^^

채점 결과가 이렇게 나오는 코드를 {;}버튼을 사용해서 올려주세요.

No author

This post's author information has been deleted.

Ask a question