Project Euler #69: Totient maximum

  • + 1 comment

    I draw a diagram which shows step-by-step solution here

    Hope it helps you understand easier

    • + 0 comments

      Your method helps to pass all test cases but i don't understand why that works. why n*p>=N works? why are no prime factors for each number considered? how do you arrive at that? I mean I tried everthing else then simply followed the algorithm in your picture but i don't understand at all how it works!