Project Euler #73: Counting fractions in a range Discussions | | HackerRank
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.
n // A being the count of fractions with denominator A where was a key insight I've failed to notice for a long time. I was also thinking "Easy" is crazy for such a problem which takes pages of editorial on the official site.
In retrospect, to begin with this concept in mind, figuring out the removal of fractions in non-reduced form would be straightforward, consider we should have been very familiar with similar techniques from prime sieve, Totient function and more generally, dynamic programming.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #73: Counting fractions in a range
You are viewing a single comment's thread. Return to all comments →
n // A
being the count of fractions with denominatorA
where was a key insight I've failed to notice for a long time. I was also thinking "Easy" is crazy for such a problem which takes pages of editorial on the official site.In retrospect, to begin with this concept in mind, figuring out the removal of fractions in non-reduced form would be straightforward, consider we should have been very familiar with similar techniques from prime sieve, Totient function and more generally, dynamic programming.