Help me in solving BMJ208D problem

My issue

My code

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

class Codechef
{
	public static void main (String[] args)
	{
		Scanner read = new Scanner(System.in);
		
		int t = read.nextInt();
		for(int i=0; i<t; i++)
		{
    		int n = read.nextInt();
    		
    		int total_games = 30;
            int remaining_time = n % 30;

    		System.out.print(total_games + " ");
            System.out.println(remaining_time);
		}
	}
}

Learning course: Java for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

If you get 30 min for one game,
then you get 1 min for 1/30 game,
Finally, for x min, you get x / 30 games (using simple maths)
So, total number of games = x / 30, remaining = x % 30