0
已解决
江见匀
新手光能
新手光能
6628
为什么RE 0
#include<iostream>
#include<cstdio>
using namespace std;
long long a,b,x,y,d,c,r;
int h,g,k,j;
int main(){
scanf("%d/%d",&h,&g);
scanf("%d/%d",&k,&j);
a=(long long)(h*k);
b=(long long)(g*j);
d=a;
c=b;
while(a%b!=0){
r=a%b;
a=b;
b=r;
}
cout<<c/b<<" "<<d/b;
return 0;
}