Panda and Maximum product
Practice
3.8 (18 votes)
Ad Hoc
Basic programming
Open
Approved
Easy
Mathamatics
Problem
92% Success 14959 Attempts 20 Points 3s Time Limit 256MB Memory 1024 KB Max Code

Panda has started learning about subsets. His professor gave him a simple task. Given a list of numbers, Panda has to choose the subset which gives the maximum product. However, the professor asked Panda only to submit the maximum product obtained by taking exactly two numbers from the list. Please help Panda in finding out the answer to this assignment.

Input Format:

The first line will contain the integer N, the length of the array. The next line contains N space separated integers.

Output Format:

For each test case, output Panda's query.

Constraints:

2 <= N <= 105

  • Subtask 1: (25 points)
    0 <= Integers <= 109

  • Subtask 2: (75 points)
    -109 <= Integers <= 109

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
2 votes
Tags:
Ad-HocMathematicsEasySimple-mathMathematicsMathematicsMathamatics
Points:20
17 votes
Tags:
MathematicsOpenApprovedEasyMathamatics
Points:20
2 votes
Tags:
ImplementationEasySimple-math