# include <stdio.h>
int isPalindrome(char s[]){
//関数の中だけを書き換えてください
//回文になっているとき1を返す
//回文になっていないとき0を返す
int n=0;
while (s[n]!='\0'){
n++;
}
char t[n + 1];
for(int i=0; i<n; i++){
t[i] = s[n-i-1];
}
t[n]='\0';
for(int j=0; s[j]==t[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+U44GZCgkKCWludCBuPTA7CiAgICB3aGlsZSAoc1tuXSE9J1wwJyl7CiAgICAgICAgbisrOwogICAgfQogICAgY2hhciB0W24gKyAxXTsKICAgIGZvcihpbnQgaT0wOyBpPG47IGkrKyl7CiAgICAJdFtpXSA9IHNbbi1pLTFdOwogICAgfQogICAgdFtuXT0nXDAnOwoJZm9yKGludCBqPTA7IHNbal09PXRbal07IGorKyl7CgkJaWYoc1tqXT09J1wwJyl7CgkJCXJldHVybiAxOwoJCX0KCX0KCXJldHVybiAwOwp9CgovL+ODoeOCpOODs+mWouaVsOOBr+abuOOBjeaPm+OBiOOBquOBj+OBpuOCiOOBhOOBp+OBmQppbnQgbWFpbigpewogICAgY2hhciBzWzEwMF07CiAgICBzY2FuZigiJXMiLHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIixzLGlzUGFsaW5kcm9tZShzKSk7CiAgICByZXR1cm4gMDsKfQo=