Rezultati

Up. imeNalogaJezikRezultatČas oddaje
TDT-2018 Podnapisi Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 10. maj '18 @ 17:10

Test Točke Porabljen spomin Porabljen čas Status
#1 0/7 9,012 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#2 0/7 9,008 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#3 0/7 9,090 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#4 0/7 9,129 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#5 0/7 8,969 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#6 0/7 9,121 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#7 0/7 9,090 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#8 0/7 8,953 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#9 0/7 9,121 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#10 0/7 9,109 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#11 0/7 8,930 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#12 0/7 9,078 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#13 0/8 9,176 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range
#14 0/8 9,133 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 36, in <module>
    konec = cas[1]
IndexError: list index out of range

Ocenjevani program (prva.py):
import sys
from datetime import timedelta, time
from math import floor


def ti(s):
    s = s.split(':')
    m = s[2].split(',')
    return timedelta(0, int(m[0]), 0, int(m[1]), int(s[1]), int(s[0]))

def pp(t):
    s = str(t)
    s = s.replace('.', ',')[:-3]
    if s[0] == '0':
        s = '0' + s
    return s

s = sys.stdin.readline().strip()[7:]
shift = ti(s)

vrstica = sys.stdin.readline().strip()
print(vrstica)
pos = 1

while vrstica is not False:
    vrstica = sys.stdin.readline().strip()

    if pos == 0:
        pos = 1
        print(vrstica)
        continue

    if pos == 1:
        cas = vrstica.split(' --> ')
        zacetek = cas[0]
        konec = cas[1]

        zacetek = ti(zacetek)
        novizacetek = zacetek + shift

        konec = ti(konec)
        novikonec = konec + shift


        print(pp(novizacetek), '-->', pp(novikonec))
        #print(t1.strftime('%H:%M:%S,') + str(novizacetek.microseconds * 10**3), '-->', novikonec.strftime('%H:%M:%S,') + str(novikonec.microseconds * 10**3))

        pos = 2
        continue

    if pos == 2 and vrstica == "":
        pos = 0
        print()
    else:
        print(vrstica)