Which answer is right???

  • 0

    Input: -2147483648, -1

    Output: -2147483648

    Excepted: 2147483647

    Input: -2147483648, -1

    Output: 2147483647

    Excepted: -2147483648

    Whenthe input value is(dividend=-2147483648 and divisor=-1),no matter my answer is -2147483648 or 2147483647,The system will show the correct answer is another。

    I even copied a copy of the answer to someone else online, and it was still the result.

  • 0

    got the same issue. I'm confused.

  • 0

    You copied the output incorrectly. Check what the tests print out more carefully.

    I believe these are the test outputs you got:

    Input:	-2147483648, 1
    Output:	2147483647
    Expected:	-2147483648


    Input:	-2147483648, -1
    Output:	-2147483648
    Expected:	2147483647

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.