My issue
My code
import java.util.Scanner;
public class IPLTicketBooking {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Read the number of test cases
int T = scanner.nextInt();
// Iterate over the test cases
for (int i = 0; i < T; i++) {
// Read the values of N and M
int N = scanner.nextInt();
int M = scanner.nextInt();
// Calculate the number of students who won't be able to book tickets
int studentsWithoutTickets = 0;
if (M < N) {
studentsWithoutTickets = N - M;
}
// Print the result
System.out.println(studentsWithoutTickets);
}
scanner.close();
}
}
Problem Link: KITCHENTIME Problem - CodeChef