Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- while 1:
- s=input()
- if(len(s)==0):
- exit(0)
- else:
- try:
- a,b = s.split()
- print(math.gcd(int(a),int(b)))
- except:
- print("invalid input")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement