Why it is wrong?


  • 0
    Y

    Input: 1534236469
    Output: 9646324351
    Expected: 0

    this is my judgement.


  • 1
    S

    The reversed number is outside the range of an integer which is [-2147483648,2147483647] in a 32-bit machine. I think the judge will return 0 when this happens. But what interests me is how could your program return 9646324351 when the return type is integer?


  • 0
    Y

    i rebuild a long variable and return the variable


Log in to reply
 

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