FAST2 - Fast Sum of two to an exponent
There is people that really like to do silly thinks, one of them is sum the numbers from 20 to 2n, task is actually really simple, just do a ultra fast sum of term 20 to 2n.
Input
The first line starts with a number, T, which is the number of test cases, T lines will follow.
Each line contains the number "n".
0 ≤ n ≤ 500
Output
Output the sum from 20 to 2n MODULO 1298074214633706835075030044377087.
Example
Input: 3
0
1
2
Output: 1
3
7
Extra: TLE is equal to 0.15s
hide comments
|
(Tjandra Satria Gunawan)(曾毅昆):
2012-05-04 02:53:09
No need to use BigInt ;)
|
Added by: | Rocker3011 |
Date: | 2012-04-14 |
Time limit: | 0.100s |
Source limit: | 500B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own problem |