My issue
explain the problem
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
long long int N,K;
cin>>N>>K;
if(N<K){
cout<<N<<endl;
}else{
cout<<N-(N/K)*K<<endl;
}
// int res;
// while(N>=0){
// res=N;
// N-=K;
// }
// cout<<res<<endl;
}
}
Learning course: Level up from 1* to 2*
Problem Link: Smallest Possible Whole Number Practice Problem in Level up from 1* to 2* - CodeChef