Dice Combinations Cses Problem set problem code solution -
Dice Combinations Cses Problem set problem code solution dynamic programming code.
Problems statement-
Your task is to count the number of ways to construct sum by throwing a dice one or more times. Each throw produces an outcome between and .
For example, if , there are ways:
The only input line has an integer .
Output
Print the number of ways modulo .
Constraints
Input:
Output:
For example, if , there are ways:
The only input line has an integer .
Output
Print the number of ways modulo .
Constraints
Input:
3
Output:
4
Comments
Post a Comment