Back to General discussions forum
You need to look carefully at the geometry of this problem.
Good one, thanks. One case though that I disagree with:
-2 7 -1 expects 9 as the answer but I would argue that 10 is correct.
Mathias,
Thanks for spotting this. I initially hadn't intended the y value to be as small as 1 or -1 and later forgot about this. I have amended the Setter code and have sent it off to Rodion.
Thanks, the tests seem to have now |y| >= 2 which avoids having to handle cases |y| = 1 or even y = 0.