Project Euler #184: Triangles containing the origin.

  • + 0 comments

    This problem was really hard. The algorithm must O(rlogr) to pass all test cases. For me it involved counting coprimes in given range using inclusion/exclusion principle and generating totient values via sieve.