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

Home > Numbers
North American Swim Meet (Posted on 2009-04-29) Difficulty: 2 of 5
Canada, Mexico and the United States each sent three swimmers to a North American swim meet. The scoring was that the first place finisher would get 8 points, the second place finisher 7 points, and so forth, down to no points for ninth (last) place.

The first two Mexican swimmers to finish were the two swimmers whose times were closest to each other among all the contestants, and last place, with no points, was one of the Canadians.

When the three nations' scores were totaled, it was found that each team had the same total score.

What was the order of finish, by team?

  Submitted by Charlie    
Rating: 2.0000 (2 votes)
Solution: (Hide)
The order is:

C U M M C U U M C

DECLARE SUB permute (a$)
CLS

o$ = "CCCMMMUUU": h$ = o$
DO
 ix1 = INSTR(o$, "M")
 ix2 = INSTR(o$, "MM")
 IF ix1 = ix2 AND RIGHT$(o$, 1) = "C" THEN
   totc = 0: totm = 0: totu = 0
   FOR i = 1 TO 9
     SELECT CASE MID$(o$, i, 1)
       CASE "C": totc = totc + 9 - i
       CASE "M": totm = totm + 9 - i
       CASE "U": totu = totu + 9 - i
     END SELECT
   NEXT
   IF totc = totm AND totm = totu THEN PRINT o$
 END IF
 permute o$
LOOP UNTIL h$ = o$

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle ThoughtsK Sengupta2023-02-22 01:16:35
SolutionSolutionDej Mar2009-04-29 18:43:45
Lap it up! Solutioned bottemiller2009-04-29 11:47:35
EVERY ONE IS HAPPYAdy TZIDON2009-04-29 11:26:53
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 (12)
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