#45753: 派森


chen971023@gmail.com (ZiaynGZiyaNG)

School : 國立臺南第二高級中學
ID : 291750
IP address : [122.121.141.56]
Last Login :
2025-07-03 13:13:41
e948. 基礎代謝率 (BMR Calculation) -- TOI練習賽201903新手組第1題 | From: [1.172.66.42] | Post Date : 2025-04-08 00:53

n = int(input())

for i in range (n):

g, a, h, w = map(int, input().split())

#男

if (g == 1):

BMR = (13.7 * w) + (5.0 * h) - (6.8 * a) + 66

print(f"{BMR:.2f}")

#女

elif (g == 0):

BMR = (9.6 * w) + (1.8 * h) - (4.7 * a) + 655

print(f"{BMR:.2f}")

 
ZeroJudge Forum