1
0
www.mikescher.com/www/statics/euler/Euler_Problem-036_explanation.md

6 lines
381 B
Markdown
Raw Normal View History

2017-11-08 17:39:50 +01:00
The *trick* here is that we only need to test 1998 numbers. Because there are only so much base10 palindromes:
- The numbers from `1` to `999` mirrored result into to palindromes `11` to `999999`
- The numbers from `1` to `999` mirrored at the last digit result into to palindromes `1` to `99999`
Then we only need to test these numbers whether they are also binary palindromes.