Files
Python-2018/Primalité Fermat.py
2019-01-20 00:55:05 +01:00

14 lines
171 B
Python

from Fonctions import*
p=int(input("Nombre: "))
a=2
while a<100 and a**(p-1)%p==1:
a+=1
if a>=100:
print("Premier")
else:
print("Pas premier")