import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int testCase = sc.nextInt();
while(testCase --> 0) {
int a = sc.nextInt();
int b = sc.nextInt();
int revA = reverse(a);
int revB = reverse(b);
int ans = reverse(revA + revB);
System.out.println(ans);
}
}
static int reverse (int x){
int ans = 0;
while(x > 0){
int d = x % 10;
ans = ans * 10 + d;
x = x /10;
}
return ans;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: