Sunday Times Teaser 2963 – A Result
by Graham Smithers
Published July 7 2019 (link)
For any number, I square the digits and then add the resulting numbers. If necessary, I keep repeating the process until I end up with a single digit, called the result.
For example: 142 gives 1 + 16 + 4 = 21 which then gives 4 + 1 = 5, the result. I have written down a two-digit number.
If I tell you one of the digits [the key digit], you should be able to work out the result.
I then use a 3rd digit to get a three-digit number. The result of that number happens to be the key digit.
In increasing order, what are the three digits?
4 Comments
Leave one →
A beginner’s solution – when you only have limited knowledge, it gets a bit clumsy.
Hi Sandy, Its great to see you posting again! I hope you don’t mind but I have adjusted your posting slightly to help readers by using some popular guidelines (see PEP8) that make the code a bit easier to read. This is mainly ‘put spaces after commas, not before’ and ‘put spaces around binary operators’.
Thanks Brian, will read PEP8.