# include <stdio.h>
int isPalindrome(char s[]){
int len = 0;
while (s[len] != '\0') {
len++;
}
for (int i = 0; i < len / 2; i++) {
if (s[i] != s[len - i - 1]) {
return 0;
}
}
return 1;
}
//メイン関数は書き換えなくてよいです
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CiBpbnQgbGVuID0gMDsKICAgIHdoaWxlIChzW2xlbl0gIT0gJ1wwJykgewogICAgICAgIGxlbisrOwogICAgfQoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbGVuIC8gMjsgaSsrKSB7CiAgICAgICAgaWYgKHNbaV0gIT0gc1tsZW4gLSBpIC0gMV0pIHsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIDE7IAp9CgovL+ODoeOCpOODs+mWouaVsOOBr+abuOOBjeaPm+OBiOOBquOBj+OBpuOCiOOBhOOBp+OBmQppbnQgbWFpbigpewogICAgY2hhciBzWzEwMF07CiAgICBzY2FuZigiJXMiLHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIixzLGlzUGFsaW5kcm9tZShzKSk7CiAgICByZXR1cm4gMDsKfQo=