Which answer is right???


  • 0
    C

    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
    D

    got the same issue. I'm confused.


  • 0
    C

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

    EDIT:
    I believe these are the test outputs you got:

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

    and

    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.