Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    @hate_coding I think that what you've explained here should be in the description.

  • Default User Avatar

    You do each digit separately, apparently. It tripped me up as well.

    So then "62" from the test case would be (pseudocode):

    binary(6) = 110, "k" width of bits of (110) = 3, k - 1 = 2, therefore 2 zeroes followed by 1 followed by binary -> "001110"
    binary(2) = 10, "k" width of bits of (10) = 2, k - 1 = 1, therefore 1 zero followed by 1 followed by binary -> "0110"

    Finally adding the above together will yield (6)"001110" + (2)"0110" = "0011100110".