1
0
www.mikescher.com/www/statics/euler/euler_032_explanation.md

6 lines
373 B
Markdown
Raw Normal View History

2017-11-08 17:39:50 +01:00
The main focus here was optimizing the pandigital testing. The rest is just looping over every possible number.
We can optimize the outer loop a little bit if we look at the possible multiplicands.
There are only 2 possibilities if we need 9 digits in our calculation:
- 1-digit number * 4-digit number = 4-digit number
- 2-digit number * 3-digit number = 4-digit number