#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
string ans;
int main()
{
char c;
int i,sum=0;
ans="";
int flag=0;
while((c=getchar())!=EOF)
{
if(c=='!')
ans+="\n";
else if(c=='\n')
{
if(flag)
{
cout<<ans<<endl;
flag=1-flag;
ans="";
}
else
{
ans+="\n";
flag=1-flag;
}
}
else if(c>='0'&&c<='9')
sum+=(c-'0'+0);
else
{
for(i=0;i<sum;i++)
ans+=(c=='b'?' ':c);
sum=0;
}
}
return 0;
}
uva oj 445
最新推荐文章于 2016-06-02 12:31:47 发布