Božo is a strange little boy. Every day he tires his friends with strange questions. Today's question is: how many integers in the interval are there such that the sum of their digits is , and which is the smallest such number?
Write a program that answers Božo's question so that he can get some sleep.
Input Specification
The input contains three integers , and .
Output Specification
The first line should contain the number of integers in the interval with the digit sum equal to . The second line should contain the smallest such integer. The input data will guarantee that the first number is at least .
Scoring
For correctly outputting one of the two numbers you will receive of the score.
Note: if you want to receive credit for just the second number, be sure to output something (, for example) as the first number so the judge can interpret your output correctly.
Sample Input 1
1 9 5
Sample Output 1
1
5
Sample Input 2
1 100 10
Sample Output 2
9
19
Sample Input 3
11111 99999 24
Sample Output 3
5445
11499
Comments
How to outputting correctly ?
My output is clearly similar to the answer
In test 01:
This output has 0 point
But this output has 50 points
The test data on this problem is weak, I had a passing solution that would output
for the data
10 11 1
. The correct answer should beI have since corrected the mistake in my code though I'm not sure whether my fix works for all cases like that.