Puzzle

  • Guru_
  • Born
  • Born
  • Guru_
  • Posts: 2

Post 3+ Months Ago

I'm trying to solve a cryptarithmetic puzzle TOO + TOO + TOO + TOO = GOOD using a program.

My solution to this, is to use a nested loop for each unique letter (in this case T, O, G, D). The loops would systematically assign the digits from 0-9 to each letter. For example, it might first try T = 0, O = 0, G = 0, D = 0, then T = 0, O = 0, G =0, D = 1, then T = 0, O = 0, G = 0, D = 2, etc. up to T = 9, O = 9, G = 9, D = 9.

Would this be the correct way to do this? If it is, the answer I got using my program was 1642 which I know isn't correct considering there's only 3 values instead of 4 (TOO)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • RedBMedia
  • Proficient
  • Proficient
  • User avatar
  • Posts: 315

Post 3+ Months Ago

The answer is:
Code: [ Select ]
499+499+499+499=1996

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 79 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.