The first line of the input contains one integer \(t(1\leq t\leq 2*10^4)\) — the number of test cases. Then \(t\) test cases follow.
The only line of the test case contains two integers \(n\) and \(s(1\leq n\leq 10^{18},1\leq s\leq 162)\).
5
2 1
1 1
500 4
217871987498122 10
100000000000000001 1
8
0
500
2128012501878
899999999999999999