#include <stdio.h>
#include <string.h>

#define SIZE 1000

int main(void)
{
    char s1[SIZE];
    char head;
    char tail;
    int length;
    int t;
    int idx;

    scanf("%d", &t);

    for (idx = 0; idx < t; idx++)
    {
        scanf("%s",&s1);
        length = strlen(s1);
        head = s1[0];
        tail = s1[length-1];
        printf("%c%c\n",head,tail);
    }
}

'코딩테스트 > C' 카테고리의 다른 글

백준 10809번 알파벳 찾기  (0) 2024.06.29
백준 11654번 아스키 코드  (0) 2024.06.29
백준 2743번 단어 길이 재기  (0) 2024.06.29
백준 10811 바구니 뒤집기  (0) 2024.06.29
백준 3052번 나머지  (0) 2024.06.29

+ Recent posts