Sum up the largest

Computer Science Level pending

Given \(s\) the sum of the digits, and \(d\) the number of digits it is required to find the largest number that satisfies the condition.

The text contains lines of spaced integers \((d, s)\). What is sum of the return values of each line?

Details and Assumptions:

  • For \(d=2\) and \(s=9\) we get 90.

  • For \(d=3\) and \(s=8\) we get 800.


Problem Loading...

Note Loading...

Set Loading...