📚공부/코딩테스트
백준 - 소인수분해, 파이썬
Janger
2021. 12. 5. 10:06
728x90
https://www.acmicpc.net/problem/11653
11653번: 소인수분해
첫째 줄에 정수 N (1 ≤ N ≤ 10,000,000)이 주어진다.
www.acmicpc.net
N = int(input())
i = 2
while N > 1:
while (N % i) == 0:
print(i)
N //= i
i += 1
아
728x90