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):
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[-1])

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

V = sorted(v)

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

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

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

a = (arr[0]+arr[1])/2

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

print(a)

Solution (Python):
import heapq
n=int(input())
v=list(map(int,input().split()))
heapq.heapify(v)
for i in range(n-1):
    a=heapq.heappop(v)
    b=heapq.heappop(v)
    heapq.heappush(v,(a+b)/2)
ans=heapq.heappop(v)
print(ans)

Solution (Python):
import numpy as np

N = int(input())
v = list(map(int, input().split()))
v_sort = np.array(np.sort(v))
x = np.zeros(N)
x[0] = 2**(N-1)
for i in list(range(1,N)):
    x[i] = 2**(N-i)
y = v_sort/x
print(sum(y))

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

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

while len(V) > 1:
    V.append((V.pop(0) + V.pop(0)) / 2)
    V = sorted(V)

print(*V)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce


import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n = I()
V = LI()
V.sort()
tmp = V[0]
for v in V:
    tmp = (tmp + v) / 2

print(tmp)

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

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())
v = [int(i) for i in 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 = list(map(int,input().split()))

v.sort()

value = v[0]

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

print(value)

Solution (Python):

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


max_v=0
for i in range(n-1):
    max_v+=v[i]*((0.5)**(i+1))

max_v+=v[-1]*0.5**(n-1)
print(max_v)

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

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


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

print(v_list[-1])

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

sum = 0
a = 0

if N == 1:
    sum += v_list[0]

elif N == 2:
    sum += (v_list[0] + v_list[1])/2

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

Solution (Python):

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

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

s=sorted(v)

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

print(cnt)

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

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

a = sorted(a,reverse=True)
while len(a)>1:
  a.append((a.pop()+a.pop())/2)
print(a[0])

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

ans =v[0]

for i in range(n-1):
        ans = (ans + v[i+1])/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[i+1])/2
print(A)

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

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

v = sorted(v, reverse=True)

while True:
    l = len(v)
    a = v.pop()
    b = v.pop()
    mid = (a+b)/2
    v.append(mid)
    v = sorted(v, reverse=True)
    if l==2:
        break

print(sum(v))

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 = sorted(V)
a = (0.5**(N-2))*V[0]
for i in range(1,N):
  a = a + (0.5**(N-i-1))*V[i]
  
print(0.5*a)

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

V.sort()

ans = 0
ans += V[0]/(2**(N-1))

for i in range(1,N):
  ans += V[i]/(2**(N-i))

print(ans)

Solution (Python):


N = int(input())
V = sorted([int(v) for v in input().split()])
while len(V) != 1:
    v1 = V.pop(0)
    v2 = V.pop(0)
    V = [(v1 + v2) / 2] + V

print(V[0])

Solution (Python):
import heapq

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

heapq.heapify(v)

res = 0
for _ in range(N-1):
  a = heapq.heappop(v)
  b = heapq.heappop(v)
  res = (a+b)/2
  heapq.heappush(v, res)
    
print(res)

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

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

    print(_v)


resolve()

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):
n=int(input())
v=list(map(int,input().split()))

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

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

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

v.sort()

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

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

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

while len(v) > 1:
    v = [(v[0] + v[1]) / 2] + v[2:]

print(v[0])

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

v = sorted(v)



values = [v[i]/(2**(N-i)) for i in range(N)]
values[0] = values[0]*2
print(sum(values))

Solution (Python):
import sys, heapq

N = int(input())
V = list(map(int, sys.stdin.readline().split()))

heapq.heapify(V)

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

print(V[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())
vi=list(map(int,input().split()))
vn=sorted(vi)
s=(vn[0]+vn[1])/2
if n>2:
    for i in range(2,n):
        s=(s+vn[i])/2
print(s)

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

C = sorted(V)

ans = 0
a = C[0]
for i in range(1, N):
    a = (a + C[i]) / 2
ans = max(ans, a)
print(ans)

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



for i in range(N-1):
    V[0] = (V[0] + V.pop(1))/2
    V = sorted(V)

print(V[0])

Solution (Python):
n=int(input())
vs=list(map(int,input().split()))
while not len(vs)==1:
    vs.sort()
    a=vs.pop(0)
    b=vs.pop(0)
    t=(a+b)/2
    vs.append(t)
print(vs[0])

Solution (Python):
def main():
    N = int(input())
    v = [int(x) for x in input().split()]
    while len(v) > 1:
        v.sort()
        a = v[0]
        b = v[1]
        v.pop(0)
        v.pop(0)
        new = (a + b) / 2
        v.append(new)
    print(v[0])


if __name__ == "__main__":
    main()

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

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

print(v[0])

Solution (Python):
def main():
    N = int(input())
    values = list(map(int, input().split(' ')))
    values.sort(reverse=True)
    div = 1
    answer = 0
    for v in values[:-1]:
        div *= 2
        answer += v / div
    answer += values[-1] / div
    print(answer)


if __name__ == '__main__':
    main()

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

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    
    
    n=int(readline())
    vv=list(map(int, readline().rstrip().split()))
    vv.sort()
    for i in range(1,n):
        vv[i]=(vv[i-1]+vv[i])/2
    print(vv[n-1])
    
    

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

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

for i in range(n-2):
 h = (h+v[i+2])/2

print(h)

Solution (Python):
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):
import heapq

n = int(input())
v = list(map(int, input().split()))
heapq.heapify(v)
while len(v) > 1:
  x = heapq.heappop(v)
  y = heapq.heappop(v)
  heapq.heappush(v, (x + y) / 2.0)

res = heapq.heappop(v)
print("{:.6f}\n".format(res))

Solution (Python):
import math

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

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

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

Solution (Python):

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

v.sort()

x=(v[1]+v[0])/2
if n>=3:
    for i in range(2,n):
        x=(v[i]+x)/2
    
print(x)

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

vs = sorted(v)

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


print(v_pair)

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

newa = sorted(a)
ans = newa[0]

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

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline


def read():
    N = int(input().strip())
    V = map(int, input().strip().split())
    return N, V
    

def solve(N, V):
    V = list(sorted(V))
    ans = V[0]
    for v in V:
        ans = (ans + v) / 2
    return ans


if __name__ == '__main__':
    inputs = read()
    print("{}".format(solve(*inputs)))

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

for i in range(len(v)):
    if i == 0:
        a = v[i]
    else:
        a = (a+v[i])/2
print(a)

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

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

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

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 6)





















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

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

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

while len(A) > 1:
    A = sorted(A)
    x = A[0]
    y = A[1]
    del A[0:2]
    A.append((x+y)/2)

print(A[0])

Solution (Python):
N = int(input())
*v, = map(int, input().split())
for _ in range(N - 1):
    min_v = min(v)
    v.remove(min_v)
    min_v_2 = min(v)
    v.remove(min_v_2)
    v.append((min_v + min_v_2) / 2)
print(*v)

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

v_n = sorted(v_n)

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

print(res)

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

Solution (Python):

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

v.sort()
v.reverse()

for i in range(1, N):
  if i < N-1:
    value += v[i-1] / (2**i)
  else:
    value += (v[i-1] + v[i]) / (2**i) 

print(value)

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):
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
mix = lambda x:list(li() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))

def main(n,v):
    v = sorted(v)
    res = (v[0]+v[1])/2
    for i in range(2, n):
        res = (res + v[i]) / 2
    print(res)

n = ii()
v = mi()
main(n,v)

Solution (Python):
import sys
import math
from collections import Counter
import itertools
import fractions



def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")


 
N=II()
V=LI()
V.sort()

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

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

v.sort()
v.reverse()
while(len(v)>1):
    v.append((v.pop()+v.pop())/2.0)
print(v[0])

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

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

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

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

vals = sorted(vals)

val = vals[0]
for i in range(1,N):
    val = (val + vals[i]) / 2.0
print(val)

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
v = LIST()
v.sort()
ans = v[0]

for x in v:
	ans = (ans+x)/2

print(ans)

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

ans = v_l[0]
for i in range(1,n):
    ans = (ans+v_l[i])/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, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
v = LIST()
v.sort()

for i in range(1, N):
	v[i] = (v[i-1] + v[i])/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 = (ans+v[i])/2

print(ans)

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



n = N -2

while n >= 0:
  n += -1
  V.sort()
  result = (V[0] + V[1])/2
  del V[0:2]
  V.append(result)
 
  
print(result)

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

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


for i,v in enumerate(V):
  if i==0:
    ave=v
  else:
    ave=(ave+v)/2
    
print(ave)

Solution (Python):
n = int(input())
ls = list(map(int,input().split()))
ls.sort()
a = 0
for i in range(n):
    if i == 0:
        a += ls[i]
    else:
        a += (2 ** (i - 1)) * ls[i]

b = a / (2 ** (n - 1))
print(b)

Solution (Python):
n=int(input())
v=sorted(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())
v=[int(i) for i in input().split()]
v.sort()
avg=v[0]
for i in range(1,N):
    avg=(v[i]+avg)/2
print(avg)

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

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

print(temp)

Solution (Python):


n=int(input())
arr=list(map(int,input().split()))
while len(arr)>1: 
 arr=sorted(arr) 
 v1=arr.pop(0) 
 v2=arr.pop(0)
 arr.append((v1+v2)/2)
print(arr[0])

Solution (Python):
from decimal import Decimal

n = int(input())

v = [0] * n

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

v.sort()
sum = Decimal(v[0])
for i in range(len(v) - 1):
    sum += v[i + 1]
    sum /= 2
print(sum)

Solution (Python):
N=int(input())
v=list(map(float,input().split())) 
v.sort()
for i in range(N):
    v[i]/=2**(N-i)

print(sum(v)+v[0])

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

arr=list(map(int,input().split()))
arr.sort()
arr.reverse()
from collections import deque 
st = deque()
for i in arr:
  st.append(i)
while(len(st)!=1):
    x=st.pop()
    y=st.pop()
    st.append((x+y)/2)
print(st.pop())

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

Solution (Python):
N = int(input())
list = input().split(' ')
list = [int(i) for i in list ]

list.sort()
while len(list) > 1:
    
    list.sort()
    x = (list[0] + list[1]) / 2.0
    list.append(x)
    del list[:2]
print('{:.08f}'.format(list[0]))

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

a = 0
lis = []

while n-1 != 0:
  for i in range(2):
    lis.append(min(l))
    l.remove(min(l))
  a = sum(lis)/2
  del lis[:]
  l.append(a)
  n-=1
print(a)

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()
res=v[0]/(2**(n-1))
for i in range(1,n):
	res += v[i]/(2**(n-i))
print(res)

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())
A = list(map(int, input().split()))
A.sort()
while len(A)>=2: 
    X = (A[0]+A[1])/2
    A.pop(0)
    A.pop(0)
    A.append(X)
    A.sort()
else:
    print(A[0])

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

for i in range(n-2):
    V[2+i] *= 2**(i+1)
    
print(sum(V)/(2**(n-1)))

Solution (Python):
n=int(input())
v = [int(_) for _ in input().split()]
v.sort()
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()

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())
V=sorted(list(map(int,input().split())))
while len(V)!=2:
    a=(V[0]+V[1])/2
    V.pop(0)
    V.pop(0)
    V.insert(0,a)
print((V[0]+V[1])/2)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
ans=0
v.sort()
ans=(v[0]+v[1])/2
del v[:2]
while v!=[]:
    ans=(ans+v[0])/2
    del v[0]
print(ans)

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

Solution (Python):
n = int(input())
li = list(map(int, input().split()))
for _ in range(n-1):
  li.sort(reverse=True)
  a = li.pop()
  b = li.pop()
  li.append((a+b)/2)
print(*li)

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

A = v[0]

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

Solution (Python):
def resolve():
    n=int(input())
    l=list(map(int, input().split()))
    l.sort()
    while len(l)>=2:
        a=(l[0]+l[1])/2
        l.pop(1)
        l.pop(0)
        l.append(a)
        l.sort()
    print(l[0])
resolve()

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()

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 = sorted(v)
for i in range(n-1):
    if i == 0:
        a = (v[0]+v[1])/2
    else:
        a = (a+v[i+1])/2
print(a)

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

Solution (Python):


n = int(input())
v = list(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):
n = int(input())
v = list(map(int,input().split()))
while len(v)!= 1:
    v.sort()
    v.append((v[0]+v[1])/2)
    v = v[2:]
print(v[0])

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 

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

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

Solution (Python):
import heapq
n=int(input())
s=list(map(int,input().split()))
heapq.heapify(s)
while len(s)!=1:
    a=heapq.heappop(s)
    b=heapq.heappop(s)
    heapq.heappush(s,(a+b)/2)
print(heapq.heappop(s))

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



main()

Solution (Python):

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

V = sorted(v)

sum = 0

if N >= 3:
  for i in range(N-1):
    sum += (2**(i))*V[i+1]/2**(N-1)
  sum += V[0]/2**(N-1)

elif N == 2:
  sum = (V[0]+V[1])/2

print(sum)

Solution (Python):
N = int(input())
v = list(map(int,input().split()))
V = sorted(v)
sum = 0
if N >= 3:
  for i in range(N-1):
    sum += (2**(i))*V[i+1]/2**(N-1)
  sum += V[0]/2**(N-1)

elif N == 2:
  sum = (V[0]+V[1])/2

print(sum)

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

dct = sorted(v, reverse=False)

ans = 0
for i in range(N-1):
    if i == 0:
        ans = (dct[i] + dct[i+1]) / 2
    if i > 0:
        ans = ( ans + dct[i+1]) / 2
    
print(ans)

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
v = LI()
vs = sorted(v)

def kati(x,y):
    return (x+y)/2

result = vs[0]
cv = 0
for i in range(1, n):
    result = kati(result, vs[i])

print(result)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v.sort()
x = n
while x > 1:
    v.append((v[0] + v[1]) / 2)
    v.pop(0)
    v.pop(0)
    v.sort()
    x = len(v)
print(v[0])

Solution (Python):


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

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

print(ans)

Solution (Python):
import heapq
n = int(input())
v = list(map(int, input().split()))
heapq.heapify(v)
count = 0
ab = 0
while count < n-1:
    a = heapq.heappop(v)
    b = heapq.heappop(v)
    ab = (a+b)/2
    heapq.heappush(v, ab)
    count += 1

ans = ab
print(ans)

Solution (Python):
n,*v=map(int,open(0).read().split())
v=sorted(v)[::-1]
v1=v.pop()
v2=v.pop()
ans=(v1+v2)/2
while v:
  ans=(ans+v.pop())/2
print(ans)

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

sortedV=sorted(V)
while len(sortedV)>=2:
    new=(sortedV.pop(0)+sortedV.pop(0))/2
    sortedV.append(new)
    sortedV=sorted(sortedV)

print(*sortedV)

Solution (Python):
n=int(input())
m=list(map(int,input().split()))
m.sort()
m=m[::-1]
ans=0

for i in range(n-1):
  ans+=m[i]*(0.5)**(i+1)
  
ans+=m[n-1]*0.5**(n-1)
  
print(ans)

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

h = sorted(H, reverse=True)
ans = h.pop()

for i in range(N-1):
    ans = (ans + h.pop())/2

print(ans)

Solution (Python):
from collections import deque

N = int(input())
H = deque(map(int, input().split()))

h = deque(sorted(H))

ans = h.popleft()
for i in range(N-1):
    ans = (ans + h.popleft())/2

print(ans)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
for i in range(N-1):
  min1 = 0
  min2 = 0
  min1 = min(V)
  V.remove(min(V))
  min2 = min(V)
  V.remove(min(V))
  mix = 0
  mix = (min1+min2)/2
  V.append(mix)
print(*V)

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

b.sort()


def calc(x,y):
    return (x+y)/2


res=calc(b[0],b[1])


for i in range(2,n):
    res=calc(res,b[i])

print(res)

Solution (Python):

def calc(listv):
    total=0
    total += (listv[0]+listv[1])/2
    list_l=len(listv)
    i = 2
    while(list_l >2):
        total += listv[i]
        total /= 2
        list_l -= 1
        i+=1
    return total

n=int(input())
ans=0
v=list(map(int,input().split()))
v.sort()
"""
if n>2:
    for i in range(2,n):
        ans=(v[0]+v[1])*(2**(-n+1))+v[i]*(2**(-n+i))
else:
    ans=(v[0]+v[1])*(2**(-n+1))
"""
ans = calc(v)
if ans-int(ans)==0:
    print(int(ans))
else:
    print(ans)

Solution (Python):
def main():
    n = int(input())
    v = sorted(list(map(int,input().split())))
    ans = 0
    for i in range(n):
        if i==0 or i==1:
            ans += v[i]*(0.5)**(n-1)
        else:
            ans += v[i]*(0.5)**(n-i)
    print(ans)

if __name__ == "__main__":
    main()

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

Solution (Python):
n=int(input())
L=list(map(int,input().split()))
L.sort()
score=-1
for i in L:
  if score==-1:
    score=i
    continue
  score=(score+i)/2
print(score)