# include <stdio.h>
//プログラミング及び演習4_第一回_提出課題3
int isPalindrome(char s[]){
int i=0;
int mojisuu=0;
for(i=0;s[i]!=0;i++){
mojisuu++;
}
int a=0;
while(a<mojisuu){
if((s[a]-s[a+1])==(s[mojisuu-1]-s[mojisuu-2])){
a++;
mojisuu--;
}
else{
return 0;
}
}
return 1;
}
//メイン関数は書き換えなくてよいです
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgovL+ODl+ODreOCsOODqeODn+ODs+OCsOWPiuOBs+a8lOe/kjRf56ys5LiA5ZueX+aPkOWHuuiqsumhjDMKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSl7CglpbnQgaT0wOwoJaW50IG1vamlzdXU9MDsKCWZvcihpPTA7c1tpXSE9MDtpKyspewoJCW1vamlzdXUrKzsKCX0KCWludCBhPTA7Cgl3aGlsZShhPG1vamlzdXUpewoJCWlmKChzW2FdLXNbYSsxXSk9PShzW21vamlzdXUtMV0tc1ttb2ppc3V1LTJdKSl7CgkJCWErKzsKCQkJbW9qaXN1dS0tOwoJCX0KCQllbHNlewoJCQlyZXR1cm4gMDsKCQl9Cgl9CglyZXR1cm4gMTsKCQp9CgovL+ODoeOCpOODs+mWouaVsOOBr+abuOOBjeaPm+OBiOOBquOBj+OBpuOCiOOBhOOBp+OBmQppbnQgbWFpbigpewogICAgY2hhciBzWzEwMF07CiAgICBzY2FuZigiJXMiLHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIixzLGlzUGFsaW5kcm9tZShzKSk7CiAgICByZXR1cm4gMDsKfQo=