문제: https://www.acmicpc.net/problem/11653
import sys
read = lambda : sys.stdin.readline().strip()
n = int(read())
i= 1
while i*i <= n:
i +=1
while True:
if n % i == 0:
print(i)
n //= i
else:
break
if n > 1:
print(n)
# 미쳐 나누어 떨어지지 않은 것을 알려준다
import java.util.Scanner;
public class Main {
private static final Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt();
for (int i = 2; i * i <= n; i++) {
while (true) {
int tmp = n % i;
if (tmp != 0) {
break;
}
System.out.println(i);
n /= i;
}
}
if (n > 1) {
System.out.println(n);
}
}
}