My issue
Is there any syntax incorrectly,help will be much appreciated
My code
#include <iostream>
using namespace std;
int main() {
int T;
while (T--)
{
int X,Y;
cin>>X>>Y;
if(Y>X){
cout<<(X*1+(Y-X)*2)<<'\n';
}
else{
cout<<Y*1<<'\n';
}
return 0;
}
}
Learning course: Basic Math using C++
Problem Link: CodeChef: Practical coding for everyone