题目概述:
AC代码:
#include<iostream>using namespace std;int gcd(long long a,long long b)
{while(a%b!=0){int c = a%b;a = b;b = c;}return b;
}int main()
{long long a,b,c;scanf("%lld %lld %lld",&a,&b,&c);if(a > b){long long temp = a;a = b;b = temp;}if(a > c){long long temp = a;a = c;c = temp; }if(b > c){long long temp = b;b = c;c = temp;}int res = gcd(c,a);int a1 = a / res;int c1 = c / res;printf("%lld/%lld",a1,c1);return 0;}