HMMT-Feb 2016 guts, Problem 7

A contest has six problems worth seven points each. On any given problem, a contestant can score either 0,1 , or 7 points. How many possible total scores can a contestant achieve over all six problems?

Solution: For $0 \leq k \leq 6$, to obtain a score that is $k(\bmod 6)$ exactly $k$ problems must get a score of 1 . The remaining $6-k$ problems can generate any multiple of 7 from 0 to $7(6-k)$, of which there are $7-k$. So the total number of possible scores is $\sum_{k=0}^{6}(7-k)=28$. $\fbox{28}$.

Answer: 28