eng
competition

Text Practice Mode

programming

created Aug 31st 2021, 07:44 by Kshetragya


0


Rating

17 words
26 completed
00:00
for i in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    g=a[0]
    sum=0
    for j in range(n):
        g=max(a[j],g)
        sum=sum+a[j]
    ans =g+(sum-g)/(n-1)
    print(round(ans,9))

saving score / loading statistics ...