# include <stdio.h>
void gyakuten(char s[],char t[]){
int i,p=0;
for(i=0;s[i]!='\0';i++){
p++;
}
for(i=0;i<p;i++){
t[i]=s[p-i-1];
}
t[p]='\0';
}
int fuzzyStrcmp(char s[], char t[]){
int i;
for(i=0;s[i]==t[i];i++){
if(s[i]=='\0'){
return 1;
}
}
return 0;
}
int isPalindrome(char s[]){
//関数の中だけを書き換えてください
//回文になっているとき1を返す
//回文になっていないとき0を返す
char t[100];
gyakuten(s,t);
return fuzzyStrcmp(s,t);
}
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKdm9pZCBneWFrdXRlbihjaGFyIHNbXSxjaGFyIHRbXSl7CglpbnQgaSxwPTA7CgkKCWZvcihpPTA7c1tpXSE9J1wwJztpKyspewoJCXArKzsKCX0KCQoJZm9yKGk9MDtpPHA7aSsrKXsKCQl0W2ldPXNbcC1pLTFdOwoJfQoJdFtwXT0nXDAnOwp9CgppbnQgZnV6enlTdHJjbXAoY2hhciBzW10sIGNoYXIgdFtdKXsKCWludCBpOwoJCglmb3IoaT0wO3NbaV09PXRbaV07aSsrKXsKCQlpZihzW2ldPT0nXDAnKXsKCQkJcmV0dXJuIDE7CgkJfQkKCX0KCXJldHVybiAwOwp9CgppbnQgaXNQYWxpbmRyb21lKGNoYXIgc1tdKXsKCS8v6Zai5pWw44Gu5Lit44Gg44GR44KS5pu444GN5o+b44GI44Gm44GP44Gg44GV44GECgkvL+WbnuaWh+OBq+OBquOBo+OBpuOBhOOCi+OBqOOBje+8keOCkui/lOOBmQoJLy/lm57mlofjgavjgarjgaPjgabjgYTjgarjgYTjgajjgY3vvJDjgpLov5TjgZkKCWNoYXIgdFsxMDBdOwoJZ3lha3V0ZW4ocyx0KTsKCXJldHVybiBmdXp6eVN0cmNtcChzLHQpOwoJCn0KCgppbnQgbWFpbigpewogICAgY2hhciBzWzEwMF07CiAgICBzY2FuZigiJXMiLHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIixzLGlzUGFsaW5kcm9tZShzKSk7CiAgICByZXR1cm4gMDsKfQo=