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 non-identical rectangular triangles with integer lengths of sides.
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]
For each test case your program should output a number R in a separate line (R fits in a 64-bit 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.
Input: 2 1 2 Output: 5 3 25 7 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?