1. 程式人生 > >How many times a day does a clock’s hands overlap?

How many times a day does a clock’s hands overlap?

Obviously, it is less than 24 times.

per hour, hour hands run 5 blocks.(1/12 lap)
per hour, minute hands run 60 blocks.(1 lap)

so diff is 55 blocks per hour.(11/12 lap)

and a day has 24 hours, so in 24 hours , this relative speed can run 24 * 55 blocks.

so times= to round = mod(24*55/60) = 22

or to round = mod(24*11/12) =22, based on per lap.

顯然,它不到24次。

每小時,時針跑5個街區。(1/12圈)
每小時,分針跑60個街區。(1圈)

所以差異是每小時55個街區。(11/12圈)

而且一天有24小時,所以在24小時內,這個相對速度可以跑24 * 55塊。

所以times = to round = mod(24 * 55/60)= 22

或以圓圈= mod(24 * 11/12)= 22,基於每圈。