Cod sursa(job #3003937)
Utilizator | Data | 16 martie 2023 00:33:31 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.28 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++)
{
int x, y;
fin >> x >> y;
fout << __gcd(x ,y) << "\n";
}
return 0;
}