Rezultati

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

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

Ocenjevani program (subs.py):
def casToMilis(shift):
    h = int(shift[0:2])
    m = int(shift[3:5])
    s = int(shift[6:8])
    us = int(shift[9:12])
    milis= us + 1000*s + 60 * 1000*m+ 60*60*1000*h
    return milis


def milisToCas(milis):
    h, milis = milis//(60*60*1000), milis%(60*60*1000)
    m, milis = milis // ( 60 * 1000), milis % (60 * 1000)
    s, milis = milis // 1000, milis % 1000
    us=milis
    return '{0:0>2}:{1:0>2}:{2:0>2},{3:0>3}'.format(h,m,s,us)

shift = input()
diffMilis=casToMilis(shift[7:])





state='zap'
zst=0
for i in range(10001):
    try:
        if state=='zap':
            zst=int(input())
            state='cas'
            print(zst)

        if state=='cas':
            vhod=input()
            cas1=vhod[0:12]
            milis1=diffMilis+casToMilis(cas1)

            cas2 = vhod[17:]
            milis2 = diffMilis + casToMilis(cas2)
            print(milisToCas(milis1)+' --> '+milisToCas(milis2))
            state='bes'

        if state=='bes':
            vhod=input()
            if vhod=='':
                print('')
                state='zap'
            else:
                print(vhod)


    except:
        pass