#include<bits/stdc++.h>
using namespace std;
int main()
{
int N;
string x;
int t;
string y;
cin>>N;
scanf(" ");
cin>>x;
scanf(" ");
getline(cin,y);
t = y.length();
if(N>t)
{
while(t!=N)
{
y=x+y;
t++;
}
}
if(t>N)
{
x=y.substr(t-N);
cout<<x;
}
if(t==N)
{
cout<<y;
}
}
标签:string,int,scanf,cin,pad,L1,032,Left
From: https://blog.csdn.net/2302_80541687/article/details/136695049