{"trustable":false,"sections":[{"title":"题目描述","value":{"format":"MD","content":"如果一个数$n$的各位数字之和再加上$n$,得到新数$m$,那么称$n$是$m$的数字发生器\n\n例如,256的发生器是245(245+2+4+5\u003d256)。\n\n现在,给你一个数,让你求出它的最小的数字发生器。\n\n\n\n"}},{"title":"输入格式","value":{"format":"MD","content":"第一行一个整数$m$,随后$m$行输入整数$n$($1\\le n\\le100,000$)。"}},{"title":"输出格式","value":{"format":"MD","content":"对每个n输出它的最小的数字发生器,如果这个数不存在发生器,那么输出0"}},{"title":"样例输入","value":{"format":"MD","content":"```plaintext\n3 \n216 \n121 \n2005\n```"}},{"title":"样例输出","value":{"format":"MD","content":"```plaintext\n198 \n0 \n1979\n```"}}]}