Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- salida = True
- while salida:
- repeticion = True
- while repeticion:
- tecladoPersona = input("por favor ingresa A y B: ")
- numeroA = int(tecladoPersona.split(" ",2)[0])
- numeroB = int(tecladoPersona.split(" ",2)[1])
- if numeroA==0 and numeroB==0:
- salida = False
- break
- if numeroA<0 or numeroA>10000:
- print("numero A fuera del rango permitido")
- if numeroB<1 or numeroB>10000:
- print("numero B fuera del rango permitido")
- else:
- repeticion = False
- if numeroA>=0 and numeroB>=1 and numeroA<10000 and numeroB<10000:
- print("Maximo comun divisor de "+str(numeroA)+"! y ", numeroB,": ", math.gcd(math.factorial(numeroA), numeroB))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement