
1. 'K' should be strictly greater than 'N'.
2. 'K' should contain at most 1 non-zero digit.
3. Difference between 'N' and 'K' should be minimum.
Consider the number 546. The closest number greater than 546 that contains at most 1 non-zero digit is 600.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The first and the only line of each test case contains a positive integer ‘N’.
For each test case, print a single line containing a single integer denoting the number 'K' as described above in a single line.
The output for each test case will be printed in a separate line.
You don’t have to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 1000
1 <= N <= 10 ^ 18
Time limit: 1 second
If we see the pattern, we can see that we just have to increment the first digit by one and replace the rest of the digits by zero.
For example: