# Count Ways to Score in a Game

Let's solve the Count Ways to Score in a Game problem using Dynamic Programming.

## Statement

Suppose there is a game where a player can score either

Note:You may assume that you can use a specific score as many times as you want. Additionally, the order in which we select scores from the list is significant.

Let's say the total points to be earned are

$1, 1$ and$1$ , in three turns:$1+1+1 = 3$ .$1$ and then a$2$ , in two turns:$1 + 2 = 3$ .$2$ and then a$1$ , in two turns:$2 + 1 = 3$ .

**Constraints:**

$0$ <=$n$ <=$78$

## Examples

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.