#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
int n;
char c;
string s;
scanf("%d %c",&n,&c);
getchar();
//string s;
getline(cin,s);
//gets(s);
int len=s.length();
if(n>=len)
{
for(int i=0;i<(n-len);i++)
{
cout<<c;
}
cout<<s;
}
else
{
int i=len-n;
for(;i<=len-1;i++)
{
printf("%c",s[i]);
}
}
return 0;
}
这种题目错好多次了,还没有记住!!!