5218: 【72课】【3421】n-1位数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:12 Solved:10

Description

已知w是一个大于 10但不大于 1000000 的无符号整数,若 wn(n2) 位的整数,则求出 w的后 n1 位的数。

Input

第一行为 M,表示测试数据组数。 接下来 M行,每行包含一个测试数据。

Output

输出 M 行,每行为对应行的 n1 位数(忽略前缀 0 )。如果除了最高位外,其余位都为 0,则输出 0

Sample Input Copy

4
1023
5923
923
1000

Sample Output Copy

23
923
23
0