is there no one who can help.no one???!!!surprised.pls help.

General topic about Valladolid Online Judge

Moderator: Board moderators

Post Reply
shorojini
New poster
Posts: 8
Joined: Sat Aug 16, 2008 8:14 am

is there no one who can help.no one???!!!surprised.pls help.

Post by shorojini »

:cry: :( :oops: :roll: :cry: i am getting wrong answer in this problem.
i am giving my code here.if there is not any prob in code then there must
be some prob in my input output system.please can anyone give me any solution and
some some sample input output.pls pls pls mark me my prob.pls pls pls. #include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
while(getline(cin,s))
{
int l=s.length();

int k=0;
for(int i=0;i<l;i++){

if(s>=48 && s<=57)
k=k+s-48;

else if(s=='!')
cout<<"\n";

else{
if(s=='b') {
for(int i=0;i<k;i++)
cout<<" "; }
else{
for(int j=0;j<k;j++)
cout<<s; }
k=0;
}

if(i==l-1)
cout<<"\n";

}




}
return 0;
}
Post Reply

Return to “General”