Good job! Now that Heidi is able to distinguish between Poisson and uniform distributions, she is in a good position to actually estimate the populations.

Can you help Heidi estimate each village's population?
Same as the easy version.
none
T = int(input())
for i in range(T):
  distirbution = map(int, input().split())
  m = sum(distirbution) / 250
  v = 0
  for x in distirbution:
    v += (x - m) ** 2
  v = v / 250
  if abs(m - v) < abs(m ** 2 / 3 - v):
    print(int(m))
  else:
    print(0.5 * (max(distirbution) - min(distirbution)))