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.

Currently, Project Euler+ is a live competition. So HackerRank forbids the publishing of code, either as a solution or in asking for debugging help. This is not a "practice" challenge: https://www.hackerrank.com/faq/sharing-code

I will state that my 11-line Python3 solution does involve sets but neither floats (except one square-root, so no logarithms) nor long ints (technically Python doesn't need this data type, but I mean no integer beyond 100_000). I did eventually pass Testcase 10 by eliminating all floating-point arithmetic except that one square-root. As usual in Project Euler+, high-performance code does involve a cache/memoization, but otherwise here neither recursion nor dynamic programming. Just do some examples by hand and reflect deeply on your thought process — this forces one to avoid excessive bruteforce!

## Project Euler #29: Distinct powers

You are viewing a single comment's thread. Return to all comments →

How is this easy problem ???!!!!

Agree, it should have been moved to mid or even hard section!

Yeah it has its trick, it took me some time but I finally solved it.

Currently, Project Euler+ is a live competition. So HackerRank forbids the publishing of code, either as a solution or in asking for debugging help. This is not a "practice" challenge:

https://www.hackerrank.com/faq/sharing-code

I will state that my

11-line Python3 solutiondoes involve`set`

s but neither`float`

s (except one square-root, sono logarithms) nor`long int`

s (technically Python doesn't need this data type, but I mean no integer beyond`100_000`

). I did eventually passTestcase 10by eliminating all floating-point arithmetic except that one square-root. As usual in Project Euler+, high-performance code does involve a cache/memoization, but otherwise here neither recursion nor dynamic programming.Just do some examples by hand and reflect deeply on your thought process — this forces one to avoid excessive bruteforce!can you tell me some trick to solve this problem