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 sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
N = int(sys.stdin.readline())
list_v = list(map(int, sys.stdin.readline().split()))
list_v.sort()
sum = 0

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

print(sum)

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

V.sort()
result_value=(V[0]+V[1])/2

for n in range(2,N):
    result_value=(result_value+V[n])/2


print(result_value)

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

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

for i in a:
    ans = (ans+i)/2

print(ans)

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

V=sorted(v)

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

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

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

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

tmp = values[0]

for v in values:
  tmp = (tmp+v)/2
print(tmp)

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

Solution (Python):
import heapq
size = int(input())
li = list(map(int,input().split()))
heapq.heapify(li)
while(len(li)>1):
    a = heapq.heappop(li)
    b = heapq.heappop(li)
    heapq.heappush(li,(a+b)/2)
print(li[0])

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

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

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

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

Solution (Python):
import sys

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

def main():
    N = I()
    V = sorted(LI())
    
    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())
v=[int(i) for i in input().split()]
v.sort()
count=v[0]/2**(N-1)
for i in range(1,N):
    count+=v[i]/2**(N-i)
print(count)

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



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

l.sort()

ans=l[0]

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

print(ans)

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

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

Solution (Python):
import heapq

N = int(input())
a = list(map(int,input().split()))
heapq.heapify(a)
while(True):
    if len(a)==1:
        print(a[0])
        break
    s1 = heapq.heappop(a)
    s2 = heapq.heappop(a)
    heapq.heappush(a,(s1+s2)/2)

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

Solution (Python):
n = int(input())
a = sorted([int(x) for x in input().split()],reverse=True)
cum = (a[-1]+a[n-2])/2
for i in range(n-3,-1,-1):
  cum = (a[i]+cum)/2
print(cum)

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

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

prev = (vs[0] + vs[1]) / 2

if N > 2:
    for i in range(2, N):
        prev = (prev + vs[i]) / 2

print(prev)

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

prev = (vs[0] + vs[1]) / 2

if N > 2:
    for i in range(2, N):
        prev = (prev + vs[i]) / 2

print(prev)

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):
N, *V = map(int, open(0).read().split())

V.sort()
a = [V[0]] + [V[i + 1] * 2 ** i for i in range(N - 1)]
print(sum(a) / (2 ** (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[-1])

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

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


sv = sorted(v)






for _ in range(n-1):
    sv[0] = (sv[0]+sv.pop(1))/2
    


print(sv[0])

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

v1 = list(sorted(v))
v2 = list(reversed(v1))
k = 0

for i in range(n):
  k += v2[i] * (2 ** ( -i - 1))

k += v2[n - 1] * (2 ** ( -n)) 

print(k)

Solution (Python):
n = int(input())
V = [int(v) for v in input().split()]
V.sort()
ans = sum(V[:2])/(2**(n-1))
V = V[2:]
for i, v in enumerate(V, start=1):
    ans += v / (2**(n-1-i))
print(ans)

Solution (Python):



a=[]
N=int(input())
a=list(map(int, input().split()))

new_a = sorted(a)
ans=0

for i in range(len(new_a)):
    if i==0:
        ans=new_a.pop(0)
    if len(new_a)!=0:
        ans+=new_a.pop(0)
        ans=ans/2
print(ans)

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

v = sorted(v)

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

print(v[0])

Solution (Python):


input_list = [input() for i in range(2)]

maxNum = int(input_list[0])

nums = [int(i) for i in input_list[1].split(' ')]

nums.sort()

value = 0
is_first_item = True
index = maxNum - 1
for num in nums:
    if is_first_item:
        value = value + num / (2 ** index)
        is_first_item = False
    else:
        value = value + num / (2 ** index)
        index = index - 1

print(value)

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

Solution (Python):
from bisect import insort_left

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


v = sorted(v)

ans = 0

while len(v) > 1:
    v0 = v.pop(0)
    v1 = v.pop(0)

    insort_left(v, (v0+v1)/2)

print(v[0])

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

v.sort()


cnt = v[0]
cntMax = 0 
for i in range(n-1):
  cnt = (cnt+v[i+1])/2
  cntMax = max(cnt,cntMax)
print(cntMax)

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

while len(v) > 1:
  x = v.pop()
  v[-1] = (x + v[-1]) /2
      
print(v[0])

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

Solution (Python):
import functools

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

print(functools.reduce(lambda x, y: (x + y) / 2, V[1:], V[0]))

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):
N = int(input())
v = [int(_) for _ in input().split()]
v = sorted(v)
ans = v[0] / (2**(N-1))
for i in range(1, N):
    ans += v[i] / 2**(N-i)

print(ans)

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

if __name__ == '__main__':
    main()

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

v = sorted(v)
V = (v[0] + v[1])/2

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

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

while len(vl) != 1:
    vl.sort()
    v0 = vl.pop(0)
    v1 = vl.pop(0)
    vl.append((v0 + v1) / 2)

print(vl[0])

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

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

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

V.sort()
A=0

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

  if i >=1:
    A = (A+V[i+1])/2
    
print(A)

Solution (Python):
N = int(input())
value_list = input().split()
new_value_list = []
for v in value_list:
	v = float(v)
	new_value_list.append(v)
new_value_list.sort()


for i in range(N):
	if i == 0:
		new_value = new_value_list[i]
	else:
		new_value = (new_value + new_value_list[i]) / 2
	
	

print(new_value)

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

avg = (v[0] + v[1]) / 2
i = 2

while True:
    if i == len(v):
        break
    else:
        avg = (avg + v[i]) / 2
    i += 1

print(avg)

Solution (Python):
I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))

v = I1()
a = sorted(I2())
res=a[0]
for i in range(1,v):
    res = (a[i]+res) / 2
print(res)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v = sorted(v)
ans = v[0]

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

print(ans)

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

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

Solution (Python):





from sys import stdin,setrecursionlimit


setrecursionlimit(10**6)
input=stdin.readline

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

Solution (Python):
n = int(input())
list1 = [int(i) for i in input().split()]
list1.sort()
while len(list1)>1:
    list1[0]=(list1[0]+list1[1])/2
    list1.pop(1)
print(list1[0])

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

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

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

Solution (Python):
import itertools

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

v.sort(reverse=True)

shadow = v[:]

for i in range(N-1):

  a = shadow.pop()
  b = shadow.pop()

  shadow.append((a+b)/2)
ret = max(ret,shadow[0])

print(ret)

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

list_a.sort()

for m in range(n - 1):
    new = 0
    new += (list_a[0] + list_a[1]) / 2
    del list_a[0:2]
    list_a.append(new)
    list_a.sort()

print(list_a[0])

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

v.sort(reverse=True)

ans = sum([x / 2 ** (i+1) for i, x in enumerate(v[:-1])]) + v[-1] / 2 ** (N - 1)

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




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

if len(nums) == 1:
    print(nums[0])
    exit()

nums = sorted(nums)
avg = nums[0]
for i in range(len(nums) - 1):
    avg = (avg + nums[i + 1]) / 2

print(avg)
exit()

Solution (Python):
import numpy as np
N=int(input())

str_list = input().split(' ')
A = [int(x) for x in str_list]
A = np.array(A)

while len(A)>1:
    first_min = A[A.argmin()]
    
    A = np.delete(A, A.argmin())
    second_min = A[A.argmin()]
    
    A = np.delete(A, A.argmin())
    mean = (first_min+second_min)/2.0
    A = np.append(A, mean)
    
print(mean)

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

Solution (Python):


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

v.sort()

tmp = v[0]

for i in v:
    tmp = (tmp + i) / 2


print(tmp)

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

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

Solution (Python):
from sys import exit, stderr, stdin
input = stdin.readline


def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    N = int(input())
    a = list(map(int,input().split()))

    res = 0
    for _ in range(N-1):
        a = sorted(a, key=lambda x: -x)
        res = (a[-1]+a[-2])/2
        a.pop()
        a.pop()
        a.append(res)
    print(a[0])
if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
v = [int(i) for i in input().split()]
v.sort()
ans = v[0]
for i in v[1:]: ans = (ans+i)*0.5
print(ans)

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

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

print(s)

Solution (Python):
def m():
    N = int(input())
    V = [int(i) for i in input().split()]
    V.sort()
    while len(V) > 1:
        V[0] = (V[0] + V[1]) / 2
        V.pop(1)
    print(V[0])

m()

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

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

s = len(v)

v = [t/2**(s-i) for i, t in enumerate(v)]
v[0] *= 2

print(sum(v))

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

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

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

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

ans = -1
for i in v:
    if ans == -1:
        ans = i
    else:
        ans = ( ans + i ) / 2

print(ans)

Solution (Python):
from heapq import heapify
from heapq import heappop
from heapq import heappush
n=int(input())
v=list(map(int,input().split()))
heapify(v)
ans=0
while len(v)>1:
  s=(heappop(v)+heappop(v))/2
  heappush(v,s)
print(heappop(v))

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

v_L.sort()

result = v_L[0]
for val in range(1,n):
    result = (result + v_L[val])/2

print(result)

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

v_L.sort()

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

result = v_L[0]
for val in range(1,n):
    result = (result + v_L[val])/2

print(result)

Solution (Python):



input() 
ingredients = [int(x) for x in input().split()]

ingredients.sort()
value = ingredients[0]
for ingredient in ingredients:
    value = (value+ingredient) / 2
print(value)

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

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

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

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

ls.sort()
ans=ls[0]
ls.pop(0)
for l in ls:
  ans=(ans+l)/2
print(ans)

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    s = list(map(int, input().split()))
    s.sort()

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

    print(tmp)

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

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

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

s = sorted(s)

for i in range(n-1):
    if c == 0:
        c = (s[i] + s[i+1]) / 2 
    else:
        c = (c + s[i+1]) / 2 

print(c)

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

Solution (Python):
import numpy as np
N = int(input())
v = list(map(int,input().split()))
v.sort()
x = np.zeros(N,dtype = "float64")
for i in range (0,N):
  x[i] = v[i]

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

Solution (Python):
import numpy as np

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

ans = v[0]

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

print(ans)

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
v_lst = [int(v) for v in stdin.readline().rstrip().split()]
v_lst.sort()

while(len(v_lst) > 1):
  v0 = v_lst.pop(0)
  v1 = v_lst.pop(0)
  vn = (v0 + v1) / 2
  v_lst.append(vn)
  v_lst.sort()
  
print(v_lst[0])

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

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

print(v[0])

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

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

print(v[0])

Solution (Python):
N = int(input())
V = [int(x) for x 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):
import heapq
 
n = int(raw_input())
values = map(int, raw_input().split())
values = sorted(values, reverse=True)
 
print sum(((0.5)**(i+1))*v for i, v in enumerate(values)) + ((0.5)**(len(values)))*values[-1]

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

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

count = 0
for i in range(1,num):
    value[i] = (value[i-1]+value[i])/2

print(value[-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.0
print(ans)

Solution (Python):
import numpy as np
N = input()
N = int(N)
V = input().split()
V = [int(V[i]) for i in range(N)]

V = np.array(V)

while len(V) >= 2:
  V = np.sort(V)
  new = (V[0] + V[1]) / 2
  V = np.hstack([V[2:], new])

print(V[0])

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

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

arr.sort()
res = (arr[0]+arr[1])/2
i = 2
while (i < n):
    res = (res+arr[i])/2
    i=i+1
print(res)

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

sorted_v = sorted(v)
while len(sorted_v) > 1:
    sorted_v[0] = (sorted_v[0] + sorted_v[1])/2
    del sorted_v[1]
print(sorted_v[0])

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

def Alch(arr):
  arr.sort()
  n1 = arr[0]
  n2 = arr[1]
  new_val = (n1 + n2) / 2
  arr[1] = new_val
  return arr[1:]

for i in range(n-1):
  arr = Alch(arr)

print(arr[0])

Solution (Python):
_=input()
li=list(map(int,input().split()))

li.sort()
result=li[0]
for i in li:
  result+=i
  result/=2
print(result)

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

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

print(ans)

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

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

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

print(sam)

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

v_arr.sort()
tmp = v_arr[0]
for i in range(1,N):
    tmp = (tmp+v_arr[i])*0.5

print(tmp)

Solution (Python):
if __name__ == "__main__":

    n = int(input())
    a_list = map(int, input().split())
    a_list_sorted = sorted(a_list)
    
    sum = (a_list_sorted[0] + a_list_sorted[1])/2 
    for i, a in enumerate(a_list_sorted):
        if i >= 2:
            sum = (sum + a)/2

    print('{0}'.format(sum))

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

v.sort()

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

n=N
s=V[0]/(2**n)
for i in V :
  I=i/(2**n)
  s+=I
  n-=1
  
print(s)

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

v.sort()

son = v[0]

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

print(son)

Solution (Python):
def main(v=[]):
    v.sort()

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

    print(pre)


if __name__ == "__main__":
    n = int(input())
    v = list(map(int, input().split()))

    main(v)

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

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

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

list.sort()
avg = 0
for num in list:
    if avg == 0:
        avg = num
    else:
        avg = (num + avg) / 2
print(avg)

Solution (Python):
N = int(input())
vs = sorted(map(int, input().split(" ")), reverse=True)
 
r = [v * (0.5 ** (i + 1)) for i, v in enumerate(vs)]
r [-1] = r[-1] * 2
print(sum(r))

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

print(s)

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

if(n>1):
    
    list1.sort()
    

    
    

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

    print(tmp)

else:
    print(list1[0])

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 = (ans + v[i])/2
print(ans)

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
while len(l) > 1:
  l[1] = (l[0]+l[1])/2
  l.remove(l[0])
print(l[0])

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

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

v = sorted(v)

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

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

for i in range(N-1):
  k = min(V)
  V.remove(min(V))
  l = min(V)
  V.remove(min(V))
  V.append((k + l) / 2)
  
print(V[0])

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

v.sort()

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

print(v[0])

Solution (Python):
a = int(input())
n = list(map(int, input().split()))
b=sorted(n,reverse=True)
ans=0
for i,j in enumerate (b):
    if i < a-1:
        ans += j*((1/2)**(i+1))
    if i ==a-1:
        ans += j*((1/2)**(i))
print(ans)

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

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

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

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

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

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

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

vs.sort()

if N == 2:
    print((vs[0] + vs[1]) / 2)
    exit()

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

print(x)

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

Solution (Python):
N = int(input())
arr = list(map(lambda n: int(n), input().split()))
sorted_arr = sorted(arr)
s = 0

for n in range(N):
    if n == 0:
        continue
    elif n == 1:
        s = (sorted_arr[0] + sorted_arr[1])/2
    else:
        s = (s + sorted_arr[n])/2

print(s)

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

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

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())
a = list()
for elem in input().split(' '):
    a.append(int(elem))
    
a.sort()
sum = 0
for member in a:
    if sum ==0:
        sum = member
    else:
        sum = (sum + member)/2
print(sum)

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

V = sorted(V)

ans = 0

for v in V:
    if ans == 0:
        ans = v
    else:
        ans = (ans + v) / 2
        
print(ans)

Solution (Python):
N = int(input())
val = [int(x) for x in input().split()]
val.sort()
for n in range(N-1):
    a = val.pop(0)
    b = val.pop(0)
    val.append((a+b)/2)
    val.sort()
print(val[0])

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

Solution (Python):
n = int(input())
v_list = [int(v) for v in input().split(" ")]
v_list.sort(reverse=True)
sum = 0
for i in range(len(v_list)):
    if i+1 < len(v_list):
        sum += v_list[i]/(2**(i+1))
    else:
        sum += v_list[i]/(2**i)
print(sum)

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

while len(Vlist) > 1:
	Vlist.sort()
	Vlist[0]=(Vlist[0]+Vlist[1])/2
	Vlist[1] = 0
	Vlist.remove(0)

print(Vlist[0])

Solution (Python):
n1 = int(input())
n2 = list(map(int, input().split()))
n3 = sorted(n2)
n3.reverse()
n4 = [n3[i]*(1/2**(i+1)) for i in range(len(n3))]
n5 = n3[(len(n3) - 1)]*(1/2**(len(n3)))
print(sum(n4) + n5)

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

vl.sort()
ans=(vl[0]+vl[1])/2.0

for i in range(2,n) :
  ans=(ans+vl[i])/2.0
print('{:.7f}'.format(ans))

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


def minIdx(li):
    min = 0
    for num in li:
        min = li.index(num) if num < li[min] else min
    return min


while len(V) != 1:
    x = (V.pop(minIdx(V)) + V.pop(minIdx(V))) / 2
    V.append(x)

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):
from functools import reduce

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

v.sort()
answer = reduce(lambda x, y: (x + y) / 2, v)
print(answer)

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

A.sort()

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