#include<bits/stdc++.h>
using namespace std;
int main()
{
string an;
while(getline(cin, an))
{
if(an == "\n")
cout << endl;
int i, c = 0, j;
for(i=0;an[i];i++)
{
if(an[i] >= '1' && an[i] <= '9')
{
c += (an[i] - 48);
}
else if(an[i] >= 'A' && an[i] <= 'Z' || an[i] == '*')
{
for(j=1;j<=c;j++)
cout << an[i];
c = 0;
}
else if(an[i] == 'b')
{
for(j=1;j<=c;j++)
cout << " ";
c = 0;
}
else if(an[i] == '!')
cout << endl;
}
cout << endl;
}
return 0;
}
using namespace std;
int main()
{
string an;
while(getline(cin, an))
{
if(an == "\n")
cout << endl;
int i, c = 0, j;
for(i=0;an[i];i++)
{
if(an[i] >= '1' && an[i] <= '9')
{
c += (an[i] - 48);
}
else if(an[i] >= 'A' && an[i] <= 'Z' || an[i] == '*')
{
for(j=1;j<=c;j++)
cout << an[i];
c = 0;
}
else if(an[i] == 'b')
{
for(j=1;j<=c;j++)
cout << " ";
c = 0;
}
else if(an[i] == '!')
cout << endl;
}
cout << endl;
}
return 0;
}
Comments
Post a Comment