Rezultati

Up. imeNalogaJezikRezultatČas oddaje
muzik-2018 Podnapisi Python 3 100/100OK 10. maj '18 @ 17:06

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 8,656 MiB 0,000 s OK
#2 7/7 8,727 MiB 0,000 s OK
#3 7/7 8,488 MiB 0,000 s OK
#4 7/7 8,547 MiB 0,000 s OK
#5 7/7 8,488 MiB 0,000 s OK
#6 7/7 8,582 MiB 0,000 s OK
#7 7/7 8,484 MiB 0,000 s OK
#8 7/7 8,590 MiB 0,000 s OK
#9 7/7 8,590 MiB 0,000 s OK
#10 7/7 8,563 MiB 0,000 s OK
#11 7/7 8,496 MiB 0,000 s OK
#12 7/7 8,516 MiB 0,000 s OK
#13 8/8 8,727 MiB 0,000 s OK
#14 8/8 8,656 MiB 0,000 s OK

Ocenjevani program (asd.py):
import sys

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

inp = sys.stdin.readline

def parse(s):
    h, m, s = s.split(":")

    s, p = s.split(",")
    return list(map(int, [h,m,s,p]))

l = inp()
start = l.split(" ")[1]


def to_decimal(h,m,s,d):
    return (h*3600 + m*60 + s)*1000 + d

def back(da):
    dd = da//1000
    h = dd //3600
    m = (dd-h*3600)//60
    s = dd % 60
    d = da % 1000
    return str(h).zfill(2) + ":" + str(m).zfill(2) + ":" + str(s).zfill(2) + "," + str(d).zfill(3)


def shift(string, dec):
    end = to_decimal(*parse(string))
    end = end + dec
    return back(end)


dec = to_decimal(*parse(start))
#print(dec)
begg = False
while 1:
    num = inp()
    if not num:
        break
    if begg:
        print("")
    print(num, end="")
    ss = inp()
    begg = True
    try:
        start, end = ss.split(" --> ")
    except ValueError:
        break
    print(shift(start, dec) + " --> " + shift(end, dec))
    while 1:
        tt = inp()
        if "\n" in tt:
            be = True
        else:
            be = False
        tt = tt.strip("\n")
        if tt == "\n" or tt == "":
            #print("")
            break
        if be:
            print(tt, end="\n")
        else:
            print(tt, end="")