Rezultati

Up. imeNalogaJezikRezultatČas oddaje
Jakub-2018 Podnapisi Python 3 0/100Napačen odgovor (WA) 10. maj '18 @ 17:26

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 8,566 MiB 0,000 s OK
#2 0/7 8,594 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​916
21:41:58,936 --> 21:42:00,537
Greg, move your head.

916
00:42:38,305 --> 00:42:44,914
Support us and become VIP member
to remove all ads from www.OpenSubtitles.org
<<<EOF>>>
Pravilen izhod:
​916
21:41:58,936 --> 21:42:00,537
Greg, move your head.

916
21:42:01,326 --> 21:42:07,935
Support us and become VIP member
to remove all ads from www.OpenSubtitles.org
<<<EOF>>>
#3 7/7 8,484 MiB 0,000 s OK
#4 7/7 8,594 MiB 0,000 s OK
#5 7/7 8,660 MiB 0,000 s OK
#6 7/7 8,582 MiB 0,000 s OK
#7 7/7 8,488 MiB 0,000 s OK
#8 0/7 8,484 MiB 0,000 s Napačen odgovor
Tvoj izhod:
​1
00:11:15,100 --> 00:11:16,850
2
['SHIFT:', '00:11:10,220']
00:00:04,880 --> 00:00:06,630
00:00:04,880 --> 00:00:06,630

2
Pravilen izhod:
​1
00:11:15,100 --> 00:11:16,850
2
SHIFT: 00:11:10,220
00:00:04,880 --> 00:00:06,630
00:00:04,880 --> 00:00:06,630

2
#9 7/7 8,676 MiB 0,000 s OK
#10 7/7 8,664 MiB 0,000 s OK
#11 7/7 8,555 MiB 0,000 s OK
#12 7/7 8,676 MiB 0,000 s OK
#13 8/8 8,664 MiB 0,000 s OK
#14 8/8 8,477 MiB 0,000 s OK

Ocenjevani program (podnapisi.py):
inp = input().split(' ')[1].split(',')
shift1 = inp[0].split(':')
shift2 = int(inp[1])
for i in range(len(shift1)):
	shift1[i] = int(shift1[i])
	

def shift(line):
	line = line.split(',')
	line1 = line[0].split(':')
	for i in range(len(line1)):
		line1[i] = int(line1[i])
	line2 = int(line[1])
		
	line2 += shift2
	line1[2]+=line2//1000
	line2%=1000
	
	line1[2]+=shift1[2]
	line1[1]+=line1[2]//60
	line1[2]%=60
	
	line1[1]+=shift1[1]
	line1[0]+=line1[1]//60
	line1[1]%=60
	
	line1[0]+=shift1[0]
	
	if line2<10:
		line2 = '00'+str(line2)
		
	elif line2<100:
		line2 = '0'+str(line2)
	else:
		line2 = str(line2)

	for i in range(len(line1)):
		if line1[i]<10:
			line1[i]='0'+str(line1[i])
		else:
			line1[i]=str(line1[i])
	
	line1 = map(str, line1)
	s = ":".join(line1)+','+line2
	return(s)

n = 1
while True:
	try:
		inp = input()
		try:
			inp = int(inp)
			if inp == n:
				print(n)
				n+=1
				inp = input().split(' ')
				st = shift(inp[0]) + ' --> ' + shift(inp[2])
				print(st)
			else:
				print(inp)
		except:
			print(inp)
	except:
		break