Question 398690
I'll denote the digits {{{a[1]}}}, {{{a[2]}}}, ..., {{{a[10]}}}. Since there are {{{a[1]}}} 1's, {{{a[2]}}} 2's, ..., {{{a[10]}}} 0's, then {{{sum(a[i], i = 1, 10) = 10}}} because there are ten digits in the number.


Suppose {{{a[10] = 0}}}. Then a contradiction would result, since there is at least one zero, so {{{a[10] >= 1}}}.


Suppose {{{a[10] = 1}}}. Then, this implies that there is exactly one zero within the number, and all the other {{{a[i]}}}'s are at least one, which also creates a contradiction due to the sum of digits. This can also apply to higher values of {{{a[10]}}}. If {{{a[10] = n}}}, then {{{sum(a[i], i = 1, 9) = 10-n}}}. Also, if n of the numbers { {{{a[1]}}}, {{{a[2]}}}, ..., {{{a[9]}}} } are zero, then 9-n of these numbers are greater than or equal to 1, and they sum up to 10-n.


By the Pigeonhole principle, exactly one of the 9-n numbers is equal to 2 and all other nonzero numbers are equal to 1 (this means, 8-n numbers equal to 1). Therefore the number has n zeros, 8-n 1's and one 2. We can easily guess and check based on the value of n, which can only range between 2 and 8. We see that the number 2100010006 satisfies all the given constraints, which happens when {{{n = 6}}}.