# include <stdio.h>
int isPalindrome(char s[]){
char r[100];
int f;
int i;
int n;
for(i=0; s[i] != 0x00; i++){
n = i;}
for(i=0; i<n; i++){
r[i] = s[n-1-i];
}
r[n] = 0;
f=0;
for(i=0; i<n-1; i++){
if(s[i] != r[i])
f++;
}
if(f){
return 1;
}else{
return 0;
}
}
//メイン関数は書き換えなくてよいです
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CmNoYXIgclsxMDBdOwppbnQgZjsKaW50IGk7CmludCBuOwpmb3IoaT0wOyBzW2ldICE9IDB4MDA7IGkrKyl7CiAgICBuID0gaTt9CiAgICAKICAgICAgICBmb3IoaT0wOyBpPG47IGkrKyl7CiAgICAgICAgcltpXSA9IHNbbi0xLWldOwogICAgfQogICAgcltuXSA9IDA7CiAgICBmPTA7CiAgICAKICAgICBmb3IoaT0wOyBpPG4tMTsgaSsrKXsKICAgICAgICBpZihzW2ldICE9IHJbaV0pCiAgICAgICAgZisrOwogICAgfQogICAgaWYoZil7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9ZWxzZXsKICAgICAgICByZXR1cm4gMDsKICAgIH0KICAKICAgIAoKfQoKLy/jg6HjgqTjg7PplqLmlbDjga/mm7jjgY3mj5vjgYjjgarjgY/jgabjgojjgYTjgafjgZkKaW50IG1haW4oKXsKICAgIGNoYXIgc1sxMDBdOwogICAgc2NhbmYoIiVzIixzKTsKICAgIHByaW50ZigiJXMgLT4gJWRcbiIscyxpc1BhbGluZHJvbWUocykpOwogICAgcmV0dXJuIDA7Cn0K