chef and strange addition

problem-link text

logic- I converted A and B in binary form and stored it in array A[] and B[] respectively.

-> traverse array A[] for every A[i] is set and B[i] is reset mark pos as i do following step

  • loop starting index to pos if A[j] is 0 && B[j] is 1

          count++;
    

display count.

What im doing is increasing the value of A by factor x, and if its possible to decrease B by same factor- overall sum is not going to change.

Why im getting WA what im missing.

Thanks