Cod sursa(job #1154297)
Utilizator | Data | 26 martie 2014 08:56:52 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.32 kb |
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
ifstream fin("euclid2.in");
ofstream fout("euclid2.out");
int t;
fin >> t;
for(int tes = 1 ; tes <= t; ++ tes) {
int x, y;
fin >> x >> y;
fout << __gcd(x, y) << '\n';
}
return 0;
}