洛谷说我今天忌刷题,结果连刷几题都是WA
#include <iostream>
using namespace std;
int gcd1(int a,int b){
if(b==0){
return a;
}
return gcd1(b,a%b);
}
int gcd2(int c,int d){
if(d==0){
return c;
}
return gcd2(d,c%d);
}
int main(){
int a,b,c,d,e,x,y,sum;
cin>>x>>y;
if(gcd1(a,b)==x){
if(e=gcd2(c,d)&&c*d/e==y){
sum++;
}
}
cout<<sum;
return 0;
}