#K43807. Maximum Product of Two Numbers
Maximum Product of Two Numbers
Maximum Product of Two Numbers
You are given a list of non-negative integers. Your task is to find the maximum product of any two distinct numbers from the list. In mathematical notation, given a list \(a_1, a_2, \ldots, a_n\), you need to compute \(\max_{1 \le i < j \le n} (a_i \times a_j)\).
Note: The list will contain at least two numbers.
inputFormat
The input is read from standard input (stdin) and consists of two lines. The first line contains a single integer \(N\) (\(N \ge 2\)), the number of elements in the list. The second line contains \(N\) space-separated non-negative integers.
outputFormat
Output a single integer which is the maximum product of two distinct numbers from the list. The output should be written to standard output (stdout).
## sample4
1 20 30 40
1200