Prime Factorization List
Computer Mathematics
Medium
2 views
Problem Description
Print prime factors with exponents for n.
Input Format
One integer n.
Output Format
Lines: p^e.
Official Solution
For p from 2..sqrt(n): count exponent while n%p==0. Print if exponent>0. If remaining>1 print remaining^1.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!