CRDS  Cards
Maricruz have a lot of cards, she always uses her cards to build pyramids as shown in the following image:
A pyramid card of 3 levels. She always wonder how many cards does she need to make a pyramid card of N levels. Your task is to answer that question.
Input
The first line of the input contains an integer 1 <= T <= 1,000. Each of the following T lines will have an integer 1 <= N <= 1,000,000.
Output
For each case, output a single line consisting of the number of cards needed to build a pyramid card of level N modulo 1,000,007.
Example
Input Example 2 3 7 Output Example 15 77
hide comments
shyam vinay:
20140513 05:00:50
Note, there's an extra blank line after reading in T value. It costed me 2 WAs. 

SHIVAM DIXIT:
20140429 08:35:40
http://cf.ltkcdn.net/boardgames/images/std/50408283x424Card_pyramid.jpg


sarelfeniel:
20140123 08:34:57
Here is the image from KP on a previous page.


Ankit Jain:
20140114 17:12:17
very easy.....:) 

xx_xx:
20140114 08:27:22
after 2 times get TLE. nice problem.. :) 

Manit Gupta:
20131224 11:17:03
shortest code ever. ;) Last edit: 20131224 11:17:15 

Ruchir Sharma:
20131111 18:54:49
I am not able to see the image.. Where is the image ?


ওয়াসী (Wasi):
20131118 17:24:42
28B in AWK :P 

Mostafa 36a2:
20131019 19:09:11
Why all these spoliers Here !!!


kk:
20130916 17:24:49
i'm getting TLE ...any 1 help 
Added by:  Paulo Costa 
Date:  20120130 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  UGTO 