mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
23 lines
385 B
C++
23 lines
385 B
C++
|
#include<stdio.h>
|
||
|
#include<string.h>
|
||
|
int main()
|
||
|
{
|
||
|
int n,i;
|
||
|
scanf("%d",&n);
|
||
|
while(n--)
|
||
|
{
|
||
|
char str[50],z,c;
|
||
|
scanf("%s",str);
|
||
|
z=strlen(str);
|
||
|
for(i=0;i<z;)
|
||
|
{
|
||
|
c=str[i];
|
||
|
str[i]=str[i+1];
|
||
|
str[i+1]=c;
|
||
|
i+=2;
|
||
|
}
|
||
|
printf("%s\n",str);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|