All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Formula None Racer (Posted on 2003-10-03) Difficulty: 3 of 5
A car is travelling at a uniform speed.
The driver sees a milestone showing a 2-digit number. After travelling for an hour the driver sees another milestone with the same digits in reverse order. After another hour the driver sees another milestone containing the same two digits as in the first one but the two digits separated by a zero(0).

What is the speed of the car?

See The Solution Submitted by Ravi Raja    
Rating: 2.6000 (10 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Well, since fwaff was expecting one. | Comment 7 of 35 |
(In reply to re: please ignore by fwaff)

There being an analytic solution already, I wasn't going to post the brute force program, but it looks like fwaff expects one so I shan't disappoint:
FOR a = 12 TO 89
  a$ = LTRIM$(STR$(a))
  b$ = RIGHT$(a$, 1) + LEFT$(a$, 1)
  b = VAL(b$)
  c = 2 * b - a
  c$ = LTRIM$(STR$(c))
  IF LEFT$(c$, 1) = LEFT$(a$, 1) AND RIGHT$(c$, 1) = RIGHT$(a$, 1) AND MID$(c$, 2, 1) = "0" THEN
    PRINT a, b, c
  END IF
NEXT

The only pre-analysis that went in is that the three-digit milestone came after the two-digit ones, so the miles were going up rather than down, giving the limits for the first milestone as 12 to 89.
  Posted by Charlie on 2003-10-03 11:21:10

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information