For this Question: Given two positive integers N and X, where N is the number of total patients and X is the time duration (in minutes) after which a new patient arrives. Also, doctor will give only 10 minutes to each patient. The task is to calculate the time (in minutes) the last patient needs to wait.The first line of input contains the number of test cases T. 
The next T subsequent lines denote the total number of patients N and time interval X (in minutes) in which the next patients are visiting.

Constraints:
1 <= T <= 100
0 <= N <= 100
0 <= X <= 30Output the waiting time of last patient.Input:
5
4 5
5 3
6 5
7 6
8 2

Output:
15
28
25
24
56, I have written this Solution Code: import java.io.*;
import java.util.*;
class Main {
	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int T = Integer.parseInt(br.readLine());
			while (T -->0){
				String s[] = br.readLine().split(" ");
				int n = Integer.parseInt(s[0]);
				int p = Integer.parseInt(s[1]);
				if (p<10)
					System.out.println(Math.abs(n-1)*(10-p));

				else System.out.println(0);
			}
		}
	}, In this Programming Language: Java, Now tell me if this Code is compilable or not?