how to solve clocks problem