반응형
import sys
import math
N = int(sys.stdin.readline())
num = 2
result = []
while N != 1:
if math.gcd(N,num) != 1:
result.append(num)
N = N // num
else:
num+=1
[print(x) for x in result]
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 16170 (0) | 2020.09.20 |
---|---|
baekjoon - python - 10886 (0) | 2020.09.17 |
baekjoon - python - 1037 (0) | 2020.09.16 |
baekjoon - python - 5086 (0) | 2020.09.16 |
baekjoon - python - 15894 (0) | 2020.09.14 |
댓글