Project Euler #111: Primes with runs

Sort by

recency

|

7 Discussions

|

  • + 0 comments

    The crucial point here is to generate permutations without duplicates like C++ std::next_permutation(). I don't think using itertools.permutations is appropriate here. Also, skip those permutations with preceding zeros. (e.g. start with 100000000003 instead of 000000000013) Then you won't get into TLE trouble with cases like 15 0, 24 0, 31 0, 33 0, 34 0 and 35 0. And don't forget the prime .

  • + 0 comments

    how to do it in c++

  • + 0 comments

    Did anyone solve this in C++? If so, how did you implement prime testing for bigint's?

  • + 1 comment

    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.

  • + 0 comments

    why i'm getting abort called