Create 1905.cpp

This commit is contained in:
Kirigaya Kazuto 2016-12-07 18:56:36 +08:00 committed by GitHub
parent dc23499004
commit 73451892e9

18
QUSTOJ/1905.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
{
string a,b;
int x;
cin>>a>>b>>x;
if(x==1) cout<<b<<a<<endl;
else cout<<a.substr(0,x-1)<<b<<a.substr(x-1)<<endl;
}
return 0;
}