Problem Description
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×S(n)=b×S(2n).
If there is no such number then output 0.
Input
The first line contains the number of test caces T(T≤10).
The next T lines contain two positive integers a,b(0<a,b<101).
Output
Output the answer in a new line for each test case.
Sample Input
3
2 1
4 1
3 4
Sample Output
1
0
55899
https://blog.csdn.net/DorMOUSENone/article/details/71223368
while(2n<2147483647){
While(n/10!=0){
Counta+=n%10;
}
Counta+=n;
While(2*n/10!=0){
Countb+=2*n%10;
}Countb+=2n;
if(counta==countb){
printf("%d",n)
return;
}
n++;
}