157602025-02-26 13:47:16RozsvaiMonikaLegcsalódottabb versenyző (75 pont)python3Wrong answer 0/75259ms11956 KiB
pontokszáma = input("Mi a pontok száma?")
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/016ms3312 KiB
2Time limit exceeded0/0243ms11956 KiB
3Wrong answer0/516ms3124 KiB
4Wrong answer0/516ms3120 KiB
5Wrong answer0/514ms3080 KiB
6Wrong answer0/516ms2960 KiB
7Wrong answer0/517ms2956 KiB
8Wrong answer0/516ms3124 KiB
9Wrong answer0/516ms3128 KiB
10Wrong answer0/516ms3184 KiB
11Wrong answer0/517ms3220 KiB
12Wrong answer0/517ms3204 KiB
13Time limit exceeded0/5259ms11604 KiB
14Time limit exceeded0/5229ms11420 KiB
15Time limit exceeded0/5225ms11592 KiB
16Time limit exceeded0/5218ms11444 KiB
17Time limit exceeded0/5206ms11444 KiB