Project Euler: Reversible prime squares

Has been a while (over one year ago) since I've tackled a Project Euler (PE) problem. This is my 206th Euler problem solved (after problem 100th, it gets really intense). This one, problem 808, is surprisingly simple. Basically a brute-force solution should do it. I used a combination of MillerRabin Primality Test (LogN) + BigInteger + simple string manipulation functions (palindrome, reverse). Runs in less than one minute.

One note thou: I can't post neither the solution (which is a number) nor the code to produce the solution since the PE gods will track you down and suspend your account, so I'll just screenshot the code with some key aspects blurred out. Cheers, ACC.

#808 Reversible prime squares - Project Euler






Comments

Popular posts from this blog

Changing the root of a binary tree

ProjectEuler Problem 719 (some hints, but no spoilers)

The Power Sum, a recursive problem by HackerRank