题目链接
代码
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
using namespace std;
typedef long long ll;
bool cmp(int a,int b)
{
return a>b;
}
int main()
{
int num;
cin>>num;
if(num<10)
{
for(int i=1;i<=num;i++)
cout<<i;
}else if(num>=10&&num<100)
{
int s=num/10;
int n=num%10;
for(int i=1;i<=s;i++)
cout<<"S";
for(int j=1;j<=n;j++)
cout<<j;
}else
{
int b=num/100;
int s=(num-b*100)/10;
int n=num%10;
for(int k=1;k<=b;k++)
cout<<"B";
for(int i=1;i<=s;i++)
cout<<"S";
for(int j=1;j<=n;j++)
cout<<j;
}
printf("\n");
return 0;
}