Question: Write a function def solution(x) that given a non negative integer x between 0 and 36 (inclusive) returns the smallest non-negative integer whose digits sum

Write a function

def solution(x)

that given a non negative integer x between 0 and 36 (inclusive) returns the smallest non-negative integer whose digits sum to x

for Example 12, the smallest solution would be 39 given that 3+9 = 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!