SP279 INUMBER - Interesting number
Description
For the given number $n$ find the minimal positive integer divisable by $n$, with the sum of digits equal to $n$.
Input Format
$t$ – the number of test cases, then $t$ test cases follow. ($t \le 50$)
Test case description:
$n$ - integer such that $0 < n \le 1000$
Output Format
For each test case output the required number (without leading zeros).