Advertisement
Kaelygon

Untitled

Sep 3rd, 2020 (edited)
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. import math
  2. while 1:
  3.     s=input()
  4.     if(len(s)==0):
  5.         exit(0)
  6.     else:
  7.         try:
  8.             a,b = s.split()
  9.             print(math.gcd(int(a),int(b)))
  10.         except:
  11.             print("invalid input")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement