时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
Today,
ZLZX has a mysterious case:
Orange lost his down jacket hanging in his dorm room. Under the expectations of everyone, d
etective Groundhog took his small spoon of the artifact and started the journey to solve the case. After an in-depth investigation of the northernmost mysterious room on each floor, Groundhog
discovered
mysterious numbers.
As long as the clues conveyed by these numbers are deciphered, he can reveal the truth of the matter. The deciphering method is: using these numbers to generate two positive integers without leading zeros, and minimizing the product of these two positive integers is the final clue.
Then Groundhog wants to know: What is the smallest product? As he continued to investigate in the room west of the new building, he gave you the question.
Concise meaning:Given n numbers between 0 and 9, use them to make two positive integers without leading zeros to minimize the product.
输入描述:
The first line of input is a single integer

,the number of test cases.
For each set of data:
Each test case begins with a single integer

, the count of numbers.
The next line are
numbers.
输出描述:
For each set of Case, an integer is output, representing the smallest product.
备注:

There are at least two Numbers that are guaranteed not to be zero.
The Numbers range between

.