Cod sursa(job #3000915)

Utilizator tomaionutIDorando tomaionut Data 13 martie 2023 08:57:43
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");

int main()
{
    int n, x, y;
    fin >> n;
    while (n--)
    {
        fin >> x >> y;
        fout << __gcd(x, y) << "\n";
    }

    return 0;
}