|All-time Popular Problems|
|Delete Middle of Linked List|
|Find all four sum numbers|
|Find first set bit|
|Element with left side smaller and right side greater|
|Smallest Positive missing number|
|Intersection Point in Y Shapped Linked Lists|
|Largest Number formed from an Array|
|Reverse an Array|
Given a single integer N, your task is to find the smallest number such that the sum of its digits is N and it is divisible by 10N.
Input : N = 5 Output : 500000 500000 is the smallest number divisible by 10^5 and sum of digits as 5. Input : N = 20 Output : 29900000000000000000000
First line of the input contains an single integer T, denoting the number of test cases. Then T test cases follows. The only line of each test case contains a single integer N.
For each test case output the required answer on a new line.