#include <stdio.h>
int hui(y) {
int s, c = 0;
s = y;
for (; s > 0;) {
c = c * 10 + s % 10;
s = s / 10;
}if (c == y) return 0;
else return 1;
}
int main(void) {
int m,n,c;
scanf("%d", &m);
for (; m > 0; m--) {
scanf("%d", &n);
if (n < 10) printf("%d\n", n);
else {
c = n;
for (; hui(c);) {
c = c+ 1;
}
printf("%d\n", c);
}
}
return 0;
}
第一次学会使用自己定义的函数