Help me in solving LBJ21 problem

My issue

My code

// Update the code below to solve this problem
import java.util.Scanner;

class Codechef
{
     public static int problemsSolved(int totalScore) {
        if (totalScore < 0 || totalScore % 100 != 0) {
            return -1; // Invalid score
        }

        return totalScore / 100; // Number of problems solved
    }
public static void main (String[] args)
	{
		Scanner read = new Scanner(System.in);
		
		int t = read.nextInt(); 
		 int[] testCases = new int[t];
		for(int i=0; i<t; i++)
		{
    		int p = read.nextInt();
            testCases[i] = read.nextInt();
		}
		for ( int j = 0; j < t; j++) {
            int numProblemsSolved = problemsSolved(testCases[j]);
            System.out.println( numProblemsSolved);
        }
	}
}

Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone

Can anyone inspect my code…

@sahil_2701
logic is not right
suppose n=9 you code will print -1 but the answer will be 9 he can pick 9 problems each of score 1 like it was told in the problem statement the questions can be of either 1 or 100 marks