paste bin

malic
Python
while True:
    try:
        N=input()
        a=list(map(int,input().split(" ")))
    except:
        break

    a=sorted(a)
    res=sum(a[0:-1])
    if(a[-1]<res):
        print("{0:.1f}".format((res+a[-1])/2))
    else:
        print("{0:.1f}".format(res))

2019 C4QB

fork this code