For this Question: You have entered the animated world of Pokémon and fortunately you have started your career as a Pokémon Trainer. Your first Pokémon is a Pikachu which is a cherry on top of the cake. Now it is your responsibility to increase your Pikachu's CP (Combat Power) using Power Bics. Consider that initially Cinitial is your Pikachu's CP and you can help him increase its CP to a maximum value, Cfinal.
In order to increase your Pokémon's CP in an efficient way you must make sure that after every increase in CP your Pokémon's CP value has exactly F unique prime factors. What is the maximum number of steps in which you can increase the CP of your Pokémon to the maximum possible (with F prime factors), considering every increase in CP as a step. If it is not possible to increase your Pikachu's CP then print -1.•	The first line of the input contains an integer T denoting the number of test cases. The description of 
         T-test cases follows:
•	The first line of each test case contains three space-separated integers, Cinitial, Cfinal and F.

Constraints:-
•	1 <= T <= 5000
•	1 ≤ Cinitial ≤ Cfinal ≤ 10^6
•	0 ≤ F ≤ 10For each test case, print an integer which is the maximum number of steps to increase Pokémon's CP.Sample Input:-
3
3 5 1
3 6 2
3 10 3

Sample Output:-
2
1
-1, I have written this Solution Code: import java.io.*;
import java.util.*;



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

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine());
        StringBuilder sb = new StringBuilder();
        int[] ci=new int[t];
        int[] cf=new int[t];
        int[] f=new int[t];
        int count=0;
        for(int i=0;i<t;i++){
            String[] line = br.readLine().split(" ");
            ci[i] = Integer.parseInt(line[0]);
            cf[i]=Integer.parseInt(line[1]);
            f[i]=Integer.parseInt(line[2]);

            if(cf[i]>count)
            count=cf[i];
        }




            boolean[] isPrime=new boolean[count+1];
            for(int i=2;i<=count;i++){
                isPrime[i]=true;
            }
            for(int i=2;i<=count;i++){
                 if(isPrime[i]){
                      for(int j=2*i;j<=count;j+=i){
                          isPrime[j]=false;
                      }
                 }
            }
            int[] a=new int[count+1];
            for(int j=2;j<=count;j++){
                for(int i=1;i*i<=j;i++){
                    if(j%i==0){
                        if(j/i==i){
                            if(isPrime[i]){
                                a[j]++;
                            }
                        }
                        else{
                            if(isPrime[i]){
                                a[j]++;
                            }
                             if(isPrime[j/i]){
                                a[j]++;
                            }
                        }
                    }
                }
            }
            for(int i=0;i<t;i++){
                int coun=0;
                for(int j=ci[i]+1;j<=cf[i];j++){
                    if(a[j]==f[i]){
                        coun++;
                    }
                }
                if(coun==0)
                sb.append(-1+"\n");
                else
                 sb.append(coun+"\n");
            }


        System.out.print(sb.toString());
    }
}



























































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