0
黄钰杰
初级守护
初级守护
#include<bits/stdc++.h>
using namespace std;
int main()
{
//freopen("捐赠图书.in","r"stdin);
//freopen("捐赠图书.out","w"stdout);
long long m1,n1,m2,n2;
cin>>m1>>n1>>m2>>n2;
m1*=m2;
n1*=n2;
long long x=m1,y=n1;
long long r=m1%n1;
while(r)
{
m1=n1;
n1=r;
r=m1%n1;
}
cout<<x/n1<<'/'<<y/n1;
if (y<x&&x%y==0)
cout<<x/y;
//fclose(stdin);
//fclose(stdout);
return 0;
}
为什么90?
只求思路或指点