Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
6-liner relatively clear/creative solution in Creative category for Broken Clock by Phil15
from datetime import datetime
def broken_clock(s, w, err):
s, w = (datetime.strptime(t, '%H:%M:%S') for t in (s, w))
a, b = (int(m) * {'h': 3600, 'm': 60, 's': 1}[n[0]]
for m, n in (t.split() for t in err.split(' at ')))
return (s + (w - s) / (1 + a / b)).strftime('%H:%M:%S')
Oct. 14, 2018