My issue
not gettin ans vro when submitted, but when i ran the code it got correct output
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int n,tot, x, unrated,t,now;
cin >> t;
while(t--)
{
cin >> n >> x;
tot = n*2;
now == tot%x;
if (n!=x && x!=6)
{
cout << x << endl;
}
else if(x > n && tot > x)
{
cout << n << endl;
}
else
{
cout << "0" << endl;
}
unrated = tot - x ;
}
return 0;
}
Problem Link: Chess Pairing Practice Coding Problem - CodeChef