My issue
the code is working fine in other flatform but in this it is showing that it doesnt satisfy expected output
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
int x[t],y[t];
for(int i=0;i<t;i++)
{
cin>>x[i]>>y[i];
}
for(int i=0;i<t;i++)
{
if(x[i]>y[i])
{
cout<<x[i]-(2*y[i])<<endl;
}
else
{
cout<<2*y[i]-x[i]<<endl;
}
}
return 0;
}
Learning course: Basic Math using C++
Problem Link: CodeChef: Practical coding for everyone