Cod sursa(job #2336602)
Utilizator | Data | 5 februarie 2019 12:18:25 | |
---|---|---|---|
Problema | Algoritmul lui Euclid extins | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.59 kb |
#include<fstream>
using namespace std;
ifstream cin("euclid3.in");
ofstream cout("euclid3.out");
void euclid(long long a, long long b, long long *d, long long *x, long long*y)
{
if (b == 0) {
*d = a;
*x = 1;
*y = 0;
} else {
long long x0, y0;
euclid(b, a % b, d, &x0, &y0);
*x = y0;
*y = x0 - (a / b) * y0;
}
}
int main()
{
long long a,b,c,o,p, *d,*x,*y,n;
x=&o; y=&p; d=&a;
cin>>n;
for(int i=1; i<=n; i++){
cin>>a>>b>>c;
cout<<0<<' '<<0<<'/n';
}
return 0;
}