# include <stdio.h>
int isPalindrome(char s[]){
//関数の中だけを書き換えてください
//回文になっているとき1を返す
//回文になっていないとき0を返す
char ss[100];
static int x;
int i;
for(x=0; s[x]!='\0'; x++)
;
int y = x;
for(i=0; i<=x-1; i++){
ss[i] = s[y-1];
y--;
}
ss[i] = '\0';
int j;
for(j=0;s[j]==ss[j];j++){
if(s[j]=='\0') return 1;
}
return 0;
}
//メイン関数は書き換えなくてよいです
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CgkvL+mWouaVsOOBruS4reOBoOOBkeOCkuabuOOBjeaPm+OBiOOBpuOBj+OBoOOBleOBhAoJLy/lm57mlofjgavjgarjgaPjgabjgYTjgovjgajjgY3vvJHjgpLov5TjgZkKCS8v5Zue5paH44Gr44Gq44Gj44Gm44GE44Gq44GE44Go44GN77yQ44KS6L+U44GZCgkJY2hhciBzc1sxMDBdOwoJc3RhdGljIGludCB4OwoJaW50IGk7CgkKCWZvcih4PTA7IHNbeF0hPSdcMCc7IHgrKykKCTsKCWludCB5ID0geDsKCWZvcihpPTA7IGk8PXgtMTsgaSsrKXsKCQlzc1tpXSA9IHNbeS0xXTsKCQl5LS07Cgl9Cglzc1tpXSA9ICdcMCc7CgkKCWludCBqOwoJZm9yKGo9MDtzW2pdPT1zc1tqXTtqKyspewogICAgICAgIGlmKHNbal09PSdcMCcpIHJldHVybiAxOwogICAgfQogICAgcmV0dXJuIDA7Cn0KCi8v44Oh44Kk44Oz6Zai5pWw44Gv5pu444GN5o+b44GI44Gq44GP44Gm44KI44GE44Gn44GZCmludCBtYWluKCl7CiAgICBjaGFyIHNbMTAwXTsKICAgIHNjYW5mKCIlcyIscyk7CiAgICBwcmludGYoIiVzIC0+ICVkXG4iLHMsaXNQYWxpbmRyb21lKHMpKTsKICAgIHJldHVybiAwOwp9Cg==