Lol

0

0 votes
Medium
Problem

Vaibhav is very lazy . He does not like solving the questions which consists of irrelevant story. So he solves only straightforward questions. So, he comes across such a question.

Given:
F(0) = 1, F(1) = 1;
F(n) = F(n-1) + F(n-2) + (3n)*n

Given T test cases each containing an integer N. Find F(N)%(1000000007)

CONSTRAINTS

1T105

1N1018

 

Sample Input
5
0
1
2
3
4
Sample Output
1
1
20
102
446
Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?