Rezultati

Up. imeNalogaJezikRezultatČas oddaje
kjejenovictk-2019 Malica Python 3 100/100OK 09. maj '19 @ 17:29

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 16/16 8,602 MiB 0,000 s OK
#2 [več] 16/16 10,156 MiB 0,000 s OK
#3 [več] 17/17 8,602 MiB 0,000 s OK
#4 [več] 17/17 8,777 MiB 0,000 s OK
#5 [več] 17/17 8,813 MiB 0,000 s OK
#6 [več] 17/17 10,211 MiB 0,000 s OK

Ocenjevani program (malica.py):
import sys
data = sys.stdin.readlines()
#data = open("/home/putka-kjejenovictk-2019/.PyCharmCE2018.3/config/scratches/malica").readlines()

U = int(data[0].strip().split()[1])

sendvici = [[0, 0, 0] for i in range(U)]

stevec = 0

for line in data[1:]:
    line = line.strip().split(" ")
    if stevec == 0:
        stevec = int(line[0])
        ucilnica = int(line[1]) - 1
        continue

    if line[0] == "sirov":
        sendvici[ucilnica][0] += 1
    elif line[0] == "veganski":
        sendvici[ucilnica][1] += 1
    else:
        sendvici[ucilnica][2] += 1
    stevec -= 1

for s in sendvici:
    print(" ".join(map(str, s)))