✅C++ | ✅Brute-force
\nclass Solution \n{\npublic:\n    int countTime(string time) \n    {   \n        int ans=1;\n        \n        if(time[0]==\'?\' && time[1]==\'?\') //when firs
```\nclass Solution \n{\npublic:\n    int countTime(string time) \n    {   \n        int ans=1;\n        \n        if(time[0]==\'?\' && time[1]==\'?\') //when first both HH are ?? of (HH:MM)\n                ans *= 24;   \n        \n        else\n        {\n            if(time[0]==\'?\')  //when first H is ? and second H has some value of (HH:MM)\n            {\n                if(time[1] < \'4\') \n                    ans *= 3;\n                else\n                    ans *= 2;\n            }\n\n            if(time[1]==\'?\') //when second H is ? and first H has some value of (HH:MM)\n            {\n                if(time[0] < \'2\')\n                    ans *= 10;\n                else\n                    ans *= 4;\n            }\n        }\n        \n        if(time[3]==\'?\') //for first M of (HH:MM)\n        {\n            ans *= 6;\n        }\n\n        if(time[4]==\'?\') // for second M of (HH:MM)\n        {\n            ans *= 10;\n        }       \n            \n        return ans;\n    }\n};\n```
['C', 'C++']