PITPAIR  Pythagorean Legacy
It is necessary to find a minimal integer value R which is equal to the length of the hypotenuse (the side opposite the right angle) of N nonidentical rectangular triangles with integer lengths of sides.
Input
t  number of test cases [t <= 100], than t lines follow, each line contains one integer  N, equal
to the required number of different rectangular triangles. [1 <= N <= 2000]
Output
For each test case your program should output a number R in a separate line (R fits in a 64bit integer), equal to the minimal integer value of a hypotenuse for which exactly N different rectangular triangles can be constructed; then in separate lines follow exactly N numbers equal to the shorter cathetus (side adjacent to the right angle) of each of the rectangular triangles, in ascending order.
Example
Input: 2 1 2 Output: 5 3 25 7 15
hide comments
Tanmay:
20120916 14:08:15
Should the hypotenuse be in exactly N distinct triangles or the value of hypotenuse should be such that it is least and it appears in at least N distinct triangles?

Added by:  Roman Sol 
Date:  20050301 
Time limit:  2.25s 
Source limit:  8192B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO NODEJS PERL6 VB.NET 
Resource:  ZCon 2005 