# include <stdio.h>
int isPalindrome(char s[]){
int i=0, count=0;
char copy[100];
for(int j=0; s[j]!='\0'; j++) count++;
copy[count] = '\0';
for(i=0; i < count; i++){
copy[i] = s[count - i - 1];
//printf("%c",copy[i]);
}
for(i=0; s[i]!='\0'; i++){
if(s[i] != copy[i]) return 0;
}
return 1;
}
//メイン関数は書き換えなくてよいです
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CglpbnQgaT0wLCBjb3VudD0wOwogICAgY2hhciBjb3B5WzEwMF07CgkKCWZvcihpbnQgaj0wOyBzW2pdIT0nXDAnOyBqKyspIGNvdW50Kys7CgkKCWNvcHlbY291bnRdID0gJ1wwJzsKCQogICAgZm9yKGk9MDsgaSA8IGNvdW50OyBpKyspewogICAgICAgIGNvcHlbaV0gPSBzW2NvdW50IC0gaSAtIDFdOwogICAgICAvL3ByaW50ZigiJWMiLGNvcHlbaV0pOwogICAgfQogICAgcHJpbnRmKCJcbiIpOwogICAKICAgIGZvcihpPTA7IHNbaV0hPSdcMCc7IGkrKyl7CiAgICAgICAgaWYoc1tpXSAhPSBjb3B5W2ldKSByZXR1cm4gMDsKICAgIH0KICAgIHJldHVybiAxOwp9CgovL+ODoeOCpOODs+mWouaVsOOBr+abuOOBjeaPm+OBiOOBquOBj+OBpuOCiOOBhOOBp+OBmQppbnQgbWFpbigpewogICAgY2hhciBzWzEwMF07CiAgICBzY2FuZigiJXMiLHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIixzLGlzUGFsaW5kcm9tZShzKSk7CiAgICByZXR1cm4gMDsKfQo=