1
0

rename statics/euler and sync b93 code with main repo

This commit is contained in:
2017-11-20 17:38:54 +01:00
parent 0efeb3afeb
commit 69e3f51730
409 changed files with 745 additions and 509 deletions

View File

@@ -0,0 +1,8 @@
Perhaps you remember from elementary school that numbers with a digit sum divisible by three is also divisible by three (an so not a prime).
So our number can't be 9 digits long (digit sum = `45`) nor 8 (digit sum = `36`). Our next best try is a 7-digit palindrome.
With the [QuickPerm algorithm](http://www.quickperm.org/) we generate all the permutations and test them for their primality.
This time we don't use a prime sieve, the numbers are just too big and it's faster with a simple naive prime test.
The rest is just implementation.
But the resulting code looks imho pretty nice because it really uses the four directions of befunge and often intersects with itself, even though I think that doesn't make it more readable.