Help me in solving BMCV208D problem total number of games =N%30 how?

My issue

My code

// Update the code below to solve the problem
#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    int N;
	    cin >> N;
	    int total_games = N/30 ;
        int remaining_time = N % 30;
        cout << total_games << " " << remaining_time<< endl;
	}
	return 0;
}

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

@arsh_gill
N%30 will be the remaining time not total number of games