Aiub_heros's blog

By Aiub_heros, history, 6 weeks ago, In English
 
 
 
 
  • Vote: I like it
  • -4
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Even to ask for help, you have to use an alt account??

»
6 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

there is a bug in line $$$41$$$.in while condition, write == instead of =.there might be some other bugs too,for example,what your program prints for test case : 3 9?

»
6 weeks ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

wrong part of your code:

wrong one

while( smallest[ j ] = '0') { j++;

smallest[ 0 ]++;
    smallest[ j ]--;
}
Corrected one
while( smallest[ j ] == '0')
{
    j++;
}

smallest[ 0 ]++;
    smallest[ j ]--;

I think u mistakenly did last two operation inside loop :)

I found one more mistake so Adding accepted solution of your code: Acceped code