#include<iostream>
using namespace std;
int main(){
int t,a,b;
scanf("%d",&t);
while(t--){
scanf("%d%d",&a,&b);
printf("%d\n",(a%100+b%100)%100);
}
return 0;
}
#include<iostream>
using namespace std;
int main(){
int t,a,b;
scanf("%d",&t);
while(t--){
scanf("%d%d",&a,&b);
printf("%d\n",(a%100+b%100)%100);
}
return 0;
}