#include <stdio.h>
int isPalindrome(char s[]) {
int ans = 1;
int count = 0;
while(s[count]!='\0') count++;
int j = count-1;
for(int i=0; i<count/2; i++){
if(s[i]!= s[j--]) return 0;
}
return 1;
}
int main(){
char s[100];
printf("%s -> %d\n",s
, isPalindrome
(s
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgaXNQYWxpbmRyb21lKGNoYXIgc1tdKSB7CglpbnQgYW5zID0gMTsKCWludCBjb3VudCA9IDA7Cgl3aGlsZShzW2NvdW50XSE9J1wwJykgY291bnQrKzsKCWludCBqID0gY291bnQtMTsKCQoJZm9yKGludCBpPTA7IGk8Y291bnQvMjsgaSsrKXsKCQlpZihzW2ldIT0gc1tqLS1dKSByZXR1cm4gMDsKCX0KCXJldHVybiAxOwp9CgppbnQgbWFpbigpewoJY2hhciBzWzEwMF07CglzY2FuZigiJXMiLHMpOwoJcHJpbnRmKCIlcyAtPiAlZFxuIixzLCBpc1BhbGluZHJvbWUocykpOwoJcmV0dXJuIDA7Cn0K