fork download
  1. tests = int(input())
  2. for x in range(tests):
  3. a, b = map(int, input().split())
  4. ca = a
  5. cb = b
  6. while a != b:
  7. while a < b:
  8. a = a + ca
  9. while b < a:
  10. b = b + cb
  11. print(a)
Runtime error #stdin #stdout #stderr 0.12s 23312KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line