import java.util.Scanner;
import java.math.BigInteger;
class Main {
public static void main(String[] args){
Scanner in=new Scanner(System.in);
int t;
t=in.nextInt();
while(t-->0){
BigInteger a,b;
a=in.nextBigInteger();
b=in.nextBigInteger();
String s=new StringBuffer(a.toString()).reverse().toString();
a=new BigInteger(s);
s=new StringBuffer(b.toString()).reverse().toString();
b=new BigInteger(s);
a=a.add(b);
s=new StringBuffer(a.toString()).reverse().toString();
System.out.println(new BigInteger(s));
}
}
}
import java.math.BigInteger;
class Main {
public static void main(String[] args){
Scanner in=new Scanner(System.in);
int t;
t=in.nextInt();
while(t-->0){
BigInteger a,b;
a=in.nextBigInteger();
b=in.nextBigInteger();
String s=new StringBuffer(a.toString()).reverse().toString();
a=new BigInteger(s);
s=new StringBuffer(b.toString()).reverse().toString();
b=new BigInteger(s);
a=a.add(b);
s=new StringBuffer(a.toString()).reverse().toString();
System.out.println(new BigInteger(s));
}
}
}
Comments
Post a Comment