Cod sursa(job #1240007)
Utilizator | Data | 10 octombrie 2014 10:10:24 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.29 kb |
#include <iostream>
#include <algorithm>
#include <fstream>
using namespace std;
ifstream in("euclid2.in");
ofstream out("euclid2.out");
int main()
{
int a, b, n;
in>>n;
for(int i=1; i<=n; ++i){
in>>a>>b;
out<<__gcd(a,b);
}
return 0;
}