OJ-Problems-Source/HDOJ/5948.cpp
2016-11-05 15:56:44 +08:00

19 lines
274 B
C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",max(2*a+b,2*b+a));
}
return 0;
}