NPR puzzle

Ro Nagey aloharo at gmail.com
Wed Jul 20 14:20:46 EDT 2005


Here's my humble submission:

on doIt
   put the ticks into startTime
   put fld "element" into gorp
   repeat for each line l in fld "words"
     put "Yes" into myAnswer
     put  l  into myWord
     put myWord into daWord
     repeat 5 times
       put char 1 to 2 of daWord into anElement
       delete char 1 to 2 of daWord
       if anElement is not in gorp then
         put "No" into myAnswer
         exit repeat
       end if
     end repeat
     if myAnswer contains "Yes" then put myWord & return after  
finalAnswer
   end repeat
   put the ticks-startTime into totalTicks
   answer totalTicks && finalAnswer && the number of lines in  
finalAnswer
end doIt

Did it in 2 ticks and found 23 words :)

Ro Nagey


On Jul 20, 2005, at 3:40 PM, Jim Hurley wrote:

> For my fellow puzzle addicts:
>
> Here is this weeks NPR puzzle (Sunday Weekend edition)
>
> Sunday Puzzle
>
> By Will Shortz
>
>
> Challenge for July 24:
>
> A 10-letter word for a form of travel, that consists of five  
> consecutive symbols of chemical elements. What is it? If automobile  
> had been the answer, AU, would represent Gold, MO would represent  
> Molybdenum, and BI, would represent Bismuth. Unfortunately, the  
> remaining bigrams, TO and LE, are not chemical symbols.
>
>
> I have put up a stack with two fields. The first contains all 10  
> letter words in my dictionary.
>
> The second contains all two character elements from the periodic  
> table.
>
> You task, should you choose to adopt it, is to write a Run Rev  
> handler to solve this weeks NPR puzzle defined above.
>
> In the message box:
>
> go stack url  "http://home.infostations.net/jhurley/NPRpuzzle.rev"
>
> Jim
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list