Cod sursa(job #2587880)

Utilizator k2e0e0w3qDumitrescu Gheorghe k2e0e0w3q Data 23 martie 2020 17:58:39
Problema Algoritmul lui Euclid Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.34 kb
#include <bits/stdc++.h>
using namespace std;

int main () {
    ifstream fin ("euclid2.in");
    ofstream fout ("euclid2.out");
    ios::sync_with_stdio(false);
    fin.tie(NULL);
    fout.tie(NULL);

    int n, x, y;
    for (fin >> n; n; n--) {
        fin >> x >> y;
        fout << __gcd(x, y) << '\n';
    }
    return 0;
}