China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 06:56
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Problem: How many times do the three hands of a clock coincide in a day? View 6,151 Replies 32
Original Poster Posted 2009-01-11 15:41 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
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.
Floor 2 Posted 2009-01-11 19:41 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
Once per hour, total 24 times.
Floor 3 Posted 2009-01-11 19:44 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
...It's not that simple, oh
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 4 Posted 2009-01-11 19:49 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
Then twice, at 12 o'clock and 24 o'clock.
Floor 5 Posted 2009-01-11 20:03 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
...

You take a look at the following times.


00:00:00
01:05:05
02:10:10
03:16:16
04:21:21
05:27:27
06:32:32
07:38:38
08:43:43
09:49:49
10:54:54
11:59:59
12:00:00
13:05:05
14:10:10
15:16:16
16:21:21
17:27:27
18:32:32
19:38:38
20:43:43
21:49:49
22:54:54
23:59:59
24:00:00
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
exzzz +2 2009-01-12 14:34
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 6 Posted 2009-01-11 20:12 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
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
Floor 7 Posted 2009-01-11 20:19 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
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.
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 8 Posted 2009-01-11 20:36 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
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 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
exzzz +2 2009-01-12 14:34
精简
=> 个人网志
Floor 9 Posted 2009-01-11 20:58 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
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?
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 10 Posted 2009-01-11 21:49 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
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.
精简
=> 个人网志
Floor 11 Posted 2009-01-11 22:12 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
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
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
exzzz +2 2009-01-22 00:23
Floor 12 Posted 2009-01-11 23:05 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
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
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 13 Posted 2009-01-12 14:35 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
Please give code. Found it's difficult to accurately time under BAT, now working hard in VBS...
Floor 14 Posted 2009-01-12 15:20 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
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.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
exzzz +2 2009-01-22 00:23
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 15 Posted 2009-01-12 20:31 ·  中国 贵州 安顺 电信
初级用户
Credits 94
Posts 49
Joined 2008-12-14 20:47
17-year member
UID 133884
Gender Male
Status Offline
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 ]
Forum Jump: