Guest User

Untitled

a guest
Nov 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. def Fermat_primality_test (n,a):
  2. for i in range(2,a):
  3. if (i**(n-1))%n!=1:
  4. return 0
  5. return 1
  6. print(Fermat_primality_test(int(input()),int(input())))
Add Comment
Please, Sign In to add comment