Is there general formula for the find non-negative solutions of the following system $$x_1+x_2+\cdots +x_k=n$$ such that $x_1\leq r_1 , \cdots,x_k\leq r_k$ and $0\leq n\leq r_1+r_2+\cdots +r_k$?
I could find closed formula for the solutions of the following system $$x_1+x_2+\cdots +x_k=n$$ with restriction $x_i\leq r$. It is equal $$ \sum_{t=0}^k(-1)^t\binom kt\binom{n-t(r+1)+k-1}{k-1}\;, $$ (with inclusion-exclusion).
For example, How can find solutions of the system $$x_1+x_2+x_3=k$$ Such that $x_1\leq \alpha, x_2\leq \beta$ and $x_3\leq \gamma$