# include <stdio.h>
int isPalindrome(char s[]){
int start=0;
int end=0;
while(s[end]!='\0'){
end++;
}
end--;
while(start < end){
if(s[start]!=s[end]){
return 0;
}
start++;
end--;
}
return 1; // すべて一致すれば回文
}
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CmludCBzdGFydD0wOwogICAgaW50IGVuZD0wOwogICAgd2hpbGUoc1tlbmRdIT0nXDAnKXsKICAgICAgICBlbmQrKzsKICAgIH0KICAgIGVuZC0tOwogICAgd2hpbGUoc3RhcnQgPCBlbmQpewogICAgICAgIGlmKHNbc3RhcnRdIT1zW2VuZF0pewogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICAgICAgc3RhcnQrKzsKICAgICAgICBlbmQtLTsKICAgIH0KICAgIAogICAgcmV0dXJuIDE7ICAvLyDjgZnjgbnjgabkuIDoh7TjgZnjgozjgbDlm57mlocKfQoKaW50IG1haW4oKXsKICAgIGNoYXIgc1sxMDBdOwogICAgc2NhbmYoIiVzIixzKTsKICAgIHByaW50ZigiJXMgLT4gJWRcbiIscyxpc1BhbGluZHJvbWUocykpOwogICAgcmV0dXJuIDA7Cn0K