157612025-02-26 13:50:07RozsvaiMonikaLegcsalódottabb versenyző (75 pont)python3Wrong answer 0/75256ms11500 KiB
pontokszáma = input()
pontokszáma = int(pontokszáma)
pontok = input("Add meg a pontszámokat!") 
pontok = pontok.strip().split()
for i in range(pontokszáma):
    pontok[i] = int(pontok[i])
# pontok = [2, 5, 8, 2, 5, 4, 9, 8, 9]
# pontok = [2, 5, 3, 8, 2, 5, 4, 9, 8, 9]
pontokszáma = len(pontok)
sorozat = [0] * pontokszáma
max = 0 
sorszám = 0
for i in range(pontokszáma):
    sorozat[i] = sorszám
    if pontok[i] > max:
        max = pontok[i]
        sorszám = sorszám + 1
#print(pontok)
#print(sorozat)

maxdarab = 0
for j in range(sorszám):
    darab = 0
    for i in range(pontokszáma):
        if sorozat[i] == j:
            darab = darab + 1
    if darab > maxdarab:
        maxdarab = darab
        maxsorszám = j
#print(maxdarab, maxsorszám)

darab = 0
for j in range(pontokszáma):
    if sorozat [j] < maxsorszám:
        darab = darab + 1
print(darab)



SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/016ms3124 KiB
2Time limit exceeded0/0241ms11500 KiB
3Wrong answer0/516ms3064 KiB
4Wrong answer0/516ms3104 KiB
5Wrong answer0/516ms3324 KiB
6Wrong answer0/516ms3124 KiB
7Wrong answer0/516ms3140 KiB
8Wrong answer0/516ms3072 KiB
9Wrong answer0/516ms3188 KiB
10Wrong answer0/517ms3184 KiB
11Wrong answer0/517ms3324 KiB
12Wrong answer0/517ms3124 KiB
13Time limit exceeded0/5256ms10992 KiB
14Time limit exceeded0/5237ms10772 KiB
15Time limit exceeded0/5216ms10824 KiB
16Time limit exceeded0/5224ms11000 KiB
17Time limit exceeded0/5206ms11000 KiB