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