Ad
  • Custom User Avatar

    As I know, at first, possible errors, non-standard situations are written in the if block.

  • Custom User Avatar

    I agree, although I would never get to the mathematical formula, as I'm not a mathematical person, but there is a massive difference between running the function with a considerably high "m" number
    when your solution solves it instantly.

    Very interesting the always problematic execution time :)

  • Custom User Avatar

    It's clever, but I think you could exclude the "else" from the statement, since "return" ends the function execution.
    It would increase readability.