Ad
  • Custom User Avatar

    Before that part of the text:

    ...If there are multiple solutions (and there will be), return as far as possible the result with the largest possible values:...

    You need to take the solution with largest possible value for numbers with multiple possibilities

    Now, back to what you asked

    decompose(11) must return [1,2,4,10]. Note that there are actually two ways to decompose 11², 11² = 121 = 1 + 4 + 16 + 100 = 1² + 2² + 4² + 10² but don't return [2,6,9], since 9 is smaller than 10.

    Since [1,2,4,10] has 10 which is bigger than all of the numbers in [2,6,9], you should return [1,2,4,10] instead.

  • Custom User Avatar
    'onone' should equal 'on_one'
    

    "onone" is not the input there, it's your incorrect returned value. The input was "OnOne".