Alpha Video Training
Results 1 to 10 of 10

Thread: Puzzle 2

  1. #1
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Puzzle 2

    Puzzle2

    Ok. Here's an easier one.

    There once was a king of a rich South Pacific island who decided (in a moment of foolishness no doubt) to give away his fortune.

    To make it interesting he decided to have all the citizens line up one day. He gave $10 to the first person. He gave twice as much to the second person. He gave twice as much as the second person received to the third person. And the sequence continued, each person receiving twice as much as the person in line ahead of them.

    There were 475 citizens in the line.

    How much money did the king give away?
    How much did the last person receive?

    Your solution must be produced using tools available only in Alpha Five.

    Have fun.

    -- tom

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Puzzle 2

    Because of Alpha Five's limitation of 19 digits for numeric variables, permit me to change the puzzle slightly.

    The number of citizens in line should be 45.

    Thanks.

    -- tom

  3. #3
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Puzzle 2

    Are you going to award the winner with the amount the king gave away or split it between all the entrants?

    (:-)))))

    kenn

  4. #4
    Member
    Real Name
    Stephen Williams
    Join Date
    Apr 2000
    Location
    Oakland, CA
    Posts
    930

    Default RE: Puzzle 2

    This one was HARDER than the last one! I'm still wondering if I got the last guy right... Check it out.

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Puzzle 2

    Stephen,
    looks right to me, your answers agree with my own solution.

    -- tom

  6. #6
    Member
    Real Name
    Stephen Williams
    Join Date
    Apr 2000
    Location
    Oakland, CA
    Posts
    930

    Default RE: Puzzle 2

    Now - NO PEEKING, people, till YOU have a go!

  7. #7
    nick marodis
    Guest

    Default RE: Puzzle 2

    Tom, I hope this is right, if so I have John to thank.

    Nick

  8. #8
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Puzzle 2

    Nick, I'm sorry, your script still needs a bit of work. Try setting your loop to smaller numbers to test the results after the first, second, and third gifts are processed.

    i.e.

    for x = 1 to 1
    the answer should be $10 and $10

    then


    for x = 1 to 2
    the answer should be $20 and $30

    then
    for x = 1 to 3
    the answer should be $40 and $70

  9. #9
    nick marodis
    Guest

    Default RE: Puzzle 2

    Thank you Tom, for showing me the error of my ways.

    This works! maybe.

    Thanks
    Nick

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Puzzle 2

    Nick, please post your answers. Will save me the time of getting set up to run your latest script. Thanks. -- tom

Similar Threads

  1. A New Year puzzle...
    By Paul H in forum Alpha Four Versions 7 and 8
    Replies: 1
    Last Post: 02-17-2005, 12:49 AM
  2. Scripting Puzzle
    By Tim Madison in forum Alpha Five Version 5
    Replies: 4
    Last Post: 05-18-2004, 03:27 PM
  3. Formula Puzzle
    By Bill Feldhaus in forum Alpha Five Version 5
    Replies: 13
    Last Post: 11-13-2003, 07:24 AM
  4. Puzzle question for Tom
    By Jeff Moses in forum Alpha Five Version 4
    Replies: 1
    Last Post: 04-12-2001, 03:44 AM
  5. Puzzle - Set question
    By dtheo in forum Alpha Five Version 4
    Replies: 4
    Last Post: 11-21-2000, 03:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •