Problem
You have three positive integers a, b and c. A flip changes one bit of a or b (0 to 1 or 1 to 0). Return the minimum number of flips so that a | b == c (bitwise OR).
Example 1
- Input
- a = 2, b = 6, c = 5
- Output
- 3
- Why
- a = 010, b = 110, c = 101
Example 2
- Input
- a = 4, b = 2, c = 7
- Output
- 1
Example 3
- Input
- a = 1, b = 2, c = 3
- Output
- 0
Constraints
1 <= a <= 10^91 <= b <= 10^91 <= c <= 10^9