# include <stdio.h>
int isPalindrome(char s[]){
//関数の中だけを書き換えてください
//回文になっているとき1を返す
//回文になっていないとき0を返す
int i,count;
count=0;
for(i=0;s[i]!='\0';i++){
count++;
}
char t[100];
t[count]='\0';
int count2;
count2=count;
for(i=0;i<count2;i++){
t[i]=s[count-1];
count--;
} //ここまでok
for(i=0;s[i]==t[i];i++){
if(s[i]==t[i])return 1;
printf("s[i]=%c,t[i]=%c\n",s
[i
],t
[i
]); }
return 0;
}
//メイン関数は書き換えなくてよいです
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CgkvL+mWouaVsOOBruS4reOBoOOBkeOCkuabuOOBjeaPm+OBiOOBpuOBj+OBoOOBleOBhAoJLy/lm57mlofjgavjgarjgaPjgabjgYTjgovjgajjgY3vvJHjgpLov5TjgZkKCS8v5Zue5paH44Gr44Gq44Gj44Gm44GE44Gq44GE44Go44GN77yQ44KS6L+U44GZCglpbnQgaSxjb3VudDsKCWNvdW50PTA7Cglmb3IoaT0wO3NbaV0hPSdcMCc7aSsrKXsKCQljb3VudCsrOwoJfQoJY2hhciB0WzEwMF07Cgl0W2NvdW50XT0nXDAnOwoJaW50IGNvdW50MjsKCWNvdW50Mj1jb3VudDsKCWZvcihpPTA7aTxjb3VudDI7aSsrKXsKCQl0W2ldPXNbY291bnQtMV07CgkJY291bnQtLTsKCX0gICAvL+OBk+OBk+OBvuOBp29rCglmb3IoaT0wO3NbaV09PXRbaV07aSsrKXsKCQlpZihzW2ldPT10W2ldKXJldHVybiAxOwoJCXByaW50Zigic1tpXT0lYyx0W2ldPSVjXG4iLHNbaV0sdFtpXSk7Cgl9CglyZXR1cm4gMDsKfQoKLy/jg6HjgqTjg7PplqLmlbDjga/mm7jjgY3mj5vjgYjjgarjgY/jgabjgojjgYTjgafjgZkKaW50IG1haW4oKXsKICAgIGNoYXIgc1sxMDBdOwogICAgc2NhbmYoIiVzIixzKTsKICAgIHByaW50ZigiJXMgLT4gJWRcbiIscyxpc1BhbGluZHJvbWUocykpOwogICAgcmV0dXJuIDA7Cn0K