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