My issue
so in this problem how do I avoid getting runtime error
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
long n,k;
cin>>n>>k;
if(n<k){
cout<<n<<endl;
}
else{
cout<<n%k<<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