Q).CodeChef: Practical coding for everyone

can someone tell what is wrong in this code,all test cases in question are giving correct ans still not able to submit??

```
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int x,y;
cin>>x;
cin>>y;
int temp=max(x,y);
y=min(x,y);
int b1= y /10;
int b2=y% 10;
x=temp;
int a1=x/10;
int a2=x%10;
int ans;
if(x < 10)
ans=x + y;
else if(y < 10){
ans= max(b2,a1)*10 + min(b2,a1)+a2;
}
else{
ans= max(a1,b2)*10+min(a1,b2)+ max(b1,a2)*10 +min(b1,a2);
}
cout<<ans<<endl;
}
return 0;
}
```