0
点赞
收藏
分享

微信扫一扫

P1888 三角函数(python3实现)

https://www.luogu.com.cn/problem/P1888

"""
P1888 三角函数
https://www.luogu.com.cn/problem/P1888
"""

def gcd(x,y):
            z=y

            while x%y!=0:
                        z=x%y
                        x=y
                        y=z
            return z

a=list(map(int,input().split()))
      
#a=[int(i) for i in a]

a=sorted(a)
       
b=a[2]
c=a[0]

gcd_ans=gcd(b,c)

print("%d/%d" %(a[0]//gcd_ans,a[2]//gcd_ans))

举报

相关推荐

0 条评论