Rezultati

Up. imeNalogaJezikRezultatČas oddaje
jayzcrew-2018 Tabela Python 3 100/100OK 13. okt '18 @ 10:56

Test Točke Porabljen spomin Porabljen čas Status
#1 20/20 9,758 MiB 0,000 s OK
#2 20/20 8,715 MiB 0,000 s OK
#3 20/20 8,563 MiB 0,000 s OK
#4 20/20 8,590 MiB 0,000 s OK
#5 20/20 8,598 MiB 0,000 s OK

Ocenjevani program (1.py):
import sys

#sys.stdin = open("1.in")

r, c = map(int, sys.stdin.readline().split())

rk = sys.stdin.readline().strip()
t = []
m = [0 for i in range(c)]
for l in sys.stdin:
    l= l.strip().split(",")
    t.append(l)
    for k in range(c):
        m[k] = max(len(l[k]), m[k])


for i in range(r):
    for j in range(c):
        if rk[j] == 'R':
            print((m[j] - len(t[i][j]))*' ', end='')
            print(t[i][j],end='')
        if rk[j] == 'L':
            print(t[i][j], end='')
            print((m[j] - len(t[i][j])) * ' ', end='')

        if j != c-1:
            print(' | ', end='')
    if i != r-1:
     print()