{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"如果一個數$n$的各位數字之和再加上$n$,得到新數$m$,那麼稱$n$是$m$的酷酷數。\n\n例如,245是256的酷酷數(245+2+4+5\u003d256)。\n\n現在,給你一個數,讓你求出它最小的酷酷數是多少。"}},{"title":"Input","value":{"format":"MD","content":"第一行輸入一個整數$m$,接下來的$m$行輸入整數$n$($1\\le n\\le100,000$)。"}},{"title":"Output","value":{"format":"MD","content":"對於每個$n$,輸出它的最小酷酷數。如果這個數不存在酷酷數,則輸出0。"}},{"title":"Sample","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 \n216 \n121 \n2005\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e198 \n0 \n1979\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"hint","value":{"format":"MD","content":"198是216最小的酷酷數:1+9+8+198\u003d216"}}]}