For this Question: Given a sequence A of length N. Find the sum of the products of all the tuples of three indices (disregarding order) present in the sequence.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>solve()</b> that takes an integer N and an array A as parameter.

<b>Constraints</b>
3<=N<=50
1<=A<sub>i</sub><=50Return one integer - the sum of products of all the tuples of three indices (disregarding order) present in the array.Sample Input:
4
1 2 4 5

Sample Output:
78

The different tuples of the three indices are (1, 2, 3), (1, 2, 4) and (2, 3, 4). The product of values (present)at these indices are 1*2*4 = 8, 1*4*5 = 20, 2*4*5 = 40 and their sum is 78., I have written this Solution Code: 
class Solution {
    long solve(int[] A, int N) {
        long ans = 0;
        for(int i = 0; i < N; i++){
            for(int j = i + 1; j < N; j++){
                for(int k = j + 1; k < N; k++){
                    ans += A[i] * A[j] * A[k];
                }
            }
        }
        return ans;
    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?