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