Number of integers having property

44 Views Asked by At

Find how many integers $z$ occur from $1$ to $N$ such that they have one $1s$, or two $2s$ or ... or nine $9s$.
Eg: 11232 is valid as it has two $2s$.