PC Pro (Digital)

PC Pro (Digital)

1 Issue, July 2015

Also available on
Zinio Unlimited logo
1-month free trial

Get unlimited access to this article, this issue, + back issues & 5,000+ other magazines.

Renews at just $8.99/month after trial.

Cancel anytime.
Learn more

Coding challenge

Mapping numbers onto letters to solve an alphametic puzzle
Coding challenge
Alphametics An alphametic is a puzzle in which individual letters are given number values, and then sums are constructed out of words. To solve the puzzle, you need to work out which letter represents which digit. The rules of the puzzle require that each letter should represent a different digit, and that the numbers in the sum can’t start with leading zeroes. In theory, there might be more than one possible answer. Let’s start with a classic puzzle: “SEND + MORE = MONEY”, which uses the unique letters S, E, N, D, M, O, R and Y. The brute-force approach would be to step through all of the 1,814,400 possible ways of mapping digits onto these letters in turn, until we find a permutation that works. We can apply a small optimisation…
You're reading a preview of
PC Pro (Digital) - 1 Issue, July 2015

DiscountMags is a licensed distributor (not a publisher) of the above content and Publication through Zinio LLC. Accordingly, we have no editorial control over the Publications. Any opinions, advice, statements, services, offers or other information or content expressed or made available by third parties, including those made in Publications offered on our website, are those of the respective author(s) or publisher(s) and not of DiscountMags. DiscountMags does not guarantee the accuracy, completeness, truthfulness, or usefulness of all or any portion of any publication or any services or offers made by third parties, nor will we be liable for any loss or damage caused by your reliance on information contained in any Publication, or your use of services offered, or your acceptance of any offers made through the Service or the Publications. For content removal requests, please contact Zinio.

© 1999 – 2025 DiscountMags.com All rights reserved.