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 #111: Primes with runs
Project Euler #111: Primes with runs
Sort by
recency
|
7 Discussions
|
Please Login in order to post a comment
The crucial point here is to generate permutations without duplicates like C++
std::next_permutation()
. I don't think usingitertools.permutations
is appropriate here. Also, skip those permutations with preceding zeros. (e.g. start with100000000003
instead of000000000013
) Then you won't get into TLE trouble with cases like15 0
,24 0
,31 0
,33 0
,34 0
and35 0
. And don't forget the prime .how to do it in c++
Did anyone solve this in C++? If so, how did you implement prime testing for bigint's?
Has any one tried this with Java ? The only option in java to handle such huge numbers is BigInteger which is extremely slow.
What are options to handle such huge numbers with fast processing in other languages ? Help or suggestion would be really appreciable.
why i'm getting abort called