Rezultati

Up. imeNalogaJezikRezultatČas oddaje
moh-in-o-oklepajfenikszaklepaj-2019 Malica Python 3 100/100OK 09. maj '19 @ 16:32

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 16/16 8,531 MiB 0,000 s OK
#2 [več] 16/16 8,691 MiB 0,000 s OK
#3 [več] 17/17 8,617 MiB 0,000 s OK
#4 [več] 17/17 8,523 MiB 0,000 s OK
#5 [več] 17/17 8,684 MiB 0,000 s OK
#6 [več] 17/17 8,535 MiB 0,000 s OK

Ocenjevani program (malica.py):
N, U = map(int, input().split())
sir = 'sirov'
vegi = 'veganski'
ucilnice = [[0 for _ in range(3)] for _ in range(U)]
for _ in range(N):
    inp = input().split(maxsplit=2)
    clani, ucilnica = int(inp[0]), int(inp[1])
    for _ in range(clani):
        inp = input().split(maxsplit=1)
        sendvic = inp[0]
        if sendvic == sir:
            ucilnice[ucilnica-1][0] += 1
        elif sendvic == vegi:
            ucilnice[ucilnica-1][1] += 1
        else:
            ucilnice[ucilnica-1][2] += 1

for cnt in ucilnice:
    cnt = [str(x) for x in cnt]
    print(' '.join(cnt))