#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
int t;
scanf("%d\n",&t);
char data[1000] = {'\0'};
char res[1000] = {'\0'};//注意初始化
for(int h = 0;h < t;h ++)
{
scanf("%s",data);
int j = 1;
res[0] = data[0];
int len = strlen(data);
for(int i = 1;i < len;i = i + 2)
res[j ++] = data[i];
printf("%s\n",res);
memset(data,'\0',strlen(data));
memset(res,'\0',strlen(res));
}
return 0;
}
洛谷CF6317A
最新推荐文章于 2024-11-09 18:10:37 发布