You are viewing a single comment's thread. Return to all comments →
the editorial is so hard.Look at it once.
def solve(n, a): a=sorted(a,reverse=True); reallis=a[:n]; sum1=sum(a[n:]); #print(reallis,sum1) reallis=sorted(reallis); temp=0; sum2=0; no=0; f=0; for i in range(len(reallis)): no+=1; sum2+=reallis[i]; temp=round((sum1+sum2),9)/no; #print(temp); if(i<(len(reallis)-1)): if(temp<=reallis[i+1]): f=1; print("{0:.9f}".format(temp));
break; else: continue; if(f==0): print("{0:.9f}".format(temp));
Seems like cookies are disabled on this browser, please enable them to open this website
Save the Queen!
You are viewing a single comment's thread. Return to all comments →
the editorial is so hard.Look at it once.