My issue
Anyone can check my code why some test case are not passing .
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
int N,K,P;
cin>>N>>P>>K;
int r=P%K;
int move=ceil(N/(float)K);
int ans=r*move;
ans+=(P-r)/K+1;
cout<<ans<<endl;
}
return 0;
}
Problem Link: CHFINVNT Problem - CodeChef