![]() |
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-08-12 10:05 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » Problem: How many times do the three hands of a clock coincide in a day? |
| Printable Version 6,678 / 32 |
| Floor1 exzzz | Posted 2009-01-11 15:41 |
| 初级用户 Posts 167 Credits 194 | |
|
How many times do the three hands of a clock overlap in a day and night?
A day and night refers to from 0:00 to 24:00. The overlap of the three hands of the clock means the hour hand, minute hand, and second hand overlap together. Ask how many times there are in total? The method is not limited, everyone can think about it, hehe. |
|
| Floor2 radem | Posted 2009-01-11 19:41 |
| 高级用户 Posts 383 Credits 691 | |
|
Once per hour, total 24 times.
|
|
| Floor3 slore | Posted 2009-01-11 19:44 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
...It's not that simple, oh
|
|
| Floor4 radem | Posted 2009-01-11 19:49 |
| 高级用户 Posts 383 Credits 691 | |
|
Then twice, at 12 o'clock and 24 o'clock.
|
|
| Floor5 slore | Posted 2009-01-11 20:03 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
...
You take a look at the following times. |
|
| Floor6 radem | Posted 2009-01-11 20:12 |
| 高级用户 Posts 383 Credits 691 | |
|
01:05:05
02:10:10 03:16:16 . . These don't seem to overlap completely At 01:05:00, the hour and minute hands overlap completely, but at 01:05:05, the hour and minute hands definitely don't overlap completely |
|
| Floor7 slore | Posted 2009-01-11 20:19 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
When the second hand moves for 1 second, the clock does not move by 1/60.
The clock does not rotate like that... The minimum swing unit is 5 degrees, which is the unit grid for seconds. There will be no case where the minute hand is between two second indication positions at 30 seconds. If it has to be that precise, I think there should be repetitions. |
|
| Floor8 netbenton | Posted 2009-01-11 20:36 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
Specifically, it should be:
00:00:00 01:05:05.09 02:10:10.26 03:16:15.80 04:21:21.40 .... 23:54:54.91 24:00:00 There are only 23 times. The above is not completely absolutely overlapping, because it is too minute to represent. But: 00:00:00 05:27:27.50 06:32:32.50 17:27:27.50 18:32:32.50 24:00:00 Are absolutely overlapping. These two should not exist. 12:59:59 23:59:59 [ Last edited by netbenton on 2009-1-11 at 20:44 ] |
|
| Floor9 slore | Posted 2009-01-11 20:58 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
32.50?
Are you calculating by angle? I don't think the minimum rotation angle of the second hand is (60/360) Can the second hand rotate for half a second? |
|
| Floor10 netbenton | Posted 2009-01-11 21:49 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
When the minute hand is at 5 minutes, the hour hand has already moved a bit and does not point to the position of 5 minutes.
When the second hand reaches 5 seconds, both the hour hand and the minute hand have moved a bit. Although they move slower than a snail, they have moved after all. So it can only be said that they overlap between 5 seconds and 6 seconds. If it is a mechanical clock, it should move forward at full time. It can be said that: 01:05:06 is completely overlapping. |
|
| Floor11 radem | Posted 2009-01-11 22:12 |
| 高级用户 Posts 383 Credits 691 | |
|
As far as I know, there are various forms of seconds pendulums in common mechanical clocks: watches have 5 steps per second, alarm clocks have 4 steps per second, stepper motor quartz clocks have 1 step per second, and stepless motor quartz clocks depend on the quartz frequency - probably countless steps ^_^, and there are also eight-trigram clocks without a second hand, which don't necessarily have 1 step per second! But no matter which one, theoretically, for each step the minute hand and hour hand also move 1 step. Therefore, theoretically, there should be at most 3 times when the three hands completely overlap:
00:00:00 12:00:00 24:00:00 |
|
| Floor12 slore | Posted 2009-01-11 23:05 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
Referring to the system clock of XP...
If you consider the problem that way, there's nothing to calculate... = = = MS is an interview question from MS |
|
| Floor13 exzzz | Posted 2009-01-12 14:35 |
| 初级用户 Posts 167 Credits 194 | |
|
Please give code. Found it's difficult to accurately time under BAT, now working hard in VBS...
|
|
| Floor14 slore | Posted 2009-01-12 15:20 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
VBS is very simple...
For i = 0 To 24 For j = 0 To 59 If (i Mod 12) * 5 + (j \ 12) = j Then WSH.echo Right("0" & i,2) & ":" & Right("0" & j,2) & ":" & Right("0" & j,2) End If Next Next This idea is not complicated to implement with BAT. |
|
| Floor15 linee | Posted 2009-01-12 20:31 |
| 初级用户 Posts 49 Credits 94 | |
|
Provide a data of 11 overlaps of hour hand and minute hand within 12 hours (hour hand and minute hand overlap every 12/11 hours).
00:00:00.00 01:05:27.27 02:10:54.54 03:16:21.81 04:21:49.09 05:27:16.36 06:32:43.63 07:38:10.90 08:43:38.18 09:49:05.45 10:54:32.72 12:00:00.00 If the second hand is to overlap with the minute hand, ignore the last column data, and the middle two columns of data should be equal. From the above data, it can be seen that only 00:00:00.00 and 12:00:00.00, the second hand may overlap with the minute hand. [ Last edited by linee on 2009-1-15 at 09:54 ] |
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |