#P1011. The Enigmatic Integer List
The Enigmatic Integer List
Problem Description
In a distant, mystical land known as Numeria, there lies a peculiar village called Arithmetica. The villagers of Arithmetica are avid mathematicians, and they love playing mathematical games. In the heart of this village, there stands an ancient and enigmatic Tree of Numbers.
The Tree of Numbers is rumored to possess magical properties, granting great power to those who can decipher its secrets. Legend has it that if you present the Tree with a list of (n) integers, it will reveal the maximum possible product of two numbers from the list.
Now, you've been entrusted with a quest: help the villagers of Arithmetica by writing a program to unveil the Tree's mysteries and find the maximum product of two numbers from a given list.
Input Format
The first line contains an integer, (), representing the number of integers in the list. The second line contains integers (), separated by spaces. These integers represent the offerings to the Tree of Numbers.
Output Format
Output a single number, the maximum product of two numbers that can be obtained from the given list.
Sample
样例输入
6
1 2 3 4 5 6
样例输出
30
Hint
For all test cases, , and .
相关
在下列比赛中: