def go(a, b):
result = ""
l = len(str(a))
for i in range(b-l):
result += '0'
result += str(a)
return result
def abcde(x):
result = ""
a = int(l[i][x+0] + l[i][x+1])
b = int(l[i][x+3] + l[i][x+4])
c = int(l[i][x+6] + l[i][x+7])
d = int(l[i][x+9] + l[i][x+10] + l[i][x+11]);
d += last
c += d//1000
b += c//60
a += b//60
d %= 1000
c %= 60
b %= 60
result += go(a, 2) + ":" + go(b, 2) + ":" + go(c, 2) + "," + go(d, 3)
return result
l = []
while True:
s = input()
l.append(s)
if s == '#':
s = input()
l.append(s)
break
last = int(l[-1])
for i in range(len(l)-1):
if i%4 != 1:
print(l[i])
else:
result = ""
result += abcde(0)
result += " --> "
result += abcde(17)
print(result)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
3428 KB |
Output is correct |
2 |
Correct |
26 ms |
3428 KB |
Output is correct |
3 |
Runtime error |
21 ms |
3324 KB |
Execution failed because the return code was nonzero |
4 |
Runtime error |
22 ms |
3352 KB |
Execution failed because the return code was nonzero |
5 |
Runtime error |
22 ms |
3452 KB |
Execution failed because the return code was nonzero |