Cod sursa(job #2628005)
Utilizator | Data | 13 iunie 2020 20:57:36 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 50 |
Compilator | py | Status | done |
Runda | Arhiva educationala | Marime | 0.23 kb |
from math import gcd
with open("euclid2.in", "r") as f, open("euclid2.out", "w") as g:
t = int(next(f))
while t:
t -= 1
a, b = (int(x) for x in next(f).split())
g.write("{}\n".format(gcd(a, b)))