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:
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!
can you tell me some trick to solve this problem