✔️ C++ solution
C++ []\nclass Solution {\npublic:\n    int countTime(string time) {\n        vector<int> perm;\n        if (time[0] == \'?\') {\n            if (time[1] != \'?\
``` C++ []\nclass Solution {\npublic:\n    int countTime(string time) {\n        vector<int> perm;\n        if (time[0] == \'?\') {\n            if (time[1] != \'?\' && time[1]-48<=3) perm.push_back(3);\n            else if (time[1] != \'?\' && time[1]-48>=4) perm.push_back(2);\n            else if (time[1] == \'?\') perm.push_back(24);\n        }\n        if (time[1] == \'?\') {\n            if (time[0] != \'?\' && time[0]-48<=1) perm.push_back(10);\n            else if (time[0] != \'?\' && time[0]-48==2) perm.push_back(4);\n        }\n        if (time[3] == \'?\') perm.push_back(6);\n        if (time[4] == \'?\') perm.push_back(10);\n        \n        int ans = 1;\n        for (auto x:perm) ans*=x;\n\n        return ans;\n    }\n    \n    \n};\n```\n\n*Upvote if solution helped*
['C++']