All Submissions


Everyone has a favorite series and so I thought, it is time that I choose mine. But choosing a standard series is too mainstream. Hence, I created my own series :P, it is defined as :
Tn = 2Tn-1 + 2Tn-2 + Tn-3
where,
T0 = 0
T1 = 2
T2 = 5
Now, I will give you an integer N and you have to return the Nth term MOD 1000000007 of my series.

Input
T <= 200
0 <= N <= 109

Sample Input

5
0
1
2
3
4


Sample Output

0
2
5
14
40


Problem Setter : Pushkar Anand

Languages: AWK,Bash,Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0