Ad
  • Default User Avatar

    Same thing (doing it in C);
    Had done it in Python; it was fine: I would have thought my code would be "barbaric", but it was in fact even slightly "more optimized" than by most other people (as I saw their solutions)... Here (in C) I've tried to optimize it in several different ways (first replaced recursion by loops, then even created a function to "quickly" (roughly) "approximate the square root" using binary operations (in fact to quickly get the "lowest power of 2 that's higher than the square root"), in order to avoid testing too high values AND at the same time avoiding to "square a variable" at each iteration (as the "PseudoSquareRoot" is fixed))...But STILL "taking too long" :/
    (The "puzzle" function is also "optimized" in order to not waste time with values "out of range", by the way (it did work well in python, and I was surprised that most coders didn't even include that feature, and just trivially "tested all values")... So it's indeed quite frustrating :/)

  • Custom User Avatar

    Can't know what's wrong without seeing your code, you should post your code in spoiler ~~

  • Default User Avatar

    you too!

  • Default User Avatar

    Me TOOOOOOOO