PYTHON 求助

B2065 鸡尾酒疗法

Limerence_Nice @ 2022-07-26 20:36:30

看不懂


by Register_int @ 2022-07-26 20:45:57

您好,代码


by Einstein_bili @ 2022-07-26 21:00:13

n=int(input())
t=''
for i in range(n):
    s=input().split()
    if i==0:
        x=int(s[1])/int(s[0])
    else:
        y=int(s[1])/int(s[0])
        if y-x>0.05:
            t=t[:]+('better\n')
        elif x-y>0.05:
            t=t[:]+('worse\n')
        else:
            t=t[:]+('same\n')
print(t)

by KINGYUBO @ 2022-07-27 19:37:14

@liuyuxuan080306 哇,则个不是刘妙龄马


|