logic- I converted A and B in binary form and stored it in array A and B respectively.
-> traverse array A for every A* is set and B* is reset mark pos as i do following step
loop starting index to pos if A[j] is 0 && B[j] is 1
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.