PAT1006
#include<iostream>
#include<string>
using namespace std;
int main()
{
char str[3];
int n;cin>>n;
for (int i = 0; i < n; i++)cin >> str[i];
for (int j = 0; j < n; j++)
{
switch (n-j)
{
case 3:
for (int h = 0; h<int(str[j])-48; h++)
{
cout << "B";
}
break;
case 2:
for (int h = 0; h<int(str[j]) - 48; h++)
{
cout << "S";
}
break;
case 1:
for (int h = 0; h<int(str[j]) - 48;h++)
{
cout << h+1;
}
break;
}
}
}
995

被折叠的 条评论
为什么被折叠?



