Cod sursa(job #2418427)

Utilizator omegasFilip Ion omegas Data 4 mai 2019 22:52:34
Problema Algoritmul lui Euclid Scor 0
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.38 kb
#include <iostream>
#include <fstream>
#include <bits/stdc++.h>
#define lop(x,n) for(int x = 1; x <= n; ++x)
#define loop(x,st,n) for(int x = st; x <= n; ++x)

using namespace std;
ifstream fin("euclid2.in");
ofstream fout("euclid2.in");

int main()
{
    int t;
    fin >> t;
    int a,b;
    lop(i,t){
        fin >> a >> b;
        fout << __gcd(a,b) << "\n";
    }

}