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