Petiasla

12.Prime Factor

May 8th, 2022
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.11 KB | None | 0 0
  1. n = int(input())
  2.  
  3. for i in range(2, int(n * 0.5) + 1):
  4. while n % i == 0:
  5. n = n / i
  6. print(i)
Advertisement
Add Comment
Please, Sign In to add comment