My issue
My code
// Update the code below to solve this problem
#include <iostream>
#include <string>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int X, Y;
cin>>X>>Y;
// X for problem A(500 initially)
// Y for problem B(1000 initially)
int total_score;
if (X>Y){
total_score = (1000 - Y*4) + (500 - (X+Y)*2);
}
else
total_score = (500 - X*2) + (1000 - (X+Y)*4);
cout << total_score <<"\n";
}
return 0;
}
Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone