128. Prime Factorisation
EasyFactorisation
Print the prime factorisation of n as factors in non-decreasing order, separated by spaces (repeat a factor as often as it divides n).
Input format
A single integer n.
Output format
The prime factors.
Example 1
Input
12
Output
2 2 3
Example 2
Input
97
Output
97
Constraints
2 ≤ n ≤ 10¹²
Read input from standard input and print the answer to standard output. Your code is judged against 6 test cases, most of them hidden.
Loading the MyLoginn IDE…