Every day a student solves one, two or three problems. Find the number of distinct ways 
Every day a student solves one, two or three problems. Find the number of distinct ways                                                                             
a) he solves problems in 30 days,                                          
b) he solves 50 problems,
c) he solves 50 problems in 30 days

Answer. For part A I guess We will say there are three option for the first day 1, 2 or 3 and second day it will go on like that the answer is $3^{20}$. But for part B and part C I couldn't think anything Thanks for any help guys.

Hint. As regards b) note that if for $d_i$ days he solves $i$ problems for $i=1,2,3$ then $d_1+2d_2+3d_3=50$ and this can be done in
$$\frac{(d_1+d_2+d_3)!}{d_1!\cdot d_2!\cdot d_3!}.$$
For c) we have another constraint: $d_1+d_2+d_3=30$.
P.S. Generating function approach. The answers for b) and c) are given respectively by (WA-link)
$$[x^{50}]\sum_{k=0}^{\infty}(x+x^2+x^3)^{k}=[x^{50}]\frac{1}{1-(x+x^2+x^3)},$$
and (WA-link)
$$[x^{50}]((x+x^2+x^3)^{30}).$$
