Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 20/20 9,742 MiB 0,000 s OK
#2 20/20 8,473 MiB 0,000 s OK
#3 20/20 8,559 MiB 0,000 s OK
#4 20/20 8,453 MiB 0,000 s OK
#5 20/20 8,406 MiB 0,000 s OK

Ocenjevani program (plez.py):
import sys, math
sys.setrecursionlimit(10**9)


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

inp = sys.stdin

R, C = map(int,inp.readline().split())

align = list(inp.readline().strip())
#print(align)

tabela = []

for j in range(R):
    tabela.append(list(inp.readline().strip().split(",")))


lens = [0 for j in range(C)]
for rr in tabela:
    for i in range(C):
        lens[i] = max(lens[i], len(rr[i]))


for row in tabela:
    for i in range(C):
        ll = lens[i]
        cur = row[i]
        dst = ll - len(cur)
        if align[i] == "L":
            cur = cur + dst*" "
        else:
            cur = " "*dst + cur
        print(cur, end="")
        if i == C-1:
            print()
        else:
            print(" | ", end="")