Your solution thinks that time = 0 is bad time, but it is not always true.