Rezultati

Up. imeNalogaJezikRezultatČas oddaje
pokosimo-2018 Podnapisi Python 3 100/100OK 10. maj '18 @ 16:53

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 8,730 MiB 0,000 s OK
#2 7/7 8,625 MiB 0,000 s OK
#3 7/7 8,484 MiB 0,000 s OK
#4 7/7 8,715 MiB 0,000 s OK
#5 7/7 8,656 MiB 0,000 s OK
#6 7/7 8,676 MiB 0,000 s OK
#7 7/7 8,660 MiB 0,000 s OK
#8 7/7 8,586 MiB 0,000 s OK
#9 7/7 8,492 MiB 0,000 s OK
#10 7/7 8,855 MiB 0,000 s OK
#11 7/7 8,492 MiB 0,000 s OK
#12 7/7 8,797 MiB 0,000 s OK
#13 8/8 8,633 MiB 0,000 s OK
#14 8/8 8,488 MiB 0,000 s OK

Ocenjevani program (podnapisi.py):
from sys import stdin

def vms(s):
    a = s.split(':')
    rez = int(a[0]) * 60 * 60 * 1000;
    rez += int(a[1]) * 60 * 1000;
    b = a[2].split(',')
    rez += int(b[0]) * 1000 + int(b[1])
    return rez

def izpisi(ms):
    ure = ms // (60 * 60 * 1000)
    ms = ms % (60 * 60 * 1000)
    minute = ms // (60 * 1000)
    ms = ms % (60 * 1000)
    sekunde = ms // 1000
    ms = ms % 1000
    print("{0:0>2}:{1:0>2}:{2:0>2},{3:0>3}".format(ure, minute, sekunde, ms), end='')

s = vms(input()[7:])
#izpisi(s)

stevec = 1
for line in stdin:
    if(len(line[:-1]) == 0):
        stevec = 0
    if(stevec == 2):
        a = line.split()
        #print(a)
        nula = vms(a[0])
        dva = vms(a[2])
        izpisi(nula + s)
        print(" --> ", end = '')
        izpisi(dva + s)
        print()
    else:
        print(line, end='')
    
    stevec += 1