Kevin took a train at Figsdale with the intention of going to Garsville (which is located 8 kilometers from Figsdale). At the precise instant that the train started leaving Figsdale, the minute hand of his 12 hour analog wristwatch was located exactly on a minute mark.
Kevin looked at his watch again at the instant that the train reached Garsville, when he observed that the minute hand and the hour hand were exactly coincident, but the minute hand was not situated on a minute mark.
Assuming that that the train moved at a constant speed and its speed, in kilometers per hour, is an odd integer greater than 60 and the train left Figsdale between 6:00 a.m. and 6:00 p.m. inclusively, what is the speed of the train?
Determine precisely the respective times when the train left Figsdale and when the train reached Garsville.
Note: Each hour mark is also deemed as a minute mark.
speed = 61
FOR stm = 0 TO 719
endTime = stm + 8 * 60 / speed
hrHand = endTime / 720: IF hrHand > 1 THEN hrHand = hrHand - 1
minHand = endTime / 60: minHand = minHand - INT(minHand)
h1 = stm \ 60: m1 = stm MOD 60
h2 = INT(endTime / 60): m2 = endTime - 60 * h2
IF ABS(hrHand - minHand) < 1E-13 THEN
PRINT USING "### ##:## ##:##.######## ##.#####"; speed; h1; m1; h2; m2; endTime - stm
speed = speed + 2
LOOP UNTIL speed > 1000
165 2: 8 2:10.90909091 2.90909
meaning that the train was travelling at 165 kph and left at 2:08 (can't get that leading zero with QB), and arrived at 2:10 10/11 (using fractional minutes rather than seconds), taking 2 10/11 minutes to make the trip.
Posted by Charlie
on 2009-08-22 16:47:03