中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-02 23:30
47,813 topics / 349,918 posts / today 0 new / 48,279 members
DOS批处理 & 脚本技术(批处理室) » Problem: How many times do the three hands of a clock coincide in a day?
Printable Version  7,159 / 32
Floor16 wxcute Posted 2009-01-13 12:45
中级用户 Posts 211 Credits 458
According to everyone's understanding, the ideal clock should overlap 23 times.
0-24 contains 25 whole hours, 24 hours;
Between 11-13, there is only the 12 o'clock overlap between the two whole hours, and similarly, between 23-24, there is only 24;
0-24 is equivalent to one more second in a whole day, and just this one second is the overlap, so it is 22+1=23 times.
Floor17 zh159 Posted 2009-01-13 18:16
金牌会员 Posts 1,467 Credits 3,687
Time is continuous like flowing water, not in jumps, so the ideal clock should be like what the 8th floor said
Floor18 linee Posted 2009-01-14 00:13
初级用户 Posts 49 Credits 94
(Found online, didn't study the proof and don't understand)

Only twice

Assume the angular velocity of the hour hand is ω (ω = π/6 per hour), then the angular velocity of the minute hand is 12ω, and the angular velocity of the second hand is 72ω. Let t be the time when the minute hand and the hour hand coincide again, then 12ωt - ωt = 2π, t = 12/11 hours, converted to hours, minutes and seconds is 1 hour 5 minutes 27.3 seconds. Obviously, the second hand does not coincide with the hour hand and the minute hand. Similarly, it can be calculated that the second hand cannot coincide with them in the other 10 times when the minute hand and the hour hand coincide. Only at exactly 12 o'clock and 0 o'clock do they coincide.

Proof: Treat the hour hand as stationary, and examine the relative speeds of the minute hand and the second hand with respect to it:

Take 12 hours as the time unit "1", and "circles/12 hours" as the speed unit,

then the speed of the minute hand is 11, and the speed of the second hand is 719.

Since 11 and 719 are coprime, let 12 hours / (11*719) be the time unit Δ,

then the minute hand coincides with the hour hand if and only if t = 719kΔ, k ∈ Z

The second hand coincides with the hour hand if and only if t = 11jΔ, j ∈ Z

And the least common multiple of 719 and 11 is 11*719, so if the three hands coincide at t = 0, then the next time the three hands coincide

must be at t = 11*719*Δ, that is, t = 12 o'clock.
Floor19 slore Posted 2009-01-14 10:25
铂金会员 Posts 2,478 Credits 5,212
It is said that if you calculate by angle, you won't get my result. This problem doesn't say the way the needle rotates. There are clocks that always run, and most of the designed needles still jump. The minimum swing amplitude is 1 second... This kind of needle is not in uniform circular motion... The above proof is not applicable.
Floor20 terse Posted 2009-01-14 16:41
银牌会员 Posts 946 Credits 2,404
12-hour overlap


[ Last edited by terse on 2009-1-15 at 11:17 ]
Floor21 linee Posted 2009-01-14 23:41
初级用户 Posts 49 Credits 94
Originally posted by terse at 2009-1-14 16:41:
12-hour coincidence
Floor22 terse Posted 2009-01-15 02:40
银牌会员 Posts 946 Credits 2,404
Originally posted by linee at 2009-1-14 23:41:

The super moderator can't understand this. Simply introduce the algorithm.

My thinking is like this. Let's discuss whether it's correct or not.
Suppose the surface has 60 scales. One hour is 5 scales. x scales is x/5 scales after 0 o'clock. Similarly, y minutes is y/60 hours. When reaching the next coincidence point, the two scales are the same after 0 o'clock. That is, x/5 hours - y/60 hours is an integer. Because the minute hand goes one more circle, so it keeps increasing by 1. Because the scales are the same, so I think the result of X/5 - Y/60 should be increasing from 0 to 11. Here, x and y scales are equal, that is, X/5 - X/60.
Just wrote a batch to derive another problem from this question:
That is, at what scales the hour hand and the minute hand can be swapped and are reasonable, for example:
07:43:13.00
07:48:15.10
07:53:17.20
07:58:19.29
08:03:21.39
08:08:23.49
08:13:25.59
08:18:27.69
08:23:29.79
08:28:31.88
08:33:33.98
08:38:36.07
Floor23 linee Posted 2009-01-15 09:28
初级用户 Posts 49 Credits 94
Originally posted by terse at 2009-1-15 02:40:

My train of thought is like this. Let's discuss whether it's correct or not.
Suppose the surface has 60 scales. One hour is 5 scales. x scales is x/5 scales after 0 o'clock. Similarly, y minutes is y/60 hours. When reaching the next coincidence point...

It should be correct, very similar to my calculation (I calculate it by the fact that the hour hand and minute hand coincide once every 12/11 hours). As follows:

Why is there no picture?

Forget it, just explain in text. Your calculation is very similar to mine (provided earlier). There is only one abnormal moment, which is at 09:49. Your calculation is 09:49:54.540, and what I provided earlier is 09:49:05.45. There's a big difference between 54 and 05. It's a bit strange.

Let's analyze your code first.

[ Last edited by linee on 2009-1-15 at 09:54 ]
Floor24 terse Posted 2009-01-15 11:18
银牌会员 Posts 946 Credits 2,404
Originally posted by linee at 2009-1-15 09:28:

....One is 54 and the other is 05

The bit position was wrong, has been corrected
Floor25 linee Posted 2009-01-15 15:10
初级用户 Posts 49 Credits 94
Originally posted by terse at 2009-1-15 02:40:

My thinking is like this. Let's discuss whether it's correct or not.
Assume the surface has 60 scales. One hour is 5 scales. x scales is x/5 scales after 0 o'clock. Similarly, y minutes is y/60 hours. When reaching the next coincidence point...

After analysis, the result of yours should be equivalent to coinciding once every 12/11 hours. Try modifying your code as follows, hope you don't mind.
Floor26 terse Posted 2009-01-15 15:26
银牌会员 Posts 946 Credits 2,404
I actually solved the above program. You simplified a lot, which is very good.
Let's discuss again at what scales the hour hand and minute hand can be swapped and be in a reasonable situation. Among them, the coincidence situation has been prompted.

The code for coincidence is placed in the for loop for higher efficiency. The previous call was because of considering decimals. Now it's directly okay.


[ Last edited by terse on 2009-1-18 at 14:51 ]
Floor27 linee Posted 2009-01-15 17:26
初级用户 Posts 49 Credits 94
What does "hour hand and minute hand exchange" mean?
Floor28 terse Posted 2009-01-15 17:33
银牌会员 Posts 946 Credits 2,404
Originally posted by linee at 2009-1-15 17:26:
What does "swap the positions of the hour hand and minute hand" mean?

For example, when they overlap, swapping the positions of the hour hand and minute hand must be reasonable. For example, at 3 o'clock, swapping the positions is obviously unreasonable because when the hour hand is at 12 o'clock, the minute hand will never be at 3 o'clock.
Floor29 linee Posted 2009-01-16 23:03
初级用户 Posts 49 Credits 94
Originally posted by terse at 2009-1-15 17:33:

For example, when the time coincides, swapping the positions of the hour and minute hands is definitely reasonable. For example, at 3 o'clock, swapping the positions is obviously unreasonable because when the hour hand is at 12 o'clock, the minute hand will never be at 3 o'clock.

A bit difficult to understand, don't want to study anymore.
Floor30 linee Posted 2009-01-16 23:06
初级用户 Posts 49 Credits 94
Let me post and see how it goes,
Ashamed, I regret not having read enough books when I need them. I always feel I can't express myself clearly. I've tried my best, just make do with it. Welcome to point out mistakes.


[ Last edited by linee on 2009-1-16 at 23:14 ]
Prev  1 2 3  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023