判断素数
def isprime(number):
for i in range(2,(int)(math.sqrt(number)+1)):
if(number%i==0):
return 0
return 1
求最大公约数
def gcd(a,b):
if a < b:
a,b = b,a
while b != 0:
temp = a % b
a = b
b = temp
return a