# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96664 | noneTP | Titlovi (COCI19_titlovi) | Cpython 3 | 23 ms | 3432 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]);
fuck = d + c*1000 + b*1000*60 + a*1000*60*60
fuck += last
a = fuck//(1000*60*60)
fuck -= a*1000*60*60
b = fuck//(1000*60)
fuck -= b*1000*60
c = fuck//(1000)
fuck -= c*1000
d = fuck
result += go(a, 2) + ":" + go(b, 2) + ":" + go(c, 2) + "," + go(d, 3)
return result
l = []
def read():
cnt = 0
while True:
s = input()
if cnt%4 == 2:
fffff = s + '\n'
while True:
s = input()
if s == '#' or s == '':
l.append(fffff)
l.append(s)
cnt+=1
if s == '#':
s = input()
l.append(s)
return
break
else:
fffff += s + '\n'
else:
l.append(s)
cnt += 1
read()
last = int(l[-1])
for i in range(len(l)-1):
if i%4 != 1:
if len(l[i]) > 0 and l[i][-1] == '\n':
l[i] = l[i][:-1]
print(l[i])
else:
result = ""
result += abcde(0)
result += " --> "
result += abcde(17)
print(result)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |