File size: 350 Bytes
c4b0eef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#include <bits/stdc++.h>
using namespace std;
int reverse(int x)
{
int result=0;
while(x>0)
{
result= result * 10;
result= result + (x%10);
x= x/10;
}
return result;
}
int main()
{
int n=0,x=0,y=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d %d",&x,&y);
printf("%d\n",reverse(reverse(x)+reverse(y)));
}
return 0;
}
|