Is the output expected to be an int or an int array ?


  • 0
    S

    Is the output expected to be an int or an int array that represents the binary representation of the int?
    Based on the function definition, the output is an int array.

    However, after I run my code, the judge produces the following error message.

    Submission Result: Wrong Answer Runtime Error Message: Last executed input:
    Input: [1] Output: [1,0] Expected: [2]


  • 0
    Z

    the output is expected to be an integer which is represented as an array. it's not related to binary representation.
    in your case, if you are expecting the output [1,0], the input should be [9].


Log in to reply
 

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