# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96663 | noneTP | Titlovi (COCI19_titlovi) | Cpython 3 | 26 ms | 3452 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |