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 #62: Cubic permutations
Project Euler #62: Cubic permutations
Sort by
recency
|
7 Discussions
|
Please Login in order to post a comment
I don't understand why my code doesn't work?!
Hint: Try to use hash/dictionary to store data, then you can save a lot of running time!
For example: {'01234566': [41063625, 56623104, 66430125]} within:
41063625 = 345^3; 56623104 = 384^3; 66430125 = 405^3
'01234566' is a sorted string that contains all digits
If you're failing tests 0, 3, 5 but passing all others it's probably because you included entries larger than n in your permutations. For example, {1, 2, 3} is k=3, but for n = 2, k for the list is only 1 as both 2 and 3 are larger or equals to n.
Hi, can anyone please give more testcases with max valus of N and K? I am failing test-cases from #5 to #9.
please suggest improvements.....can only pass 0 and 1st cases