# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
170907 | MatesV13 | Titlovi (COCI19_titlovi) | Cpython 3 | 27 ms | 3428 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 turntostr(kl):
lk = ""
help = str(kl%1000)
while len(help)<3: help = "0" + help
lk = help
kl=kl//1000
help = str(kl%60)
while len(help)<2: help = "0" + help
lk = help + "," + lk
kl=kl//60
help = str(kl%60)
while len(help)<2: help = "0" + help
lk = help + ":" + lk
kl=kl//60
help = str(kl)
while len(help)<2: help = "0" + help
lk = help + ":" + lk
return lk
def turntoms(kl):
lk = int(kl[0])
lk = lk*10
lk += int(kl[1])
lk = lk*6
lk += int(kl[3])
lk = lk*10
lk += int(kl[4])
lk = lk*6
lk += int(kl[6])
lk = lk*10
lk += int(kl[7])
lk = lk*10
lk += int(kl[9])
lk = lk*10
lk += int(kl[10])
lk = lk*10
lk += int(kl[11])
return lk
a = []
hm = 'x'
while True:
hm = input()
a.append(hm)
if hm=='#': break
y = int(input())
for x in a:
if len(x)==29 and x[2]==':':
print(turntostr(turntoms(x[:12])+y) + " --> " + turntostr(turntoms(x[17:])+y))
else: print(x)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |