Forgot Password ?
New password will be sent to following email id
Who will Pay for the Movie?
Problem Code : MOVIE
Time Limit :
C , C++ , Java , Python 2
Login to submit your response.
Chotu and Motu are going to watch Transformers: The Last Knight. Now, since Motu just received his first paycheck so chotu wants him to pay for the movie and Motu being a niggard, doesn't want to spend any extra penny. <br> After a lot of discussion Motu agree to pay for the movie if and only if they get two consecutive signals red on their way from Motu's PG to the theater. <br> Now, Chotu is weak in Maths and wants your help to find the number of ways in which he would end up paying for the movie. <br> As the number of ways can be too large, take your answer modulo 1000000007. <br><br> <b>Note:</b><br> The signal could be either Red or Green only.<br> The final answer will be the sum of answers of all the test cases modulo 1000000007.
The first line contains a single integer <b>T</b> denoting the number of test cases. <br>Following <b>T</b> lines consist of a single integer <b>N</b> denoting the number of signals in their way from Motu's PG to the theater.
Output the sum of answers of all the test cases modulo 1000000007.
1 ≤ <b>T</b> ≤ 100000 <br> 1 ≤ <b>N</b> ≤ 100000 <br>
There are a total of 4 possible scenarios: Green Green, Green Red, Red Green, Red Red. <br> Out of these 4 scenarios, Chotu will have to pay in the first three scenarios. <br> The final answer is the sum of answer of all the test cases, i.e. 3.