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