Re: Skew Binary: got WA
Posted: Sat Aug 28, 2010 1:48 pm
First things to note:
why you are creating a new thread while it is already existing?
your code even not pass the sample input.So how do you expect to get Acc!!!.
Do you think this part is right??For example
why you are creating a new thread while it is already existing?
your code even not pass the sample input.So how do you expect to get Acc!!!.
Code: Select all
for( i = len-1 ; i >= 0 ; i-- )
{
dec = dec + (input[i]-'0')*(factor-1) ;
factor = factor * 2 ;
}
Code: Select all
input : 20
your output:2
Actual output: 6