question - Largest K (Div 4)
My code - include
include
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
long long int x, y;
cin >> x >> y;
// x = 0s, y = 1s, gap = x - 1
long long int gap = x - 1;
if(y%gap==0){
cout<<y/gap<<endl;
}
else if(y%gap!=0 ){
cout<<floor(y/gap)<<endl;
}
}
return 0;
}
What’s the error ?