Given a positive number N and a number D. Write a program to find the count of numbers smaller than N such that the difference between the number and sum of its digits is greater than or equal to given specific value D.

**Input:**

First line of input contains a single integer T which denotes the number of test cases. Then T test cases follows. First line of each test case contains two space separated integers N and D.

**Output:**

For each test case, print the count of numbers smaller than N such that the difference between the number and sum of its digits is greater than or equal to D.

**Constraints:**

1<=T<=100

1<=N<=10^{5}

1<=D<=10^{4}

**Example:
Input:**

2

13 2

14 3

4

5

Author: harsh.agarwal0

TheRagnarok | 107 |

Abhay Raghav | 80 |

TS006 | 78 |

rajpratim Bhattachar | 71 |

PriyaGupta6 | 70 |

skirmish | 420 |

Mithun Kumar | 404 |

???151 | 401 |

Deepanshu8391 | 391 |

ultra_instinct | 369 |

akhayrutdinov | 4748 |

Quandray | 3922 |

sanjay05 | 3668 |

Ibrahim Nash | 3664 |

surbhi_7 | 2816 |