Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 8,734 MiB 0,000 s OK
#2 7/7 8,848 MiB 0,000 s OK
#3 7/7 8,652 MiB 0,000 s OK
#4 7/7 9,590 MiB 0,000 s OK
#5 7/7 8,492 MiB 0,000 s OK
#6 7/7 8,492 MiB 0,000 s OK
#7 7/7 8,566 MiB 0,000 s OK
#8 7/7 8,555 MiB 0,000 s OK
#9 7/7 8,563 MiB 0,000 s OK
#10 7/7 9,141 MiB 0,000 s OK
#11 7/7 8,508 MiB 0,000 s OK
#12 7/7 8,637 MiB 0,000 s OK
#13 8/8 8,742 MiB 0,000 s OK
#14 8/8 8,656 MiB 0,000 s OK

Ocenjevani program (tiest.py):
import sys
f = sys.stdin
#f = open("test.txt", "r")

lines = f.read().strip().split("\n")
t = lines[0][7:]
lines = lines[1:]
def convert(l):
    return (int(l[0:2]), int(l[3:5]),  int(l[6:8]),  int(l[9:]))

def add_t(t1, t2):
    x = t1[3]+t2[3]
    a= x%1000
    x = t1[2]+t2[2]+(x//1000)
    b = x%60
    x = t1[1]+t2[1]+(x//60)
    c=x%60
    x = t1[0]+t2[0]+(x//60)
    d=x
    return (d, c, b, a)
i = 1

def tupcon(t):
    return "%02d:%02d:%02d,%03d" %(t[0], t[1], t[2], t[3])

def print_n(l, t):
    t1 = l[:12]
    t2 = l[17:]
    return  tupcon(add_t(convert(t), convert(t1)))+" --> "+tupcon(add_t(convert(t), convert(t2)))
  
for line in lines:
    if i==2:
        print(print_n(line, t))
        i = i+1
    else:
        print(line)
        i=i+1
    if line == "":
        i = 1    

f.close()