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!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #29: Distinct powers
You are viewing a single comment's thread. Return to all comments →
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
set
s but neitherfloat
s (except one square-root, so no logarithms) norlong int
s (technically Python doesn't need this data type, but I mean no integer beyond100_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!