#include <stdio.h>
#include <string.h>
#include <stdbool.h>
int main(void){
int test_case, i, j,length;
char word[10];
scanf("%d", &test_case);
for(i = 0; i < test_case; i++){
scanf("%s", word);
length = strlen(word); //문자열 길이
bool palindrome = true;
for(j = 0; j<length/2; j++){ // j번째 문자와 length -1-j 문자가 같은지 확인
if(word[j] != word[length -1 -j]){
palindrome = false; //같지 않다면 false
break;
}
}
printf("#%d %d\n", i+1,palindrome);
}
return 0;
}
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PyTLqAf4DFAUq&categoryId=AV5PyTLqAf4DFAUq&categoryType=CODE&problemTitle=1989&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=&pageSize=10&pageIndex=1