Statement

Imagine a game where, in each turn, a player can score either 1,21, 2 or 44 runs. Given a score, n, find the total number of ways to score n runs.

Examples

To score 33 runs, a player can score in the following three ways:

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