The end of world is near! One day, the astronomer Readykaka received two numbers from outer space. She cannot correctly decode it. The only thing she knows is to permute two numbers such that the absolute difference between them is minimized. That maybe means the mysterious countdown time (cd time) of next wave...
Please help Readykaka to figure out this important message. Note that we can insert any number of zeroes to these numbers, and leading zeros are allowed. All numbers are calculating on base 10.
First line contains an integer T (T<=100) denoting the number of test case. For each test case, contains two integers A and B (0<=A, B<109) seperated by whitespaces.
For each test case, please output the answer in a line.
5 99 1 25 12 309 196 1 555555555 0 555555555
1 4 13 444444445 555555555
Migrated from old NTUJ.
tmt514
No. | Testdata Range | Score |
---|