Advertisement
serega1112

razlozhenie

Jan 12th, 2021
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1.  
  2. n = int(input())
  3. i = 2
  4. res = []
  5. while n != 1 and i <= n ** 0.5:
  6.     if n % i == 0:
  7.         res.append(str(i))
  8.         n //= i
  9.     else:
  10.         i += 1
  11. if n > 1:
  12.     res.append(str(n))
  13.  
  14. print(' '.join(res))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement