Submission #23087

#TimeUsernameProblemLanguageResultExecution timeMemory
23087model_codePareto (COCI17_pareto)Cpython 3
80 / 80
544 ms30 KiB
n = int(input()) niz = list(map(int, input().split())) niz.sort(reverse=True) ukupno = sum(niz) a = 1 b = 1 tmp = 0 for i in range(n): tmp += niz[i] if tmp/ukupno - (i + 1)/n > b - a: a = (i + 1) / n b = tmp / ukupno print(a * 100) print(b * 100) #print(a * 100, b * 100)
#Verdict Execution timeMemoryGrader output
Fetching results...