很繁复的python题解,刚学勿喷www

kaisei 发表于 1年前 · 关联问题 预测身高

G = input() fh,mh = map(int,input().split()) S = input() D = input() if G == "M":

h = (fh + mh) * 0.54

else:

h = (fh * 0.923 + mh) / 2

def function(h):

if (S == "Y" and D == "N"): h *= 1.02 elif (S == "N" and D == "Y"): h = h * 1.015 elif (S == "Y" and D == "Y"): h = h * 1.035 return h

h = function(h) print(h)