Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 0/7 8,609 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#2 0/7 8,734 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#3 0/7 8,496 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#4 0/7 9,355 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
ValueError: invalid literal for int() with base 10: 'n'
#5 0/7 8,512 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#6 0/7 8,484 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​1
01:01:27,881 --> 01:01:29,631
00:00:04,880 --> 00:00:06,630
<<<EOF>>>
Pravilen izhod:
​1
00:01:27,881 --> 00:01:29,631
00:00:04,880 --> 00:00:06,630
<<<EOF>>>
#7 0/7 8,660 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​1
122:23:55,100 --> 11:11:16,850
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"$%&\'()*+,-./:;<=>?@[\]^_{|}~ `20123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"$%&\'()*+,-./:;<=>?@[\]^_{|}~ `2
<<<EOF>>>
Pravilen izhod:
​1
00:11:15,100 --> 00:11:16,850
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"$%&\'()*+,-./:;<=>?@[\]^_{|}~ `20123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"$%&\'()*+,-./:;<=>?@[\]^_{|}~ `2
<<<EOF>>>
#8 0/7 8,496 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 19, in sum
    ns=str((int(self.s[-3])+int(other.s[-3])+c)%10) +ns
ValueError: invalid literal for int() with base 10: ':'
#9 0/7 8,492 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
ValueError: invalid literal for int() with base 10: '\n'
#10 0/7 8,938 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#11 0/7 8,656 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#12 0/7 8,703 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#13 0/8 8,813 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range
#14 0/8 8,660 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 84, in <module>
    print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
  File "source.py3", line 15, in sum
    ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
IndexError: string index out of range

Ocenjevani program (subtitle.py):
import sys

class time:
	def __init__(self,h,m,s):
		self.h=h
		self.m=m
		self.s=s
	def __str__(self):
		return self.h+":"+self.m+":"+self.s
	def sum(self,other):
		c=0
		ns=""
		nm=""
		nh=""
		ns=str((int(self.s[-1])+int(other.s[-1]))%10+c) +ns
		c=(int(self.s[-1])+int(other.s[-1])+c)//10
		ns=str((int(self.s[-2])+int(other.s[-2])+c)%10) +ns
		c=(int(self.s[-2])+int(other.s[-2])+c)//10
		ns=str((int(self.s[-3])+int(other.s[-3])+c)%10) +ns
		c=(int(self.s[-3])+int(other.s[-3])+c)//10
		ns=","+ns
		ns=str((int(self.s[-5])+int(other.s[-5])+c)%10) +ns
		c=(int(self.s[-5])+int(other.s[-5])+c)//10
		ns=str((int(self.s[-6])+int(other.s[-6])+c)%10) +ns
		c=(int(self.s[-2])+int(other.s[-2])+c)//10
		if c!=0:
			ns=str(c)+ns
		
		
		cm=0
		nm=str((int(self.m[-1])+int(other.m[-1]))%10+c) +nm
		cm=(int(self.m[-1])+int(other.m[-1])+cm)//10
		nm=str((int(self.m[-2])+int(other.m[-2]))%10+c) +nm
		cm=(int(self.m[-2])+int(other.m[-2])+cm)//10
		
		if cm!=0:
			nm=str(cm)+nm
		
		ch=0
		nh=str((int(self.h[-1])+int(other.h[-1]))%10+c) +nm
		cm=(int(self.h[-1])+int(other.h[-1])+cm)//10
		nh=str((int(self.h[-2])+int(other.h[-2]))%10+c) +nm
		if ch!=0:
			nh=str(sh)+nh
		
		d1=str(int(ns[:-4])//60)
		nsp=str(int(ns[:-4])%60)
		ns=nsp+ns[-4:]
		
		nm=str(int(nm)+int(d1))
		
		d2=str(int(nm)//60)
		nm=str(int(nm)%60)
		
		nh=str(int(nh)+int(d2))
		
		if len(ns)<6:
			ns='0'+ns
		if len(ns)<6:
			ns='0'+ns
		
		if len(nm)<2:
			nm='0'+nm
		
		if len(nh)<2:
			nh='0'+nh
		return time(nh,nm,ns)
		
		


f=sys.stdin
sh=f.readline()
t=sh[7:]
stf=time(t.split(":")[0],t.split(":")[1],t.split(":")[2][:-1])
ccc=0

for line in f.readlines():
	if (ccc%4)!=1:
		print(line,end='')
	else:
		t1=time(line[:2],line[3:5],line[6:12])
		t2=time(line[17:19],line[20:22],line[23:29])
		print(str(t1.sum(stf))+" --> "+str(t2.sum(stf)))
	ccc+=1