Birthday Triplets

  • + 1 comment

    you have to solve using algebra

    max(a,b,c) <= 15000

    convert

    a^2 + b^2 = f2-c^2 = k2 a^4 + c^4 = f4 - c^4 = k4

    (a^4 + b^4) = (a^2 + b^2)^2 - 2*a^2 * b^2

    (2ab)^2 = 2*(k2^2 - k4)

    try to solve for a, b for different values of c

    • + 1 comment

      Thanks for the feedback. As detailed above, there are many approaches to this problem.
      Your formulas are half way of method 5, which is fully explained in the editorial (pls see there).

      • + 0 comments

        Thanks. I just tried to give a clue.