import java.util.*;
import java.math.*;
class Main
{
public static void main
(String[] args
)
{
Scanner in =
new Scanner
(System.
in);
int t,tc,n=10;
tc = in.nextInt();
-
for (t=1;t<=tc;t++)
{
-
x=in.nextBigInteger(); y = in.nextBigInteger();
a=x;b=x;
-
-
{
a = a.mod(p);
s1 = a.add(s1.multiply(p));
b = b.divide(p);
a=b;
}
-
//System.out.print(s1);
-
a=y;b=y;
-
-
{
a = a.mod(p);
s2 = a.add(s2.multiply(p));
b = b.divide(p);
a=b;
}
-
s = s1.add(s2);
//System.out.print(s);
a = s ; b = s;
-
-
{
a=a.mod(p);
r = a.add(r.multiply(p));
b = b.divide(p);
-
{
-
}
-
a = b;
}
-
-
}
}
}
Comments
Post a Comment