#Z01491. 逻辑思维-乘法运算—最大乘法
逻辑思维-乘法运算—最大乘法
题目描述
You are given a sequence of N integers.
You should choose some numbers(at least one),and make the product of them as big as possible.
It guaranteed that the absolute value of any product of the numbers you choose in the initial sequence will not bigger than 2^63-1.
输入格式
In the first line there is a number T (test numbers).
For each test,in the first line there is a number N,and in the next line there are N numbers.
1≤T≤1000 1≤N≤62
You'd better print the enter in the last line when you hack others.
You'd better not print space in the last of each line when you hack others.
输出格式
For each test case,output the answer.
1
3
1 2 3
6
豫公网安备41072702000346号