Marks :10
: 6 | : 1
In the game of cricket, players can score runs by hitting the ball delivered at them(by another player called bowler) and running between designated spots(wickets).
Suppose if a player is only allowed to score 1,2,4 and 6 runs in a ball. How many ways can the player score $$$N$$$ runs without hitting consecutive 4s?
Print the answer modulo $$$10^9+7$$$.
The first line of input consists of a single integer $$$N$$$ - the number of runs to be scored. $$$(1 \leq N \leq 10^6)$$$
The output consists of a single integer - the number of ways $$$N$$$ runs can be scored without hitting consecutive 4s. Print the answer modulo $$$10^9+7$$$
6
19
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.