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



Sample input:
2
3 4


Sample output:
3.5

Submission status: Wrong Answer

Solution code:
s=int(input())
a=list(input().split())
a.sort()
b=[]
b.append((int(a[0])+int(a[1]))/2)
total=0
for i in range(s-2):
  b.append((b[i]+int(a[i+2]))/2)
  
print(b[s-2])

Submission status: Wrong Answer

Solution code:
s=int(input())
a=list(input().split())
a.sort()
b=[]
b.append((int(a[0])+int(a[1]))/2)
total=0
for i in range(s-2):
  b.append((int(b[i])+int(a[i+2]))/2)
  
print(b[s-2])

Submission status: Wrong Answer

Solution code:
s=int(input())
a=list(input().split())
a.sort()
b=[]
b.append((int(a[0])+int(a[1]))/2)
total=0
for i in range(s-2):
  b.append((int(b[i])+int(a[i+2]))/2)
  
print(b)

Submission status: Wrong Answer

Solution code:
#AtCoder

import sys
import math
import itertools

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

while len(V) != 1:
	V[1] = (V[0]+V[1])/2
	V.pop(0)

print(V[0])


"""

"""

Submission status: Wrong Answer

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

a.reverse()

answer = 0.0
for i in range(0, len(a)-1):
  a[i+1] = (a[i] + a[i+1]) / 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = list(map(int, input().split()))
num = 0
a.sort()
tem = math.ceil(n/2)

if n%2 != 0:
    for i in range(n-1):
        num += a[i]
    print((num/(2**tem))+(a[-1]/2))
else:
    print(sum(a)/(2**tem))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
num = 0
a.sort()
tem = round(n/2)

if n%2 != 0:
    for i in range(n-1):
        num += a[i]
    print((num/(2**tem))+(a[-1]/2))
else:
    print(sum(a)/(2**tem))

Submission status: Wrong Answer

Solution code:
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])

Submission status: Wrong Answer

Solution code:
import heapq

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
v = [int(x) for x in input().split()]
sorted(v)
ans = v[0]/2**(n-1)
for i, x in enumerate(v[:-1]):
  ans += x/2**(n-1-i)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=sum(list(map(int,input().split())))
print(a*n/(2**n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc138/tasks/abc138_c

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()
# 降順にソート
nums.reverse()

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)

Submission status: Wrong Answer

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

while len(v) > 1:
  temp = []
  for i in range(len(v)//2):
    temp.append((v[2*i] + v[2*i + 1])/2)
  if len(v) % 2 == 0:
    v = temp
  else:
    temp.append(v[-1])
    v = temp
      
print(v[0])

Submission status: Wrong Answer

Solution code:
N = int(input())
v = list(map(int,input().split()))
while len(v) > 1:
  x = v.pop()
  v[-1] = (v[-1] + x)/2

print(v[0])

Submission status: Wrong Answer

Solution code:
N = int(input())
value_list = input().split()
value_list.sort()
#value_list.reverse()
#print(value_list)
for i in range(N):
	if i == 0:
		new_value = float(value_list[i])
	else:
		new_value = (new_value + float(value_list[i])) / 2

print(new_value)

Submission status: Wrong Answer

Solution code:
N = int(input())
v = list(map(int, input().split()))
vsort = sorted(v)
ans = (vsort[0]+vsort[1])/2

for i in range(N):
    if N <= 2:
        break
    else:
        ans = (ans + vsort[i])/2
        
print(ans)

Submission status: Wrong Answer

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

for i in range(N):
    ans = (vsort[0]+vsort[1])/2
    if N <= 2:
        break
    else:
        ans = (ans + vsort[i])/2
        
print(ans)

Submission status: Wrong Answer

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

for i in range(N):
    ans = (vsort[0]+vsort[1])/2
    if N <= 2:
        print(ans)
    else:
        ans = (ans + vsort[i])/2  # first term
        
print(int(ans))

Submission status: Wrong Answer

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

for i in range(N):
    ans = (vsort[0]+vsort[1])/2
    if N <= 2:
        print(ans)
    else:
        ans = (ans + vsort[i])/2  # first term
        
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools

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

numbers = list(itertools.permutations(v))

for _ in range(N):
  shadow = list(numbers[_])
#  print(shadow)
  for i in range(N-1):
    a = shadow.pop()
    b = shadow.pop()
    shadow.append((a+b)/2)
  ret = max(ret,shadow[0])

print(ret)

Submission status: Wrong Answer

Solution code:
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
    print(new)
    del list_a[0:2]
    print(list_a)
    list_a.append(new)
    print(list_a)
    list_a.sort()

print(list_a[0])

Submission status: Wrong Answer

Solution code:
def m():
    N = int(input())
    V = [int(i) for i in input().split()]
    while len(V) > 1:
        V.sort()
        min_v = 10000
        min_i = 0
        for i, v in enumerate(V[:-1]):
            if min_v > V[i] + V[i+1]:
                min_v = V[i] + V[i+1]
                min_i = i
        V[min_i] = (V[min_i] + V[min_i+1]) / 2
        V.pop(min_i+1)
        print(V)
    print(V[0])

m()

Submission status: Wrong Answer

Solution code:
def m():
    N = int(input())
    V = [int(i) for i in input().split()]
    while len(V) > 1:
        min_v = 10000
        min_i = 0
        for i, v in enumerate(V[:-1]):
            if min_v > V[i] + V[i+1]:
                min_v = V[i] + V[i+1]
                min_i = i
        V[min_i] = (V[min_i] + V[min_i+1]) / 2
        V.pop(min_i+1)
    print(V[0])

m()

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[int(i) for i in input().split()]
s=0
for i in range(n-1):
  
	f=l[i]
	for j in range(n):
		if i!=j:
			f+=l[j]
			f=f/2
	if s<f:
		s=f
      
      
print(s)

Submission status: Wrong Answer

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

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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(int(v_lst[0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import heapq

n = int(raw_input())
values = map(int, raw_input().split())
values = sorted(values)
h = []
for v in values:
  heapq.heappush(h, -v)

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

Submission status: Wrong Answer

Solution code:
import heapq

n = int(raw_input())
values = map(int, raw_input().split())
values = sorted(values)
h = []
for v in values:
  heapq.heappush(h, v)

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

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    h_list = list(map(int, input().split()))

    r = 0
    res = 0
    for i in range(n - 1):
        if h_list[i] >= h_list[i + 1]:
            r += 1
            if r > res:
                res = r
        else:
            r = 0
    print(res)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def fun(a,b):
    a=int(a)
    b=int(b)
    return (a+b)/2

n = int(input())
y = []

a = input().split()
for i in range(len(a)):
    a[i] = int(a[i])
for i in range(n-1):
    a.sort()
    x = fun(a[0],a[1])
    del a[0]
    del a[0]

    a.append(x)
    
print(a[0])

Submission status: Wrong Answer

Solution code:
input_size = int(input())
input_list = input().split()
input_list.sort()
a = int(input_list[0])
for i in range(1,input_size):
  a = (a + int(input_list[i]))/2
print(a)

Submission status: Wrong Answer

Solution code:
input_size = int(input())
input_list = input().split()
input_list.sort(reverse = True)
sum = 0
for i in range(input_size):
  sum += int(input_list[i]) * (2 ** (-i))
print(sum)

Submission status: Wrong Answer

Solution code:
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 += V[i] / 2
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
li = lambda: list(map(int, input().split()))
N = int(input())
V = li()
V.reverse()
ans = 0
for i in range(N-1):
  if i == 0:
    v1, v2 = V[i], V[i+1]
    ans = (v1 + v2) / 2
  else:
    ans = (ans + V[i+1]) / 2
print(ans)

Submission status: Wrong Answer

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

print('{:16g}'.format(sum(x for x in v) / N))

Submission status: Wrong Answer

Solution code:
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(int(tmp))

Submission status: Wrong Answer

Solution code:
import sys

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

for _ in range(n):
    if len(v) == 1:
        break
    smallest = 1000000000000000000000000000000
    smallest_x = 0
    smallest_y = 0
    for x in range(len(v)):
        for y in range(x + 1, len(v), 1):
            if smallest > abs(v[x] - v[y]):
                smallest = abs(v[x] - v[y])
                smallest_x = x
                smallest_y = y
    y = v.pop(smallest_y)
    x = v.pop(smallest_x)
    v.append((y + x) / 2)

if len(v) > 1:
    print(v[0] + v[1] / 2)
    sys.exit()
print(v[0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

vs.sort(reverse=True)

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)

Submission status: Wrong Answer

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

vs.sort(reverse=True)

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

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

print(x)

Submission status: Wrong Answer

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

vs.sort(reverse=True)
print(vs)

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

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

print(x)

Submission status: Wrong Answer

Solution code:
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[1])
       n-=1
print(int((v[0])))

Submission status: Wrong Answer

Solution code:
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(int((v[0])))

Submission status: Wrong Answer

Solution code:
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(int((v[0])))

Submission status: Wrong Answer

Solution code:
N = int(input())
Vlist = list(map(int,input().split()))
while len(Vlist) > 1:
	Vlist.sort()
	min = 1000
	j = -1
	for i in range(0,len(Vlist)-1):
		if min > Vlist[i+1] - Vlist[i]:
			min = Vlist[i+1] - Vlist[i]
			j = i
	Vlist[j]=(Vlist[j]+Vlist[j+1])/2
	Vlist[j+1] = 0
	Vlist.remove(0)

print(Vlist[0])

Submission status: Wrong Answer

Solution code:
n = int(input())
pnt = list(map(int, input().split()))

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

print(val)

Submission status: Wrong Answer

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

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

print(v)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    N = int(input())
    v = sorted(list(map(int, input().split())), reverse=True)
    while (len(v) > 1):
        pops = v[-2:]
        del v[-2:]
        ave = sum(pops) // 2
        v.append(ave)
    print(v.pop())

Submission status: Wrong Answer

Solution code:
N = int(input())
List = [] * N
List = input().split(" ")
for i in range(N):
    List[i] = float(List[i]) 
List.sort()
for i in range(N-1):
    List[i+1] = ( List[i] + List[i+1] ) / 2
print(List)

Submission status: Wrong Answer

Solution code:
N = int(input())
List = [] * N
List = input().split(" ")
List.sort()
for i in range(N-1):
    List[i+1] = ( float(List[i]) + float(List[i+1]) ) / 2
print(List[N-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
List = [] * N
List = input().split(" ")
List.sort()
for i in range(N-1):
    List[i+1] = ( float(List[i]) + float(List[i+1]) ) / 2
print(List)

Submission status: Wrong Answer

Solution code:
count = int(input())
numlist = list(map(int, sorted(input().split())))
result = 0

"""
for i in range(count-1):
  result = (numlist[i+1] + numlist[i]) / 2
"""

  #resultの結果をもう一回listに戻してsortする必要があるかも
  
for i in range(1,count):
  sum = (numlist[1] + numlist[0]) / 2
  del numlist[0:2] #0,1番目の要素を削除
  numlist.append(sum)
  numlist = sorted(numlist)
  #print(sum)
  #print(numlist)
  
print(sum)

Submission status: Wrong Answer

Solution code:
count = int(input())
numlist = list(map(int, sorted(input().split())))
result = 0

"""
for i in range(count-1):
  result = (numlist[i+1] + numlist[i]) / 2
"""

  #resultの結果をもう一回listに戻してsortする必要があるかも
  
while len(numlist) >= 2:
  sum = (numlist[1] + numlist[0]) / 2
  del numlist[0:2] #0,1番目の要素を削除
  numlist.append(sum)
  numlist = sorted(numlist)
  #print(sum)
  #print(numlist)
  
print(sum)

Submission status: Wrong Answer

Solution code:
count = int(input())
numlist = list(map(int, sorted(input().split())))
result = 0

"""
for i in range(count-1):
  result = (numlist[i+1] + numlist[i]) / 2
"""

  #resultの結果をもう一回listに戻してsortする必要があるかも
  
while len(numlist) >= 2:
  sum = (numlist[1] + numlist[0]) / 2
  del numlist[0:2] #0,1番目の要素を削除
  numlist.append(sum)
  numlist = sorted(numlist)
  print(sum)
  print(numlist)
  
print(sum)

Submission status: Wrong Answer

Solution code:
count = int(input())
numlist = list(map(int, sorted(input().split())))
result = 0

"""
for i in range(count-1):
  result = (numlist[i+1] + numlist[i]) / 2
"""

  #resultの結果をもう一回listに戻してsortする必要があるかも
  
while len(numlist) >= 2:
  sum = (numlist[1] + numlist[0]) / 2
  del numlist[0:2] #0,1番目の要素を削除
  numlist.append(sum)
  sorted(numlist)
  
print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())
V = list(map(int, input().split()))
V_sorted = sorted(V, reverse = True)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(map(int,input().split()))

ans = 0
if n % 2 == 0:
	for el in li:
		ans += el
	print(round(ans / n, 15))
else:
	for el in li:
		ans += el
	maxv = max(li)
	print(round(round((maxv / 2), 15) + ((ans - maxv ) / (n - 1) / 2), 15))

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(map(int,input().split()))

ans = 0
if n % 2 == 0:
	for el in li:
		ans += el
	print(round(ans / n, 5))
else:
	for el in li:
		ans += el
	maxv = max(li)
	print(round(round((maxv / 2), 5) + ((ans - maxv ) / (n - 1) / 2), 5))

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(map(int,input().split()))

ans = 0
if n % 2 == 0:
	for el in li:
		ans += el
	print(round(ans / n, 15))
else:
	for el in li:
		ans += el
	maxv = max(li)
	print(round((maxv / 2) + ((ans - maxv ) / (n - 1) / 2), 15))

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(map(int,input().split()))

ans = 0
if n % 2 == 0:
	for el in li:
		ans += el
	print(round(ans / n, 6))
else:
	for el in li:
		ans += el
	maxv = max(li)
	print(round((maxv / 2) + ((ans - maxv ) / (n - 1) / 2), 6))

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(map(int,input().split()))

ans = 0
if n % 2 == 0:
	for el in li:
		ans += el
	print(round(ans / n, 5))
else:
	for el in li:
		ans += el
	maxv = max(li)
	print(round((maxv / 2) + ((ans - maxv ) / (n - 1) / 2), 5))

Submission status: Wrong Answer

Solution code:
N = int(input())
arr = input()
guzai = arr.split(" ")
guzai_int = [int(i) for i in guzai]

for i in range(1, N):
  guzai_int.sort()
  x = guzai_int.pop(0)
  y = guzai_int.pop(0)
  guzai_int.append((x+y)/2)

print(guzai_int)

Submission status: Wrong Answer

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

list.sort()
print(list)
num = list[0]
for i in range(0, N):
    num = (num + list[i]) / 2
print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L.sort()
c = 0
for a in range(N):
	
	if a == 0:
		c = c + int(L[0]) / (2**(N-1))
	else:
		c = c + int(L[a]) / (2**(N-a))
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L.sort()
c = 0
for a in range(N):
	
	if a == 0:
		c = c + int(L[0]) / pow(2, N - 1)# (2**(N-1))
	else:
		c = c + int(L[a]) / pow(2, N - a)#(2**(N-a))
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L.sort()
for a in range(N):
    if a == 0:
        c = int(L[0])
    else:
        c = (c + int(L[a]))/2
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L.sort()
c = 0
for a in range(N):
    if a == 0:
        c = c + float(L[0])*pow(0.5, N - 1)
    else:
        c = c + float(L[a])*pow(0.5, N - a)
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L.sort()
c = 0
for a in range(N):
    if a == 0:
        c = c + float(L[0])/pow(2, N - 1)
    else:
        c = c + float(L[a])/pow(2, N - a)
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L.sort()
c = 0
for a in range(N):
    if a == 0:
        c = c + int(L[0])/pow(2, N - 1)
    else:
        c = c + int(L[a])/pow(2, N - a)
print(c)

Submission status: Wrong Answer

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

for _ in range(n - 1):
    v = sorted(v)
    value = (v.pop(1) + v.pop(0)) // 2
    v.append(value)

print(v[0])

Submission status: Wrong Answer

Solution code:
N = int(input())
v_list = input().split()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
vn = list(map(int, input().split()))

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


for _ in range(n-1):
    x = sorted(vn).pop(0)
    y = sorted(vn).pop(0)
    vn.append(merge(x, y))

print(vn[0])

Submission status: Wrong Answer

Solution code:
n = int(input())
vn = list(map(int, input().split()))

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


for _ in range(n-1):
    sorted(vn)
    x = vn.pop()
    y = vn.pop()
    vn.append(merge(x, y))

print(vn[0])

Submission status: Wrong Answer

Solution code:
num = int(input())
nums = input().split(" ")
nums3 = sorted(nums)
n = 0
for j in range(num-1):
  if j == 0:
    n = (int(nums3[j]) + int(nums3[j+1]))/2
  else:
    n = (n + int(nums3[j+1]))/2
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n = int(input())

a = list(map(float,input().split())) 

a.sort()

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

A =a[0]
print(A)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n = int(input())

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

a.sort()

for k in range(n-1):
    b=(a[0]+a[1])/2
    a.append(b)
    a.pop(0)
    a.pop(0)
    a.sort

A =a[0]
print(A)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n = int(input())

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

a.sort()

for k in range(n-1):
    b=(a[0]+a[1])/2
    a.append(b)
    a.pop(0)
    a.pop(0)
    a.sort

A =a[0]
print(int(A))

Submission status: Wrong Answer

Solution code:
from collections import deque
N = int(input())
v = list(map(int,input().split()))
que = deque(v)
for _ in range(N-1):
  a = que.popleft()
  b = que.popleft()
  c = (a+b)/2
  que.appendleft(c)
print(que.popleft())

Submission status: Wrong Answer

Solution code:
import heapq

def solve(n, v):
    q = []
    for i in range(n):
        heapq.heappush(q, v[i])
    for i in range(n-1):
        x = heapq.heappop(q)
        y = heapq.heappop(q)
        heapq.heappush(q, (x+y)/2)
        print(q)
    return heapq.heappop(q)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
v = input().split()
v = [float(i) for i in v]
for i in v:
    x = min(v)
    v.remove(x)
    y = min(v)
    v.remove(y)
    v.append((x+y)/2)
print(v[0])

Submission status: Wrong Answer

Solution code:
N = int(input())
v = input().split()
v = [int(i) for i in v]
for i in v:
    x = min(v)
    v.remove(x)
    y = min(v)
    v.remove(y)
    v.append((x+y)/2)
print(v[0])

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=list(sorted(A))
c=B.pop(0)
m=N-1
total=0
if N==2:
    max=sum(A)/2
elif N>2:
    for a in range(0,m):
        total+=B[a]/(2**(m-a))
    max=total+c/(2**N)

print(max)

Submission status: Wrong Answer

Solution code:
N = int(input())
vs = [2*int(i) for i in input().split()]

vs.sort()

def answer(N , vs):
    if N == 1:
        return vs[0]
    else:
        return (answer(N-1, vs) + vs[N-1]) // 2

print(answer(N, vs) / 2)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=list(map(int,input().split()))
c.sort(reverse=True)
value=0
for x in c:
  value=(value+x)/2
print(value)

Submission status: Wrong Answer

Solution code:
N = int(input())
Vs = input().split()

if N == 2:
    print(sum([int(x) for x in Vs])/N)
else:
    lists = [int(x) for x in Vs]
    while N > 1:
        lists.sort()
        x = int((lists.pop(0) + lists.pop(0)) / 2)
        lists.insert(0, x)
        N -= 1

    print(lists[0])

Submission status: Wrong Answer

Solution code:
N = int(input())
nums = list(map(int,input().split()))
nums.sort()
score = 0
for i in range(N-1):
    print(nums[i])
    score = (nums[i]+nums[i+1])/2
print(score)

Submission status: Wrong Answer

Solution code:
N = int(input())
nums = list(map(int,input().split()))
nums.sort()
score = 0
for i in range(N-1):
    print(nums[i])
    score += (nums[i]+nums[i+1])/2
print(score)

Submission status: Wrong Answer

Solution code:
##C problem
N = int(input())
v = list(map(float, input().split()))
##初期処理
a=min(v)
##最初に出てくる指定した要素を削除
v.remove(a)
b=min(v)
v.remove(b)
v.append( (a+b)/2 )

for i in range(N-2):
        a=v[-1]
        b=min(v)
        v.remove(b)
        v.append((a+b)/2)

print(v[-1])

Submission status: Wrong Answer

Solution code:
count = int(input())
numlist = list(map(int, sorted(input().split())))
numlist
result = int(numlist[0])

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

Submission status: Wrong Answer

Solution code:

N = int(input())
list_origin = [x for x in map(int,input().split())]

value_max = 0
for i in range(1,N):
    list = []
    list = sorted(list_origin,reverse=True)
    list_origin.append((list[0] + list[1]) / 2)
    value_max += (list[0] + list[1]) / 2
    del list_origin[0]
    del list_origin[1]
    
print(value_max)

Submission status: Wrong Answer

Solution code:
n = int(input())
v = sorted(list(map(int, input().split())))
while len(v) > 1:
  v.insert(0, v.pop(0) + v.pop(0) / 2)
  print(v[0])

Submission status: Wrong Answer

Solution code:
n = int(input())
lst = [int(s) for s in input().split()]
lst.sort()
ans = lst[0]
for i in range(n):
    ans = (ans+lst[i])/2
print(int(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while len(v) != 1:
    new_v = (v[0] + v[1]) / 2
    del v[0]
    del v[0]
    v.append(new_v)
    v.sort()
print(v)

Submission status: Wrong Answer

Solution code:
N = input()
V = list(map(int, input().split()))
V = sorted(V)
value = V.pop(0)
while V:
    value += V.pop(0)
print(value)

Submission status: Wrong Answer

Solution code:
#coding utf-8
N=int(input())
v=list(map(int,input().split()))
v.sort()
print(v)

ans=v[0]

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
values = [int(x) for x in input().split()]

combined_value = 0
for value in values:
  combined_value = (combined_value + value) / 2

print(round(combined_value, 5))

Submission status: Wrong Answer

Solution code:
N = int(input())
values = [int(x) for x in input().split()]

combined_value = values[0]
sliced_values = values[1:]
for value in sliced_values:
  combined_value = (combined_value + value) / 2

print(round(combined_value, 5))

Submission status: Wrong Answer

Solution code:
values = [int(x) for x in input().split()]
combined_value = values[0]
sliced_values = values[1:]
for value in sliced_values:
  combined_value = (combined_value + value) / 2
print(round(combined_value, 5))

Submission status: Wrong Answer

Solution code:
values = [int(x) for x in input().split()]

combined_value = values[0]
sliced_values = values[1:]
for value in sliced_values:
  combined_value = (combined_value + value) / 2

print(round(combined_value, 5))

Submission status: Wrong Answer

Solution code:
values = [int(x) for x in input().split()]

combined_value = values[0]
sliced_values = values[1:]
for value in sliced_values:
  combined_value = (combined_value + value) / 2

print(combined_value)