IIITD1 - Those College Days!


Once there was a Shikaari in IIIT Delhi campus and he was famous for his Shikaar techniques. Also there was Kalakhatta who was jealous of Shikaari’s charisma. Once Kalakhatta challenged Shikaari to test his knowledge. Now Shikaari’s afraid of losing, would you help?

You are given a number N and you have to increment the most significant digit without changing any other number in N. You can do this by adding a positive number X.

Input

The first line of the input consist of a single integer number T which determines the number of tests.

In each of next t lines there is a single integer number N.

Constraints

  • 0 < t ≤ 105
  • | n | ≤ 109

Output

Print the minimum number X in separate lines.

Example

Input:
2
5
15

Output:
1
10

hide comments
stcsteven: 2017-06-05 18:50:32

If n is -1 and the answer is 3, then does it mean if the number is negative, you would consider the negative mark as the MSD?

[Rampage] Blue.Mary: 2017-05-31 16:35:15

What if n is -1/9/89/99?

Edit: then x is 3/1/10/10

Last edit: 2017-05-31 17:16:46
Vipul Srivastava: 2017-05-31 13:38:26

What if n is 90?

Edit: then x=10 which makes n 100

Last edit: 2017-05-31 13:50:42

Added by:deathgun
Date:2017-05-30
Time limit:0.200s-0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:Original