Help me in solving SLOWSOLN problem

My issue

i am not able to understand this question. can someone help me in this

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    int maxT,maxN,sumN;
	    cin>>maxT>>maxN>>sumN;
	    while(maxT--){
	        store = 
	    }
	}
	return 0;
}

Problem Link: SLOWSOLN Problem - CodeChef

@jyotirmay2000g
The questions says that you have sumN which is T * Nmax thus T can be calculated by sumN/Nmax;
and to have to maximize the iterations thus u will pick the max value of Nmax* min(Tmax,T) and (sumN%Nmax)*(sumN%Nmax) <— this is remaining n which will be < Nmax