Problem: You are given two integers and , where . We will add to until the result is equal to . Thus, there will be exactly additions performed. For each such addition, let's look at the number of digits that will be changed after it.
For example:
- if , then adding one will result in and digits will be changed;
- if you add one to , the result will be and digits will also be changed;
- if you add one to , the result will be and digits will be changed.
Changed digits always form a suffix of the result written in the decimal system.
Output the total number of changed digits, if you want to get from , adding each time.
Input Format: The first line contains an integer (). Then test cases follow.
Each test case is characterized by two integers and ().
Output Format: For each test case, calculate the total number of changed digits if you want to get from , adding one each time.