Smallest number with sum of digits as N and divisible by 10^N
Submissions: 1580   Accuracy:

52.78%

  Difficulty: Easy   Marks: 2

Find the smallest number such that the sum of its digits is N and it is divisible by10^N.

Input:
The first line contains an integer T,  number of test cases. For each test case, there is an integer N.

Output:
For each test case, the output is the smallest number according to question.

Constraints:
1<=T<=100
1<=N<=100

Example:
Input

2
5
20
Output
500000‚Äč
29900000000000000000000

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Vanshika
Author: Vanshika_pec


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.