Cod sursa(job #3352278)
| Utilizator | Data | 26 aprilie 2026 11:49:46 | |
|---|---|---|---|
| Problema | Algoritmul lui Euclid | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.32 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("euclid2.in") ;
ofstream fout ("euclid2.out") ;
int main()
{
int n ;
fin >> n ;
for ( int i = 1 ; i <= n ; i ++ )
{
long long x , y ;
fin >> x >> y ;
fout << __gcd(x,y) << '\n' ;
}
return 0;
}
