karolinagergert

Untitled

Jul 11th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. x = int(input())
  3. d=2
  4. i=2
  5. flag1=False
  6. flag2=False
  7. while d % i != 0 and i <= d**0.5:
  8. i += 1
  9. else:
  10. flag1=True
  11. if flag1 and x>=2:
  12. while x % d != 0 and d <= x**0.5:
  13. d+=1
  14. if x % d != 0 and d >= x**0.5:
  15. print(x, 1)
  16. else:
  17. print(d)
Advertisement
Add Comment
Please, Sign In to add comment