Easy 0ms java
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(log(Math.max(a,b,c)))\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int minFlips(int a, int b, int c) {\n        int ans = 0;\n\n        \n        int z = Math.max(c,Math.max(a,b));\n\n        while(z>0){\n            boolean aHasOne = (a & 1) == 1;\n            boolean bHasOne = (b & 1) == 1;\n            boolean cHasOne = (c & 1) == 1;\n            if(aHasOne && bHasOne){\n                if(!cHasOne)\n                    ans += 2;\n            }\n            else if((aHasOne && !bHasOne) || (!aHasOne && bHasOne)){\n                if(!cHasOne){\n                    ans+=1;\n                }\n            }\n            else{\n                if(cHasOne)\n                    ans+=1;\n            }\n            a = a>>1;\n            b = b>>1;\n            c = c>>1;\n            z = z>>1;\n        }\n        return ans;\n\n    }\n}\n```
['Java']