Help me in solving PINGPONG1 problem

My issue

provide hint

My code

#include <stdio.h>

int main() {
	// your code goes here
    int t;
    scanf("%d",&t);
    for(int i=0;i<t;i++)
    {
        int K,S,N;
        scanf("%d%d%d",&K,&S,&N);
        if
    }
}


Problem Link: Ping Pong Practice Coding Problem