After having a great start in the world of coding, you now have a challenge in front of you to show others that you are better than them. But for that you need to solve my problem.
I am a man who loves numbers. Your tasks are as follows:-
Your task is to remove the Fibonacci series from the sequence and find the factorial of the remaining numbers. Your final move would be to show the show the sum of all the factorials MOD 10^9 + 7.
Check the explanation for better understanding.
0<=N<=100000
Input will be just a single number 'N'
Print a single number showing the sum of the factorials MOD 10^9 +7 .
9
368664
Let N be 9
Fibonacci Series : 0 1 1 2 3 5 8
Sequence: 0 1 2 3 4 5 6 7 8 9
After removing Fibonacci series from the sequence, you are left with : 4 6 7 9
Now find the factorial of the remaining numbers (ie. 4,6,7,9) and finally print their sum % 10^9 +7