The display of a digital clock is of the form MM:DD:HH:mm, that is , Month:Day:Hour:minute. The display ranges are
Month(MM)from 01 to 12
Day(DD)from 01 to 31
Hour(HH)from 01 to 23
Minute(mm)from 00 to 59
How many times in the year 2005 does the display show a palindrome?
(A palindrome is a number which is read the same forward as backward.
Examples: 12:31:13:21 and 01:02:20:10)

回應

2007-08-20 12:57
Be careful, this question is a bit tricky!

算式:MM可為01,02,03,04,05,10,11,12
而MM可以區分三種形式
(一). 01,03,05,10,12
則 HH可為01,02,03,10,11,12,13,20,21,22
=> 5x10=50
(二) 04,11
則HH可為01,02,03,10,11,12,20,21,22
=> 2x9=18
(三) 02
則HH可為 01,02,10,11,12,20,21,22
=> 1x8=8

50+18+8=76 #

:-? :-? :-D :-D