...

/

Challenge: Largest Number with Given Number of Digits and Sum of Digits

Challenge: Largest Number with Given Number of Digits and Sum of Digits

Given the number of digits and the sum of the digits, find the largest number that can be created.

Problem Statement

A girl lost the key to her locker (Note: The key is only numeric). She remembers the number of digits N as well as the sum S of all the digits of her password. She also knows ...