You are given a positive integer n. Your task is to print all its prime factors in increasing order, including repeated occurrences.
A prime factor is a prime number that divides the given number exactly. If a prime factor appears multiple times in the factorization, each occurrence must be included in the output. If n = 1, the output should be empty because 1 has no prime factors.
Input: n = 60
Output: 2 2 3 5
Explanation: The prime factorization of 60 is 2 × 2 × 3 × 5.
Input: n = 13
Output: 13
Explanation: Since 13 is prime, its only prime factor is 13 itself.
Input: n = 1
Output: (empty)
Explanation: The number 1 has no prime factors, so the output is empty.
Sign in to write, run, and submit your solution against the full test suite.