← Back to List

8932번: 7종 경기 ↗

Solutions

Python 3
441 B | 441 chars
L = [[9.23076,26.7,1.835],[1.84523,75,1.348],[56.0211,1.5,1.05],[4.99087,42.5,1.81],[0.188807,210,1.41],[15.9803,3.8,1.04],[0.11193,254,1.88]]
K = [0,1,1,0,1,1,0]
for i in range(int(input())):
    I = list(map(int,input().split()))
    S = 0
    for j in range(7):
        if K[j] == 0:
            k = L[j][0] * ((L[j][1] - I[j])**L[j][2])
        else:
            k = L[j][0] * ((I[j] - L[j][1])**L[j][2])
        S += int(k)
    print(S)