TERMN - N-th Term
Find the n-th term of the sequence 1, 4, 16, 36, 100, ...
Input
First Line : T (No. of test cases < 1000)
T Lines each containing a value of n (n < 100000)
Output
Exactly T lines each containing n-th term of the sequence.
Example
Input: 4
2
3
4
5
Output: 4
16
36
100
hide comments
numerix:
2013-09-11 13:53:26
@Mukund Kumar: Thanks! It's enough for Python, now. |
|
Mukund Kumar:
2013-09-11 04:57:01
@numerix:time limit has been changed :) |
|
numerix:
2013-09-11 04:57:01
The time limit is too strict for Python (and probably for Java, too).
|
Added by: | Mukund Kumar |
Date: | 2013-08-30 |
Time limit: | 0.100s |
Source limit: | 300B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C CSHARP C++ 4.3.2 CPP C99 JAVA PYTHON PYTHON3 PY_NBC |
Resource: | Self |