For this Question: Given three integers A, B and C. Your task is to calculate the number of integers which are factors of atleast two given numbers.<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>CommonFactors()</b> that takes the integers A, B and C as parameters.

<b>Constraints:</b>
1 <= A, B, C <= 100000Return the count of common factors.Sample Input:-
3 6 12

Sample Output:-
4

Explanation:- 1, 2, 3, 6 are the required factors

Sample Input:-
1 2 3

Sample Output:-
1, I have written this Solution Code: 

static int commonFactors(int A,int B,int C){
int cnt=0;
for(int i=1;i<=A;i++){
    if(A%i==0){
        if(B%i==0 || C%i==0){cnt++;}
    }
}
for(int i=1;i<=B;i++){
    if(B%i==0){
        if(A%i!=0 && C%i==0){cnt++;}
    }
}
return cnt;
}


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