Pregunta de entrevista de BMO Financial Group

code with Python to solve clock question