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):
from heapq import heapify,heappop,heappush
N = int(input())
V = list(map(int,input().split()))
heapify(V)
while len(V) > 1:
    a = heappop(V)
    b = heappop(V)
    heappush(V,(a+b)/2)
print(V[0])

Solution (Python):
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    N = INT()
    V = sorted(LIST())
    tmp = V[0]
    for i in range(1, N):
        tmp = (tmp + V[i])/2
    print(tmp)

if __name__ == '__main__':
    main()

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

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

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

A = int(input())
L = [int(v) for v in input().split()]
L.sort()

for i in range(A - 1):
    L[i] = (L[i] + L[i + 1]) / 2
    L[i + 1] = 0

    L.sort()

print(L[-1])

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

v_s = sorted(v)

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

print(tmp)

Solution (Python):
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''

gi = lambda : list(map(int,input().split()))
n, = gi()
l = sorted(gi())
ans = l[0]
for k in range(1, n):
	ans = (ans + l[k]) / 2
print(ans)

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

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

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

ans=(v[0]+v[1])*0.5
if n==2:
    print(ans)
else:
    for i in v[2:]:
        ans=(ans+i)*0.5
    print(ans)

Solution (Python):
n = int(input())
b = [float(i) for i in input().split()]
b.sort()
c = 0

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

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

Solution (Python):
import sys
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.append((ans[-1] + V[i]) / 2)
print(ans[-1])

Solution (Python):
from functools import reduce

N = int(input())
A = map(float, input().split())

A = sorted(A)

A = reduce(lambda x, y: (x + y) / 2, A)

print(A)

Solution (Python):
import sys
mod = 1000000007
def get_array(): return list(map(int, sys.stdin.readline().split()))
def get_ints(): return map(int, sys.stdin.readline().split())
def input(): return sys.stdin.readline()
def main():
    n = int(input())
    v = get_array()
    v.sort()
    s = (v[0] + v[1])/2
    for i in range(2, n):   s = (s + v[i])/2
    print(s)
if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
v_list=[int(x) for x in input().split()]
v_sort=sorted(v_list)
        
for i in range(N):
    if len(v_sort)<2:
        break
    else:
        v_sort=[(v_sort[0]+v_sort[1])/2]+v_sort[2:]

print(v_sort[0])

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

ans = 0
for i in range(len(V)-1):
    if i ==0:
        ans = (V_sort[i] + V_sort[i+1])/2
    else:
        ans = (ans + V_sort[i+1])/2
print(ans)

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

s = v[0] / (2 ** (N - 1))
s += sum(v[1 + n] / (2 ** (N - 1 - n)) for n in range(N - 1))
print(s)

Solution (Python):
N=int(input())
V=sorted(map(int,input().split()))
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()))

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

print(v[0])

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

v.sort()

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

print(s)

Solution (Python):
import sys

def resolve():
    N = int(input())
    V = list(map(int, input().split()))
    V.sort()
    tmp = 0
    for v in V:
        if tmp == 0:
            tmp = v
        else:
            tmp = (tmp + v) / 2.0

    print(tmp)


if __name__ == "__main__":
    resolve()

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

v.sort()

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

print(v[0])

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v1 = sorted(v, reverse = True)
sum1 = 0

for i in range(N-1):
  value = v1[i]/(2 ** (i+1))
  sum1 += value

sum1 += v1[-1]/(2 ** (N-1))

print(sum1)

Solution (Python):
def c_alchemist():
    N = int(input())
    V = [int(i) for i in input().split()]
    v = sorted(V, reverse=True)
    while len(v) > 1:
        x = v.pop()
        y = v.pop()
        v.append((x + y) / 2)
    return sum(v)

print(c_alchemist())

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

v.sort()
count = v[0]

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

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

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

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

Solution (Python):
from heapq import *

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

heapify(vl)
for i in range(n-1):
    x=heappop(vl)
    y=heappop(vl)
    heappush(vl,(x+y)/2)
print(sum(vl))

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

sorted_v = sorted(v)

cook = sorted_v[0]

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

print(cook)

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

V = sorted(V)

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

print(ans)

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

Solution (Python):
n = int(input())
b = [float(i) for i in input().split()]
b.sort()
c = 0

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

Solution (Python):

n = int(input())
v = sorted(map(int, input().split()))
s = v[0]
for x in v[1:]:
    s = (s + x) / 2
print(s)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

i  = lambda: int(input())
li = lambda: list(map(int, input().split()))

N = i()
V = sorted(li())

count = (V[0] + V[1]) / 2

for i in range(2, N):
  count = (count + V[i]) / 2

print(count)

Solution (Python):
from collections import deque

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

V = deque(v)
while len(V) > 1:
    a = V.popleft()
    b = V.popleft()
    V.appendleft((a + b) / 2)

print(V.pop())

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

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

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

print(ans)

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

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


A.sort()

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

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

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

Solution (Python):

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

V.sort()
val = V[0]
for v in V[1:]:
    val = (val+v)/2
print(val)

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

Solution (Python):
import numpy as np
N = int(input())
v_lst = list(map(int, input().split()))

v_lst.sort()
ans = (v_lst[0] + v_lst[1])/2

for i in range(2, N):
    ans = (ans + v_lst[i])/2

print(ans)

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

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

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.sort()
ans=0

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

print(v[n-1])

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

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

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

print(ans)

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

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

print(res)

Solution (Python):
n=int(input())
s=0.0
p=input().rstrip().split(' ')
p.sort(key=int)
i=0;
while(i<len(p)):
    if i==0:
        A=int(p[i])
        B=int(p[i+1])
        F=(A+B)/2;
        i+=2;
    else:
        F=(F+int(p[i]))/2;
        i+=1;
print(F)

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

Vs.sort()
for i in range(1, N):
    Vs[0] = (Vs[0] + Vs[1]) / float(2)
    Vs.pop(1)
    Vs.sort()
print(Vs[0])

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

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

print(a[0])

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

for i in range(n-1):
    v[0] = (v[0]+v[1])/2
    v[1] = 1001
    v.sort()
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())
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):
from functools import reduce


def ave(a, b):
    return (a + b) / 2


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

v.sort()

print(reduce(ave, v))

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

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

print(t)

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

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

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

print(ans)

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

Solution (Python):
class HeapQueue:
    """
    q = HeapQueue()
    q.append(p, v)
    v = q.pop()
    """
    from heapq import heappop, heappush, heappushpop, heapreplace

    def __init__(self, reverse=False):
        self.reverse = reverse
        self.heap = []

    def __len__(self):
        return len(self.heap)

    def append(self, p, v):
        self.heappush(self.heap, (-p if self.reverse else p, v))

    def appendpop(self, p, v):
        return self.heappushpop(self.heap, (-p if self.reverse else p, v))

    def popappend(self, p, v):
        return self.heapreplace(self.heap, (-p if self.reverse else p, v))

    def pop(self):
        return self.heappop(self.heap)[1]

    def front(self):
        return self.heap[0][1]


N = int(input())
v = [int(s) for s in input().split()]
q = HeapQueue()
for vi in v:
    q.append(vi, vi)
while len(q) > 1:
    a = q.pop()
    b = q.pop()
    v = (a + b) / 2
    q.append(v, v)
print(q.pop())

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	N = inputInt()
	A = inputList()

	A.sort()
	ans = 0
	for i,val in enumerate(A):
		if i == 0:
			ans = val
			continue

		ans = (ans + val) / 2

	print(ans)


if __name__ == "__main__":
	main()

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

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

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

def main():
    N = int(input())
    
    v = sorted(list(map(int, input().split())), reverse=True)
    
    ans = 0
    tmp = 2
    for i in range(N-1):
        ans += v[i]/tmp
        if i == N-2:
            ans += v[i+1]/tmp
        tmp *= 2
    print(ans)

if __name__ == "__main__":
    main()

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

Solution (Python):

def main():
    N = int(input())
    V = sorted(map(int, input().split()))
    ans = (V[0] + V[1]) / 2
    for i in V[2:]:
        ans = (ans + i) / 2
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
a=list(map(int,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()
ans = v[0]
for i in v[1:]:
  ans = (ans + i) / 2
print(ans)

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

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())
Vs = [int(i) for i in input().split(" ")]
Vs.sort()
ans = (Vs[0] + Vs[1]) / 2
for v in Vs[2:]:
    ans = (ans + v) / 2
print(ans)

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

m.sort()

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

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n = ri()
    lv = rli()
    lv.sort()
    ans = lv[0]
    for i in range(1, n):
        ans = (lv[i]+ans)/2
    print(ans)



if __name__ == '__main__':
    main()

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

vs = list(reversed(sorted(vs)))

while len(vs) >= 2:
    v1 = vs.pop()
    v2 = vs.pop()
    v = (v1 + v2) / 2.0
    vs.append(v)
print(vs[0])

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):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
v = LIST()

v.sort()
ans = (v[0]+v[1])/2
for i in range(N):
	if i==0 or i==1:
		continue
	else:
		ans = (ans + v[i])/2
print(ans)

Solution (Python):
N=int(input())
A=list(map(int,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()
ans = v[0]
for i in range(N - 1):
    ans = (ans + v[i + 1]) / 2
print(ans)

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

ans = A[0]
for a in A[1:]:
  ans = (ans + a) / 2
print(ans)

Solution (Python):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N = readInts()[0]
  V = readInts()
  V.sort()

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

if __name__ == "__main__":
  main()

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	N = inputInt()
	A = inputList()

	A.sort()
	ans = 0
	for i,val in enumerate(A):
		if i == 0:
			ans = val
			continue

		ans = (ans + val) / 2

	print(ans)


if __name__ == "__main__":
	main()

Solution (Python):
from collections import deque

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

L = sorted(L)
q = deque(L)

while len(q) > 1 :
    a = q.popleft()
    b = q.popleft()
    x = a+b
    x /= 2
    q.appendleft(x)
print(q.popleft())

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

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

lst.sort()
for i in range(n):
    if i==0:
        ans = lst[i]
    else:
        ans = (ans + lst[i]) / 2
print(ans)

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

while len(v) > 1:
    x = v.pop(0)
    y = v.pop(0)
    z = (x + y) / 2
    v.append(z)
    v.sort()

print(v[0])

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

Solution (Python):

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

r = vl[0]
for i in range(1,n):
    y = vl[i]
    r = (r+y)/2
print(r)

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

N = int(input())
v = list(map(int, input().split()))
v.sort(reverse=True)
while len(v) != 1:
    a = v.pop()
    b = v.pop()
    v.append((a+b)/2)
    v.sort(reverse=True)
print(v[0])

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

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

print(result)

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

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

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

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

print(v)

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

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

print(current_num)

Solution (Python):
import heapq

def sol():
    N = int(input())
    A = list(map(int, input().split()))

    hq = []
    for a in A:
        heapq.heappush(hq, a)

    while len(hq) > 1:
        x = heapq.heappop(hq)
        y = heapq.heappop(hq)
        new = (x + y) / 2
        heapq.heappush(hq, new)

    ans = heapq.heappop(hq)
    print(ans)


sol()

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

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

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())
Vn = sorted(map(int,input().split()))
ans = 0
advancenum = Vn[0]
for v in range(1,len(Vn)):
    num=(advancenum+Vn[v])/2
    advancenum = num
    ans=num
print(ans)

Solution (Python):
class Solution:
    def main(self):
        N = int(input())
        v = list(map(int, input().split()))
        v = sorted(v)
        res = v[0]
        for i in range(1, N):
            res = (res + v[i]) / 2

        print(res)


if __name__ == '__main__':
    Solution().main()

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

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

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):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right
from heapq import heappush, heappop

import re

from scipy.misc import comb





def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 


def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]



def main():
    N = i_inpl()
    v = l_inpl()
    v.sort()
    tmp = (v[0] + v[1])/2
    for vi in v[2:]:
        tmp = (tmp + vi)/2
    print(tmp)

if __name__ == "__main__":
    main()

Solution (Python):

N=int(input())

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



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

print(V[N-1])

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

val = a[0]
for item in a[1:]:
    val = (val + item) / 2.0
print(val)

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

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

Solution (Python):
import math
import fractions
import copy
import numpy as np
import heapq
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""

def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
n = ip()
a = iprow()
a.sort()
s = 0
for i in range(n-1):
    s = a[i]+a[i+1]
    s/=2
    a[i+1]  = s
print(a[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(float, input().split()))

v.sort()

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

Solution (Python):
import heapq
heappop=heapq.heappop
heappush=heapq.heappush
n=int(input())
V=list(map(int,input().split()))
V.sort()
for _ in range(n-1):
    a=heappop(V)
    b=heappop(V)
    heappush(V,(a+b)/2)
print(V[0])

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

for _ in range(n-1):
  v.sort()
  v[:2]=[sum(v[:2])/2]
print(v[0])

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    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

    return ans


if __name__ == '__main__':
    print(main())

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

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

value = V.__iter__().__next__()

for v in V: value = (v + value) / 2

print(value)

Solution (Python):

import sys, math, fractions, itertools, collections, copy, heapq


def solve(N: int, v: "List[int]"):
    v.sort()
    c = (v[0] + v[1]) / 2
    for vv in v[2:]:
        c = (c+vv)/2
    print(c)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    v = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, v)

if __name__ == '__main__':
    main()

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

sum = 0
index=0
while index < len(listV):
    if index == 0:
        sum = (listV[index]+listV[index+1])/2
        index+=2
    else:
        sum = (sum+listV[index])/2
        index+=1
print(sum)

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 = sorted(list(map(int, input().split())))
ans = a.pop(0)
for i in a: ans = (ans+i)/2
print(ans)

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
import fractions
from functools import reduce
def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


n = onem()

a = l()

a.sort()

k = a[0]

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

print(k)

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

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

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

t = v[0]
for a in v[1:]:
    t = (t + a) / 2

print(t)

Solution (Python):
N = int(input())
vs = sorted([int(s) for s in input().split()])

t = vs[0]
for v in vs[1:]:
    t = (t + v) / 2

print(t)

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