已解决 方晨顺 中级守护 #include<iostream> using namespace std; int main() { int m1,n1,m2,n2; cin>>m1>>n1>>m2>>n2; m1*=m2; n1*=n2; int x=m1,y=n1; int r=m1%n1; while(r) { m1=n1; n1=r; r=m1%n1; } cout<<x/n1<<'/'<<y/n1; return 0; } 方晨顺在2019-02-18 19:12:01追加了内容40分