I'm reviewing for my final coming up and I'm not sure about my solution to this problem.
Find the number of integer solutions to $$x_1+x_2+x_3+x_4= 30$$ where $0\leq x_n <10$ for $1\leq n \leq 4$.
My first thought was to find the number of solutions where at least one of the x's is greater than ten and subtracting that from the total, which is equivalent to finding the number of integer solutions to
Find the number of integer solutions to $$x_1+x_2+x_3+x_4= 20.$$
That's a problem I know how to solve, and the answer is $nCr(23,20)=1771$.
Since there are $nCr(33,30)=5456$ total solutions, the final answer is $$5456-1771=3685.$$
Is this right?