#P421. 练72.2 n-1位数
练72.2 n-1位数
Description
Given an unsigned integer that is greater than but not exceeding , if is an -digit integer (), find the number formed by the last digits of .
Input Format
The first line contains , indicating the number of test cases.
The next lines each contain one test case.
Output Format
Output lines, each containing the corresponding digit number (ignoring leading zeros). If all digits except the highest digit are , output .
Sample
4
1023
5923
923
100023
923
23
0