def acc(l):
    N = 1186.
    w = [254, 249, 230, 244, 209]
    assert len(l) == len(w)

    return sum([l[i] * w[i] / N for i in xrange(len(l))])


print acc([0.50937 , 0.70636 , 0.80108 , 0.76370 , 0.61827 ])
print acc([0.44204 ,0.72754 ,0.79604 , 0.79483 , 0.65749])
print acc([0.45928 , 0.66593 , 0.75778 , 0.77204 , 0.61710 ])
print acc([0.39310 , 0.60667 , 0.71528 , 0.21306 , 0.10847])
print acc([0.13521 , 0.14328 , 0.23290 , -0.02673 , 0.25153])
print acc([0.41123 , 0.69169 , 0.60488 , 0.75547 , -0.02245 ])
print acc([0.27148 , 0.23199 , 0.49643 , 0.48636 , 0.17749 ])
print acc([0.28626 , 0.51019 , 0.66708 , 0.69947 , 0.40459])
print acc([0.58520 , 0.69006 , 0.78923 , 0.82540 , 0.58605 ])
print acc([0.55254 , 0.71353 , 0.79769 , 0.81291 , 0.62037 ])


464ea7ccb863c5e4ee2b61c3b3668775221f9c50
def acc(l):
    N = 1186.
    w = [254, 249, 230, 244, 209]
    assert len(l) == len(w)

    return sum([l[i] * w[i] / N for i in xrange(len(l))])


print acc([0.50937 , 0.70636 , 0.80108 , 0.76370 , 0.61827 ])
print acc([0.44204 ,0.72754 ,0.79604 , 0.79483 , 0.65749])
print acc([0.45928 , 0.66593 , 0.75778 , 0.77204 , 0.61710 ])
print acc([0.39310 , 0.60667 , 0.71528 , 0.21306 , 0.10847])
print acc([0.13521 , 0.14328 , 0.23290 , -0.02673 , 0.25153])
print acc([0.41123 , 0.69169 , 0.60488 , 0.75547 , -0.02245 ])
print acc([0.27148 , 0.23199 , 0.49643 , 0.48636 , 0.17749 ])
print acc([0.28626 , 0.51019 , 0.66708 , 0.69947 , 0.40459])
print acc([0.58520 , 0.69006 , 0.78923 , 0.82540 , 0.58605 ])
print acc([0.55254 , 0.71353 , 0.79769 , 0.81291 , 0.62037 ])

