#include <iostream>
#include <cmath>
#include <stdio.h>
#include <string.h>
using namespace std;
char s[100009],ch;
int n;
int main()
{
while(~scanf("%d %c",&n,&ch))
{
getchar();
gets(s);
int len=strlen(s);
if(n>=len)
{
n-=len;
for(int i=1;i<=n;i++)
printf("%c",ch);
puts(s);
}
else
{
n=len-n;
for(int i=n;i<len;i++)
printf("%c",s[i]);
printf("\n");
}
}
return 0;
}
2016年团体程序设计天梯赛-决赛 L1-8. Left-pad(20)
最新推荐文章于 2022-01-24 12:17:18 发布