Problem:
 Score : 300 points    Problem Statement You have a pot and N ingredients. Each ingredient has a real number parameter called value , and the value of the i -th ingredient (1 \leq i \leq N) is v_i .  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.      Constraints  2 \leq N \leq 50  1 \leq v_i \leq 1000  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  v_1  v_2  \ldots  v_N       Output Print a decimal number (or an integer) representing the maximum possible value of the last ingredient remaining.  Your output will be judged correct when its absolute or relative error from the judge's output is at most 10^{-5} .        Sample Input 1 2
3 4      Sample Output 1 3.5  If you start with two ingredients, the only choice is to put both of them in the pot. The value of the ingredient resulting from the ingredients of values 3 and 4 is (3 + 4) / 2 = 3.5 .  Printing 3.50001 , 3.49999 , and so on will also be accepted.       Sample Input 2 3
500 300 200      Sample Output 2 375  You start with three ingredients this time, and you can choose what to use in the first composition. There are three possible choices:   Use the ingredients of values 500 and 300 to produce an ingredient of value (500 + 300) / 2 = 400 . The next composition will use this ingredient and the ingredient of value 200 , resulting in an ingredient of value (400 + 200) / 2 = 300 .  Use the ingredients of values 500 and 200 to produce an ingredient of value (500 + 200) / 2 = 350 . The next composition will use this ingredient and the ingredient of value 300 , resulting in an ingredient of value (350 + 300) / 2 = 325 .  Use the ingredients of values 300 and 200 to produce an ingredient of value (300 + 200) / 2 = 250 . The next composition will use this ingredient and the ingredient of value 500 , resulting in an ingredient of value (250 + 500) / 2 = 375 .   Thus, the maximum possible value of the last ingredient remaining is 375 .  Printing 375.0 and so on will also be accepted.       Sample Input 3 5
138 138 138 138 138      Sample Output 3 138

Solution (Python):
import math
import copy
import sys


inputa = input().split()



a = int(inputa[0])








inputb = input().split()
inputbList = [float(n) for n in inputb]













inputbList.sort()

tmpsum = 0

for i in range(1, a):
    if i == 1:
        tmpsum = (inputbList[0] + inputbList[1])/2
    else:
        tmpsum = (tmpsum + inputbList[i])/2

print(tmpsum)

Solution (Python):
n = int(input())
v_list = map(int,input().split())

v_list2 = sorted(v_list)

ans = v_list2[0]
for i in range(1,n):
    ans = (ans + v_list2[i])/2

print(ans)

Solution (Python):
import heapq
N = int(input())
v_ls = [int(i) for i in input().split()]
heapq.heapify(v_ls)
while len(v_ls) > 1:
    smallest = heapq.heappop(v_ls)
    second = heapq.heappop(v_ls)
    heapq.heappush(v_ls, (smallest + second) / 2)
print(heapq.heappop(v_ls))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
list.sort(a)
t=a[0]
for i in range(n-1):
  t=(t+a[i+1])/2
print(t)

Solution (Python):
N = int(input())
v = list(map(int,input().split()))

while len(v) >=2:
	v.sort()
	a = (v[0]+v[1])/2
	v.pop(0)
	v.pop(0)
	v.append(a)

else:
	print(v[0])

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
i = 0

v.sort()

while i < N - 1:
    v[i + 1] = (v[i] + v[i + 1]) / 2
    i += 1
    
print(v[i])

Solution (Python):
from functools import reduce
N = int(input())
li = sorted(list(map(int, input().split())))

ans = reduce(lambda x,y: (x+y)/2, li)
print(ans)

Solution (Python):
N = int(input())
v = list(map(float, input().split()))

v.sort()

r = v[0]

for i in v[1::]:
    r = (r + i) / 2

print(r)

Solution (Python):
n = input()
values = list((input()).split(" "))

v = sorted(list(map(lambda x: int(x), values)))

result = v.pop(0)
while len(v) > 0 :
    el = v.pop(0)
    result = (result + el)/2
    
print(result)

Solution (Python):
N = int(input())
v_list = sorted(list(map(int, input().split())))
v_len = len(v_list)

sum = v_list[0] / (2 ** (N - 1))
for i in range(v_len - 1):
  sum += v_list[i+1] / (2 ** (N - 1 - i))
  
print(sum)

Solution (Python):
from collections import deque

n = int(input())
nums = list(map(int, input().split()))

nums = deque(sorted(nums))

A = nums.popleft()
while len(nums) != 0:
    A = (A + nums.popleft()) / 2

print(A)

Solution (Python):
from sys import exit, stdin
N = int(stdin.readline().rstrip())
V = sorted(int(_) for _ in stdin.readline().rstrip().split())
ans = 0
for i in range(1, N):
    if i == 1:
        ans = (V[i] + V[i-1]) / 2
    else:
        ans = (ans + V[i]) / 2
print(ans)

Solution (Python):
n =int(input())
arr=[int(x) for x in input().split()]
arr.sort()
ans = arr[0]

for i in range(1,len(arr)):
	ans = (ans+arr[i])/2

print(ans)

Solution (Python):
N = int(input())
a = sorted(list(map(int, input().split())))
b = (a[0] + a[1]) / 2
if N > 2:
  for c in a[2:]:
    b = (b + c) / 2
print(b)

Solution (Python):
n=int(input())
lst = list(map(int,input().split()))
lst.sort()
t = 0
t+=lst[0]/(2**(n-1))

for i in range(1,n):
    t+=lst[i]/(2**(n-i))
    
print(t)

Solution (Python):
from functools import reduce

N = int(input())
V = list(map(int, input().split()))
assert len(V) == N

V.sort()
v = reduce(lambda x, y: (x + y)/2.0, V)
print(v)

Solution (Python):
from heapq import heappop, heappush, heapify
N = int(input())
V = list(map(int, input().split()))

V.sort()

heapify(V)

for i in range(N-1):
    a = heappop(V)
    b = heappop(V)
    heappush(V, (a+b)/2)

ans = heappop(V)

print(ans)

Solution (Python):
n=int(input())
A=sorted(map(int,input().split()))
ans=A[0]
for i in range(1,n):
  ans=(ans+A[i])/2
print(ans)

Solution (Python):
a = int(input())
b = list(map(int, input().split()))
result = 0

b.sort()

for i in range(a):
    if i == 0:
        result = b[i]
    else:
        result = result / 2
        result += b[i] / 2

print(result)

Solution (Python):

import heapq
MOD = 10 ** 9 + 7

N = int(input())
vn = map(int, input().split())


hq = []
for v in vn:
    heapq.heappush(hq, v)

for i in range(N - 1):
    x = heapq.heappop(hq)
    y = heapq.heappop(hq)
    heapq.heappush(hq, (x + y) / 2)

ans = hq[0]

print(ans)

Solution (Python):
N = int(input())
v = sorted(map(int, input().split()))

ans = v[0]
for i in range(N):
    ans = (ans + v[i]) / 2
print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
L = sorted(L)
ans=L[0]
for a in L[1:]:
  ans = (ans+a)/2
print(ans)

Solution (Python):


N = int(input())
v = list(map(int, input().split()))

v = sorted(v, reverse=True)

for i in range(N-1, 0, -1):
    v[i-1] = (v[i-1] + v[i]) / 2

print(v[0])

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a.sort()

b = a[0]
for i in range(n - 1):
  b = (b + a[i + 1]) / 2

print(b)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v.sort()
ans = (v[0] + v[1])*0.5
for i in range(N-2):
    ans = (v[i+2] + ans) * 0.5
print(ans)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
k=0
v.sort()
ans=0
V=v[0]
for i in range(1,n):
        V=(V+v[i])/2
print(V)

Solution (Python):
N = int(input())
V = sorted(list(map(int, input().split())))

for i in range(len(V) - 1):
    V[i + 1] = (V[i] + V[i + 1]) / 2

print(V[-1])

Solution (Python):
n = int(input())
v = list(map(int,input().split()))
kati = 0

v.sort()
kati = (v[0] + v[1]) / 2

if n == 2:
  print(kati)
else:
  for i in range(2,n):
    kati = (kati + v[i]) / 2
  print(kati)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v.sort()
s = v[0]
for i in range(1, n):
    s = (s + v[i]) / 2
print(s)

Solution (Python):


def solve():
    N = int(input())
    Vs = list(map(int, input().split()))

    Vs.sort()

    new_v = (Vs[0]+Vs[1])/2

    if N == 2:
        print(new_v)
        return

    for i in range(2, N):
        new_v = (new_v+Vs[i])/2

    print(new_v)


if __name__ == "__main__":
    solve()

Solution (Python):
N=int(input())
b=input().split(" ")
c=[]
for i in range (0,N):
    c.append(int(b[i]))
c.sort()
answer=c[0]
for i in range(1,N):
    answer=(answer+c[i])/2
print(answer)

Solution (Python):
N = int(input())
v = list(map(int,input().split()))
v.sort()
V = 0

for i in range(N-1):
  v[i+1] = (v[i] + v[i+1]) / 2
print(v[-1])

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v.sort()
sum = 0
sum = v[0] + v[1]
for i in range(1,n - 1):
    sum += v[i + 1] * (2**i)
print(sum / 2**(n - 1))

Solution (Python):
N = int(input())

x = list(map(int, input().split()))
x.sort()

y = x[0]
for i in x[1:]:
    y = (y + i) / 2
print(y)

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter

def main():
	n = int(input().strip())
	v = list(map(int, input().strip().split()))
	v.sort()
	ans = v[0]
	for i in range(1, n):
		ans = (ans+v[i])/2
	print("{:.5f}".format(ans))


if __name__ == '__main__':
	main()

Solution (Python):
from decimal import *

input()
N = list(map(int, input().split()))
N.sort()
ans = 0
while True:
    try:
        tmpa = N.pop(0)
        ans = tmpa
        tmpb = N.pop(0)
        N.append((Decimal(tmpa)+Decimal(tmpb))/Decimal(2))
        N.sort()
    except IndexError:
        break
print(ans)

Solution (Python):
def main():
    n = int(input())
    values = list(map(int,input().split()))

    sorted_values = sorted(values)
    ans = sorted_values[0]
    for i in range(1,n):
        ans = (ans + sorted_values[i]) / 2
    print(ans)



if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
V = [int(x) for x in input().split()]

V.sort()

r = V[0]
for v in V[1::]:
    r = (r+v)/2

print(r)

Solution (Python):
N = input()
v = input().split(" ")
v_list = [int(i) for i in v]
v_list.sort()
temp = 0
for i in range(len(v_list)-1):
    tmep = (v_list[i] + v_list[i + 1]) / 2
    v_list[i + 1] = tmep

print(v_list[len(v_list)-1])

Solution (Python):


n = int(input())

a = sorted(list(map(float, input().split())))
value = a[0]

for i, e in enumerate(a):
	if i > 0:
		value = (value + e)/2
print(value)

Solution (Python):



import math

N = int(input())

inputV = input("")
arrayV = [int(n) for n in inputV.split()]
arrayV.sort(reverse=True)

value = 0
pow = 1
for i in arrayV:
    value = value + i * math.pow(2, -pow)
    pow = pow + 1

value = value + arrayV[N - 1] * math.pow(2, -N)

print(value)

Solution (Python):
n = input()
v = sorted(map(int, input().split()))
vt = v[0]
for vn in v[1:]:
	vt = (vt + vn)/2
print(vt)

Solution (Python):
import heapq

N = int(input())
V = list(map(int, input().split()))
hq = []
for v in V:
    heapq.heappush(hq, v)

while len(hq) > 1:
    a = heapq.heappop(hq)
    b = heapq.heappop(hq)
    heapq.heappush(hq, (a+b)/2)
print(heapq.heappop(hq))

Solution (Python):
n=int(input())
ans,*v=sorted(map(int,input().split()))
for i in v:
  ans=(ans+i)/2
print(ans)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
v.sort()
val=v[0]
for i in range(1,len(v)):
    val=(val+v[i])/2
print(val)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
v.sort()

x=v[0]
for i in range(n-1):
  x=(x+v[i+1])/2
print(x)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
sorted_v = sorted(v)
value = sorted_v[0]
for i in range(1, len(sorted_v)):
    value = (value + sorted_v[i]) / 2
print(value)

Solution (Python):
N = int(input())
A = sorted([int(arr) for arr in input().split()])
while len(A)>1:
    x = A.pop(0)
    y = A.pop(0)
    tmp = (x+y)/2
    A.append(tmp)
    A.sort()
print(A[0])

Solution (Python):
N = int(input())
v = list(map(int,input().split()))
v.sort()
i = 1
s = v[0]
while i <= N-1:
  s = (v[i] + s)/2
  i = i + 1
print(s)

Solution (Python):
total_num = int(input())
materials = input().split()

for key,value in enumerate(materials):
  materials[key] = int(value)

materials.sort()
total_value = (materials[0] + materials[1]) / 2


materials.pop(0)
materials.pop(0)

for index,value in enumerate(materials):
  if(index + 1 <= total_num - 2):
    total_value = (total_value + materials[index]) / 2
  else:
    break;

print(total_value)

Solution (Python):
N = int(input())
V = map(int, input().split())
V = sorted(V)

for _ in range(N-1):
    V = [ (V[0] + V[1]) / 2 ] + V[2:]

print(V[0])

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort()
s =(l[0] + l[1])/2

for i in range(2,n):
    s = (s + l[i]) /2
    
print(s)

Solution (Python):
import glob

IS_TEST = False


REL_PATH = 'ABC\\138\\C'


TOP_PATH = 'C:\\AtCoder'


class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        if IS_TEST:
            self.index += 1
            return self.problem[self.index-1]

        else:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        if IS_TEST:
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        else:
            self.resolve()


class C(Common):

    def resolve(self):
        item_num = int(self.input_data())
        items = [int(i) for i in self.input_data().split()]

        items.sort()
        result = items[0]

        for value in items:
            result = (result + value) / 2

        print(str(result))


solver = C(REL_PATH)
solver.exec_resolve()

Solution (Python):
n=int(input())
v=[int(e) for e in input().split()]
v.sort()
a=float(v[0])
for i in range(0,n-1):
  a=(a+v[i+1])/2
print(a)

Solution (Python):
N = int(input())
v = list(map(int,input().split()))
v.sort()
ans = v[0]
for i in range(1,N):
  ans = (ans+v[i])/2
print(ans)

Solution (Python):
n = int(input())
v = sorted([int(i) for i in input().split(' ')])

ans = (v[0] + v[1]) / 2
for e in v[2:]:
    ans = (ans + e) / 2

print(ans)

Solution (Python):
n = int(input())
v = [int(x) for x in input().split()]

v.sort()
ans = v[0]
for i in range(1, n):
    ans = (ans + v[i]) / 2

print(ans)

Solution (Python):
import sys
from operator import itemgetter 
from fractions import gcd 
from math import ceil, floor, sqrt 
from copy import deepcopy 
from collections import Counter, deque 
import heapq
from functools import reduce
sys.setrecursionlimit(200000)

input = sys.stdin.readline



n = int(input())

v = list(map(int, input().split()))

v.sort()

ans = (v[0] + v[1])/2

for i in range(2, n):
    ans = (ans + v[i])/2

print(ans)

Solution (Python):
N = int(input())
vlist = list(map(int,input().split()))
vlist.sort()
before = vlist[0]
for i in range(1,N):
    before = (before+vlist[i])/2

print(before)

Solution (Python):
N=int(input())

v=[int(i) for i in input().split(" ")]

v=sorted(v)

while len(v)>=2:
    v1=v.pop(0)
    v2=v.pop(0)
    v.append((v1+v2)/2)
    v=sorted(v)

print(v[0])

Solution (Python):
N = int(input())
A = [int(s) for s in input().split()]
A.sort()
a = 0
for i in range(N-1):
    a = (A[0] +A[1])/2
    A[0] = a
    A.remove(A[1])
print(A[0])

Solution (Python):
N = int(input())
v = sorted(list(map(int, input().split())))
ans = v[0]
for i in range(1,N):
    ans = (ans + v[i])/2
print(ans)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
a.sort()
b = a[0]
for i in range(1, len(a)):
    b = (b + a[i]) / 2
print(b)

Solution (Python):

N = int(input())


A = list(map(int, input().split()))



if N == 2:
	print(sum(A) / 2)



else:
	while len(A) != 2:
		A.sort()
		A = [(A[0] + A[1]) / 2] + A[2:]
	print(sum(A) / 2)

Solution (Python):
N = int(input())
V = sorted(map(int, input().split()))
a = (V[0] + V[1]) / 2
for i in range(2, N):
  a = (a + V[i]) / 2
print(a)

Solution (Python):
def main():
    n=int(input())
    v = list(map(int,input().split()))
    v.sort()
    ans=v[0]
    for i in range(n-1):
        ans=(ans+v[i+1])/2
    print(ans)
    
main()

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
a.sort()

current = a[0]

for x in range(1,n):
    current = (current + a[x])/2
print(current)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=(l[0]+l[1])/2
for i in range(2,n):
    ans=(ans+l[i])/2
print(ans)

Solution (Python):
N=int(input())
vn=sorted(list(map(int,input().split())))
for i in range(len(vn)-1):
    vn[i+1] = (vn[i]+vn[i+1])/2
print(vn[-1])

Solution (Python):
n = int(input())
data = sorted([int(i) for i in input().split()])
ans = data[0]
for i in data[1:]:
  ans = (ans+i)/2
print(ans)

Solution (Python):

N = int(input())



S = input().split(" ")
for i in range(N):
    S[i] = float(S[i])
S.sort()
for i in range(N-1):
    S[i+1] = (float(S[i])+float(S[i+1])) / 2
print(S[N-1])

Solution (Python):

N = int(input())



S = input().split(" ")
for i in range(N):
    S[i] = float(S[i])
S.sort()
for i in range(N-1):
    S[i+1] = (float(S[i])+float(S[i+1])) / 2.000000
print(S[N-1])

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
V.sort() 

mean = 0
for i in range(len(V)):
    mean += V[i]/2.**(len(V)-i)
print(mean + V[0]/2.**len(V))

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
print(sum([x/2 ** i for i, x in enumerate(reversed(sorted(v)), 1)]) + min(v)/2**n)

Solution (Python):
from functools import reduce
n=int(input())
p=list(map(int,input().split()))
p.sort()
s=reduce(lambda a,b:(a+b)/2,p)
print(s)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]

a = sorted(a, reverse=True)
sm = 0
a[len(a)-2] += a[len(a)-1]
for i in range(len(a)-1):
    sm += a[i]/2**(i+1)
print(sm)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v=sorted(v)
V=(v[0])*1/(2**(N-1))
i=1
while i<N :
  V=V+(v[i]*1/(2**(N-i)))
  i=i+1
print(V)

Solution (Python):
N = int(input())
v = list(map(int,input().split()))

v.sort()

sum = v[0]
for i in range(1,N):
  sum = (sum + v[i]) / 2
print(sum)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
ans = a[0]
for i in range (1, n): 
    ans = (ans + a[i]) / 2
print(ans)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))

v.sort()
for i in range(N-1):
    v[i+1] = (v[i] + v[i+1]) / 2
print(v[N-1])

Solution (Python):
import functools
n=int(input())
value=sorted(list(map(int,input().split())))
ans=functools.reduce(lambda x,y:(x+y)/2,value)
print(ans)

Solution (Python):

N = int(input())
v = list(map(int,input().split(' ')))

while(len(v) != 1):
  v.sort()
  a = v.pop(0)
  b = v.pop(0)
  v.append((a+b)/2)
print(v[0])

Solution (Python):
from functools import *
input()
print(reduce((lambda x,y:(x+y)/2), sorted(map(int,input().split()))))

Solution (Python):
n = int(input())
arr = list(map(int,input().split()))
arr.sort()
 
ans = arr[0]
for i in range(1,n):
    ans = (ans+arr[i])/2
 
print(ans)

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
V.sort()
a = V[0]
for i in range(N-1):
    a = (a +V[1])/2
    del V[0]
print(a)

Solution (Python):
n = int(input())
v = [ int(_) for _ in input().split() ]
 
v.sort()
 
x = ( v[0] + v[1] ) /2 
 
for i in range(1, len(v)-1):
	x = ( x + v[i+1] ) /2 
    
print(x)

Solution (Python):
def calc(vlist):
    sum = vlist[0]
    for i in range(len(vlist) - 1):
        sum = ((sum + vlist[i+1]) / 2)

    return sum
   
try:
    n = int(input())

    v = [int(x) for x in input().split(' ')]
    v.sort()
    
    print(calc(v))
    
except ValueError:
    print("数値を入力してください")

Solution (Python):
n = int(input())
v = [ int(_) for _ in input().split() ]

v.sort()

x = ( v[0] + v[1] ) /2 

for i in range(1, len(v)-1):
	x = ( x + v[i+1] ) /2 
    
print(x)

Solution (Python):
n=int(input())
L=list(map(int,input().split()))
L.sort()
res=L[0]
for i in range(n-1):
 res=(res+L[i+1])/2
print(res)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v.sort()
while len(v) > 1:
    a, b = v.pop(0), v.pop(0)
    v.insert(0, (a + b) / 2)
print(v[0])

Solution (Python):
N=int(input())
v=list(map(int,input().split()))
vv=sorted(v)
value=vv[0]
for i in vv[1:]:
	value=(value+i)/2
print(value)

Solution (Python):
N = int(input())
v_list = list(map(int,input().split()))



v_list.sort()

s = v_list.pop(0)

for v in v_list :
    s = (s + v) / 2.0

print(s)

Solution (Python):
N = int(input())
values = sorted([int(v) for v in input().split(' ')])
answer = values[0]
for i in range(1, N):
  answer = (answer + values[i]) / 2
 
print(answer)

Solution (Python):

n = int(input())
v = list(map(int,input().split()))
sv = sorted(v)

while len(sv)>=2:
    a=sv.pop(0)
    b=sv.pop(0)
    new =(a+b)/2
    sv.append(new)
    sv.sort()

print(sv[0])

Solution (Python):
n = int(input())
ing = list(map(int,input().split()))
ing.sort()
total = (ing[0] + ing[1]) / 2
if len(ing) > 2:
    for i in range(2, len(ing)):
        total = (total + ing[i]) /2
print(total)

Solution (Python):

N = int(input())
vs = list(map(int,input().split()))
vs.sort()
result = vs[0]
for i in range(1,N):
    result = (result + vs[i])/2
print(result)

Solution (Python):
n = int(input())
ls = sorted(list(map(int, input().split())))
for i in range(n-1):
    ls[i+1] = (ls[i] + ls[i+1])/2
print(ls[-1])

Solution (Python):
n = int(input())
v = sorted(list(map(int, input().split())))
for i in range(n-1):
    v[i+1] = (v[i]+v[i+1])/2
print(v[n-1])

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v.sort()
ans = v[0]
for i in range(1, n):
    ans = (v[i] + ans)/2
print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v.sort()
ans = v[0]
for i in range(1, n):
    ans = (v[i] + ans)/2
print(ans)

Solution (Python):
n = int(input())
v = list(map(int,input().split()))

for i in range(n-1):
	v.sort(reverse=1)
	a = v.pop()
	b = v.pop()
	ab = (a+b)/2
	v.append(ab)
print(v[0])

Solution (Python):
from decimal import Decimal


n = int(input())
a = [Decimal(c) for c in input().split()]
a.sort()

current_value = a[0]
for i in range(1, len(a)): current_value = (current_value + a[i]) / 2;
print(current_value)

Solution (Python):
n,arr = int(input()),list(map(int,input().split(' ')))
stack = []
arr = sorted(arr)
stack.append(arr[0])
arr.pop(0)
while arr:
    stack.append((stack[-1] + arr[0])/2)
    arr.pop(0)
print(stack[-1])

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
x=(l[0]+l[1])/2
t=2
while(t<n):
    x=(x+l[t])/2
    t+=1
print(x)

Solution (Python):
N = int(input())
V = sorted([int(_) for _ in input().split()])
a = V[0]
for i in range(1, N):
    a = (a + V[i]) / 2
print(a)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))

value = 0
listed_v = sorted(v)
for i in range(N):
    if len(listed_v) > 1:
        value = (listed_v[0] + listed_v[1])/2
        listed_v = [(listed_v[0] + listed_v[1])/2] +  listed_v[2:]
print(value)

Solution (Python):

N = int(input())
Xs_ = sorted(map(int,input().split()))
print(sum([Xs_[i]*(2**(-N+1)) if i == 0 else Xs_[i]* (2**(-N+i)) for i in range(N)]))

Solution (Python):

n = int(input())
V = list(map(int,input().split()))

V.sort(reverse=1)

bunbo = 2
ans = 0

for i in range(n):
    ans += V[i] / bunbo
    bunbo *= 2

print(ans + V[-1]/(bunbo/2))

Solution (Python):

N = int(input())
V = list(map(int, input().split()))
V.sort()
ans = 0
for i in range(N):
    if i == 0:
        ans = V[i]
    else:
        ans = (ans + V[i]) / 2
print(ans)

Solution (Python):
n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()

t = (arr[0] + arr[1]) / 2
for j in range(2, n):
  t = (t + arr[j]) / 2

print(t)

Solution (Python):
N = int(input())
v = list(map(int,input().split()))

v.sort()
nabe = v[0]

for i in v[1:]:
    nabe = (nabe + i)/2
    del v[:2]

print(nabe)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    v = list(map(int, input().split()))
    
    
    v.sort()
    
    s = 0
    pre = 0
    for i, v in enumerate(v):
        if i == 0:
            pre = v
        else:
            s = (pre + v) / 2
            pre = s
    
    print(s)
        
if __name__ == '__main__':
    main()

Solution (Python):
num = int(input())

gu = list(map(int, input().split()))

gu.sort()

ans = gu[0]

for i in gu[1:]:
  ans = (ans + i) / 2



print(ans)