Considering a positive whole number X which contains more than one digit, let us define R(X) as the number obtained by reversing the digits of X. Neither X nor R(X) can contain any leading zeroes.
* A Conference commenced on a given day precisely at 10*X/ 143 minutes past P o'clock ( but before P+1 o'clock) and concluded at 10*R(X) / 143 minutes past Q o'clock ( but before Q+1 o'clock) on the same day ; where 11 >=Q > P >=1 with the proviso that P and Q are whole numbers. It was observed that the hour hand and the minute hand had exchanged places during the respective times of commencement and conclusion of the said conference.
* Determine X, R(X), P and Q and,hence or otherwise, find the precise times of commencement and conclusion of the conference.
DEFDBL A-Z
CLS
FOR x = 11 TO 857
r = 0: x1 = x
xs$ = LTRIM$(STR$(x))
p$ = "1" + STRING$(LEN(xs$) - 1, "0")
pv = VAL(p$)
DO
re = x1 MOD 10: x1 = x1 \ 10
r = pv * re + r
pv = pv / 10
LOOP UNTIL x1 = 0
IF r > 10 AND r < 858 THEN
m1 = 10 * x / 143: m2 = 10 * r / 143
mp1 = m1 / 60: mp2 = m2 / 60 ' frac of circle
FOR p = 1 TO 12: FOR q = 1 TO 11
hp1 = (p + m1 / 60) / 12: hq2 = (q + m2 / 60) / 12
IF ABS(hp1 - mp2) < .000001# AND ABS(hq2 - mp1) < .000001# THEN
PRINT p; m1, q; m2, x, r
END IF
NEXT: NEXT
END IF
NEXT
finds
9 33.98601398601399 6 47.83216783216783 486 684
6 47.83216783216783 9 33.98601398601399 684 486
where X and R(X) are 486 and 684, in either order.
In one interpretation, order of digits, the conference lasted all day: 9:33:59.16... in the morning to 6:47:49.93... in the evening.
The other interpretation gives the early-bird meeting of 6:47:49.93... to 9:33:59.16..., both in the morning.
|
Posted by Charlie
on 2005-12-09 13:00:24 |