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.
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.
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.
Input Example 2 3 7 Output Example 15 77
Shortest code ever written on spoj
i got TLE !!
shortest code ever.......:)
there is no '\n' in the input test cases as it appears....
Last edit: 2013-01-05 21:14:59
century with this question :-)