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 **10 ^{N}**.

Examples:

```
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
```

**Input:**

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**.

**Output:**

For each test case output the required answer on a new line.

**Constraints:**

1<=T<=50

0<=N<=100

**Example:
Input:**

2

6

19

6000000

1990000000000000000000

Author: harshitsidhwa

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.

makeitdonesolo | 64 |

ShubhamJain18 | 64 |

Bishnu Dev Panda | 54 |

DanishBansal | 50 |

abhithakur588 | 50 |

Bishnu Dev Panda | 777 |

yk12 | 512 |

okayboss | 490 |

DevMittal | 472 |

VijethaShastri | 431 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.