My issue
the last test case seems incorrect pls check forr that and update
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int a,b,x;
cin>>a>>b>>x;
int rect=a*b;
int sq=x*x;
int count=0;
if(sq>=rect){
cout<<0<<endl;
}
while(rect>sq){
if(a>=b){
a--;
rect=a*b;
count++;
}
else{
b--;
rect=a*b;
count++;
}
}
if(count>0){
cout<<count<<endl;
}
}
}
Problem Link: Magical World Practice Coding Problem