Pagini recente » Cod sursa (job #3268353) | Cod sursa (job #856126) | Teorema chineza a resturilor - generalizari si aplicatii | Cod sursa (job #254515) | Cod sursa (job #2418426)
#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";
}
}