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))
标签:www,cn,P1888,三角函数,int,ans,python3,gcd 来源: https://blog.csdn.net/dllglvzhenfeng/article/details/122763906