Help me in solving MONSTER1 problem

My issue

I’m getting run time error

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc= new Scanner (System.in);
		int n=sc.nextInt();
		while(n>0)
		{
		    int Health = sc.nextInt();
		    int HitPoint= sc.nextInt();
		    int regain= sc.nextInt();
		    
		    if (HitPoint > regain)
		    {
		        System.out.println(1);
		    }
		    else
		    {
		        System.out.println(0);
		    }
		    n--;
		}
	}
}

Learning course: Prepare for your DSA interviews
Problem Link: Practice Problem in - CodeChef

@iyashmaurya
Use long instead of int because of high value of constraints.