computer 지식/알고리즘 정복기
백준 2501번
semper.fidelis
2021. 10. 10. 15:30
반응형
n,k = map(int,input().split())
temp = []
for i in range(1,n+1):
if n%i ==0:
temp.append(i)
if len(temp) >= k:
print(temp[k-1])
else:
print(0)
https://jaejin89.tistory.com/56
백준 2501. 약수 구하기 :: 돼지개발자
출저 : https://www.acmicpc.net/problem/2501 "구현" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import java.util.Scanner; public class Main { static int N,K; st..
jaejin89.tistory.com
https://inuplace.tistory.com/459
[알고리즘 연습] 약수 구하기 효율화 (by Python)
약수 효율적으로 구하기 1 이상의 자연수 n을 받았을 때 해당 수의 약수들을 구하라. 약수들은 리스트 형태로 숫자 크기 순서대로 출력하라. 단순 풀이 def get_divisor(n): n = int(n) divisors = [] for i in ra
inuplace.tistory.com
반응형