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 ≤ 10^{5}
  n  ≤ 10^{9}
Output
Print the minimum number X in separate lines.
Example
Input:
2
5
15
Output:
1
10
hide comments
ajayc1007:
20180108 17:37:11
C++14 (gcc 6.3) => Wrong ans,


venkat016:
20180107 17:12:50
Thanks to @prasad_235 Last edit: 20180107 21:03:40 

anurag garg:
20170812 10:47:45
Any tricky test cases? 

amulyagaur:
20170726 20:25:00
AC in 1 go :) 

kooljais24:
20170620 01:03:59
@stcsteven it's not mainly about the negetive sign as MSD. 

TLE:
20170614 11:25:09
Last edit: 20170614 13:07:58 

sharonbarak:
20170610 19:13:35
Why is x = 3 for n = 1? 

stcsteven:
20170605 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? 
Added by:  deathgun 
Date:  20170530 
Time limit:  0.200s0.5s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  Original 