Let $S(N)$ be digit-sum of $N$, i.e $S(109)=10,S(6)=6$.
If two positive integers $a,b$ are given, find the least positive integer $n$ satisfying the condition $a\times S(n)=b\times S(2n)$.
If there is no such number then output 0.
The first line contains the number of test caces $T(T\leq 10)$.
The next $T$ lines contain two positive integers $a,b(0<a,b<101)$.
Output the answer in a new line for each test case.
"巴卡斯杯" 中国大学生程序设计竞赛 - 女生专场