Cod sursa(job #3267959)
Utilizator | Data | 13 ianuarie 2025 11:16:25 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.27 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("euclid2.in");
ofstream fout("euclid2.out");
int n;
int main()
{
int i, x, y;
fin >> n;
while(n--)
{
fin >> x >> y;
fout << __gcd(x, y) << "\n";
}
return 0;
}