Advertisement
serega1112

predstavlenie chisel

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