Cod sursa(job #2559249)
Utilizator | Data | 27 februarie 2020 10:14:04 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.27 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ( "euclid2.in" );
ofstream fout ( "euclid2.out" );
long long t, a, b;
int main() {
fin >> t;
while ( t-- ) {
fin >> a >> b;
fout << __gcd ( a, b ) << '\n';
}
return 0;
}