Large Number Prime Factorization
Time limit1sMemory limit128 MB
Factorize an integer up to 2^62 into primes and print each prime factor on its own line in increasing order.
- Level
Medium7 of 10
- Topics
- Number theory, Math, Implementation
- Solved
- No attempts yet
Problem
Factorize a given positive integer into its prime factors.
Input
The first line contains a single integer to factorize. ()
Output
Print the prime factors of in increasing order, one per line. If a prime factor appears more than once, print it that many times.