Rezultati

Up. imeNalogaJezikRezultatČas oddaje
schrutefarms-2018 Tabela Python 3 100/100OK 13. okt '18 @ 11:08

Test Točke Porabljen spomin Porabljen čas Status
#1 20/20 11,727 MiB 0,000 s OK
#2 20/20 8,387 MiB 0,000 s OK
#3 20/20 8,340 MiB 0,000 s OK
#4 20/20 8,238 MiB 0,000 s OK
#5 20/20 8,414 MiB 0,000 s OK

Ocenjevani program (tiest.py):
import sys
f = sys.stdin
#f = open("test", "r")
lines = f.read().strip().split("\n")
lr = lines[1]
x = []
llr = len(lr)
lista_m = [0 for i in range(llr)]
for l in lines[2:]:
    splited_l = l.split(",")
    x.append(splited_l)
    for i in range(llr):
        l_elem = len(splited_l[i]) 
        if l_elem > lista_m[i]:
            lista_m[i] = l_elem
ret = []    
for l in x:
    temp = []
    for i in range(llr):
        if lr[i] == "L":
            temp.append(l[i]+(" "*(lista_m[i]-len(l[i]))))
        else:
            temp.append((" "*(lista_m[i]-len(l[i]))+l[i]))
    ret.append(temp)

for i in ret:
    str = i[0]
    for j in i[1:]:
        str+=" | "+j
    
    print(str)
f.close()