For this Question: Given an array <b>A</b> of <b>N</b> integers. Your teacher has asked you to find the maximum quotient of the array. Quotient of an array A of size N can be calculated in the following way:
1) Let the sum of the N elements of array A be <b>X</b>.
2) Let pre[] be another array of size N in which for every index i (1 <= i <= N), <b>pre<sub>i</sub></b> gives us the sum of elements <b>A<sub>1</sub> + A<sub>2</sub> +. . + A<sub>i</sub></b>.
3) Quotient of the array A will be equal to the <b>summation of the floored value of X/pre<sub>i</sub> over every value of i from 1 to N</b>.

You can swap any two elements of the array A. FInd the <b>maximum</b> possible quotient of array A.First line of the input contains a single integer N.
The second line contains N space seperated integers A<sub>i</sub>

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub> <= 10<sup>8</sup>Print the maximum possible quotient of array A.Sample Input:
3
1 1 3

Sample Output:
8

Explaination:
Array pre[] = [1, 2, 5]
Sum X of array A = 5
Quotient of array A = 5/1 + 5/2 + 5/5 = 5 + 2 + 1 = 8
It can be proved that their is no greater quotient of array A possible., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) {

                       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int arr[] = new int[n];
        long sum= 0;
        for(int i=0; i<n; i++){
            arr[i] = sc.nextInt();
            sum += arr[i];
        }
        Arrays.sort(arr);
        long currSum = 0;
        long ans = 0;
        for(int i=0; i<n; i++){
            currSum += arr[i];
            ans += sum/currSum;
        }
        System.out.println(ans);


    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?