Abdelaleem has an integer $$$x$$$, yet he accidentally encounters the digit $$$d$$$. Fortunately, he has the ability to increment $$$x$$$ by one in a single operation ($$$x:= x + 1$$$). Could you assist him in determining the minimum number of operations required to ensure that $$$n$$$ no longer contains the digit $$$d$$$?
The first line contains an integer $$$T$$$ – the number of test cases.
For each test case:
The first line contains two integers $$$x$$$, and $$$d$$$ ($$$0 \leq d \leq 9$$$)($$$1 \leq x \leq 10^9$$$).
For each test case, output on a single line the minimum number of operations required to ensure that $$$n$$$ no longer contains the digit $$$d$$$.
421 58 8100 0484300 3
0 1 11 100
| Name |
|---|


