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.
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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #51: Prime digit replacements
You are viewing a single comment's thread. Return to all comments →
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.