Cod sursa(job #1341807)
Utilizator | Data | 13 februarie 2015 09:09:51 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.28 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("euclid2.in", "r", stdin);
freopen("euclid2.out", "w", stdout);
int a, b, t;scanf("%d", &t);
for(int i=1;i<=t;i++)
{scanf("%d %d", &a, &b);printf("%d\n", __gcd(a, b));}
return 0;
}