We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #51: Prime digit replacements
Project Euler #51: Prime digit replacements
Sort by
recency
|
22 Discussions
|
Please Login in order to post a comment
100% python3
python code/-100points
JAva code
100points/- python 3
Some points-
1) L prime family means a family where a single fixed set of indices when replaced by numbers has Atleast L primes.
2) The problem demands that you produce the smallest Family in lexicographical order for a given n,k,l, not the one which is produced by smallest prime number with n digits whose family is L . If you are using primes in sorted order or even only those primes where k digits repeat, it can happen that for a smaller number you get a family with larger initials than the next bigger prime, so check it.
3) Timing is Important.
WA #3, #13, #15, #17.. not sure why
I managed to fix #3 due to a sorting issue, but the others still stump me
You are probably forgetting that: 100003 when having the 0 replaced by two # can be: ['100##3', '10#0#3', '1#00#3', '10##03', '1#0#03', '1##003']
I corrected my code on this idea, fixed tests #13, #15, #17.
By the way:, test: 7 2 5 [1000003, 1020023, 1030033, 1050053, 1080083]