JAVA
 # Intuition  \n\n\n\n\n\n\n\n\n\n\n\n# Code\n\nclass Solution {\n    public int minFlips(int a, int b, int c) {\n        String res = String.format("%32s",Inte
<!-- # 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: -->\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n<!-- - Space complexity: -->\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        String res = String.format("%32s",Integer.toBinaryString(c)).replaceAll(" ","0");\n        String x = String.format("%32s",Integer.toBinaryString(a)).replaceAll(" ","0");\n        String y = String.format("%32s",Integer.toBinaryString(b)).replaceAll(" ","0");\n\n        char [] resA = res.toCharArray();\n        char [] xA = x.toCharArray();\n        char [] yA = y.toCharArray();\n        \n        int count = 0;\n\n        for(int i=0; i<32; i++){\n            int p = resA[i] - \'0\';\n            int q = xA[i] - \'0\';\n            int r = yA[i] - \'0\';\n            \n            if(p==1 && (q|r)!=1) count++;\n            else if(p==0 && (q|r)!=0){\n                if(q==1 && r==1) count+=2;\n                else count+=1;\n            }\n        }\n\n        return count;\n    }\n}\n```
['Java']