Number Theory

Given a positive integer n, you are to find am integer f, such that: f 3 = a 31 + a 32 + · · · + a 3n where all a1, a2, . . . , an are distinct positive integers. For example, if n = 3, one valid f is 71, since 713 = 143 + 233 + 703 = 357911. if n = 4, one valid f is 100, since 1003 = 563 + 583 + 673 + 693 = 1000000. Your number f may be big, but it has at most 250 digits. Input The first line contains the number of tests t (1 ≤ t ≤ 20). Each case contains a single line with a positive integer n (1 ≤ n ≤ 100). Output For each test case, print the case number and n + 1 numbers: f, a1, a2, . . . , an. If no f exists, print a ‘-1’ and n zeros. Sample Input 3 3 2 4 Sample Output Case 1: 71 14 23 70 Case 2: -1 0 0 Case 3: 100 56 58 67 69