#K1756. Smallest Number with Given Digit Sum
Smallest Number with Given Digit Sum
Smallest Number with Given Digit Sum
You are given two integers X and S. Your task is to find the smallest integer n such that n \ge X and the sum of the digits of n equals S. In mathematical terms, find the minimum n satisfying:
\[ n \ge X \quad \text{and} \quad \sum_{d \in digits(n)} d = S \]
For example, if X = 100 and S = 5, the answer is 104 because 1 + 0 + 4 = 5 and 104 is the smallest number meeting these conditions.
inputFormat
The input is given via standard input. It consists of a single line with two space-separated integers X and S.
outputFormat
Output the smallest integer n that satisfies the conditions described above to the standard output.
## sample100 5
104