Copperleaf interview question

Coding puzzle about a clock problem