Looking for digits that sum to 5

Medium

Suppose we're trying to create a number where the digits sum up to 5. You're given a positive integer as your input, n. Write a function that will take in n, and return a number with digits summing to exactly 5. You can assume the sum of the digits in the initial input will not exceed 5....

Sign in to InterviewQs to view this question

Or

New to InterviewQs? Sign up now.

By proceeding, you agree to our Terms and Conditions and Privacy Policy.

Loading editor...