//false education, 20 years ago to teach children to learn OJ, is a beginners, hope the great god directions
//for AC and not optimal (
# include & lt; Iostream>
# include & lt; Stdio. H>
# include & lt; string.h>
# include & lt; Stdlib. H>
using namespace std;
Int main () {
Int t, t1;
Int m, n;
Char a1 [21] [1001], b1 [21] [1001].
Cin & gt;> t;
For (t1=0; T1 & lt; t; T1 + +) {
Cin & gt;> A1 (t1) & gt;> B1 (t1),
}
For (t1=0; T1 & lt; t; T1 + +) {
Char a [1001], [1001] b;
Int [1001] c={0}, [1001] d={0}, e [1001]={0};
Int I=0, p, q, k, j=0;
P=strlen (a1 (t1));
Q=strlen (b1 (t1));
for(i=0; i[I]=c a1 (t1) [p - I - 1) - '0'.
}
for(i=0; iD=b1 [I] [t1] [q - I - 1) - '0';
}
for(i=0; i<1001; I++) {
[I]=e (c + d [I] [I] + j) % 10;
J=(c + d [I] [I] + j)/10;
If (c [I]==0 & amp; & D==0) [I] {
K=I + 1;
break;
}
}
If (t1 & gt; 0 {
cout
Cout & lt; <"Case" & lt;
Cout & lt;
for (i=0; i
continue;
}
cout
}
return 0;
}