1<=T<=400, 2<=n<=100, 1 <= x_i <= 250
第一组数据:
子集 1 : {2} ==> lcm = 2, gcd = 2, lcm*gcd = 4
子集 2 : {3} ==> lcm = 3, gcd = 3, lcm*gcd = 9
子集 3 : {2,3} ==> lcm = 6, gcd = 1, lcm*gcd = 6
答案 = 4 + 9 + 6 = 19
第二组数据:
子集 1 : {2} ==> lcm = 2, gcd = 2, lcm*gcd = 4
子集 2 : {4} ==> lcm = 4, gcd = 4, lcm*gcd = 16
子集 3 : {10} ==> lcm = 10,gcd = 10 , lcm*gcd = 100
子集 4 : {2,4} ==> lcm = 4, gcd = 2 , lcm*gcd = 8
子集 5 : {4,10} ==> lcm = 20,gcd = 2 , lcm*gcd = 40
子集 6 : {2,10} ==> lcm = 10,gcd = 2 , lcm*gcd = 20
子集 7 : {2,4,10} ==> lcm = 20,gcd = 2 , lcm*gcd = 40
答案 = 4 + 16 + 100 + 8 + 40 + 20 + 40 = 228