Created
January 22, 2020 14:22
-
-
Save dalcon10028/6974b7d12576ba60c3a58f241fae46a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| public static void main(String args[]) { | |
| Scanner sc = new Scanner(System.in); | |
| int N = sc.nextInt(); | |
| int[] realDivisor = new int[N]; | |
| for(int i=0; i<N; i++) | |
| realDivisor[i] = sc.nextInt(); | |
| sc.close(); Arrays.sort(realDivisor); | |
| System.out.print(realDivisor[0]*realDivisor[N-1]); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment