a dozen of if -else bas ho gya ! this problem tests how effectively we handle chaos !!! :D
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:\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```cpp []\nclass Solution {\npublic:\n    int countTime(string time) {\n\n        int hrs=1;\n        int secs=1;\n        if(time[0]==\'?\'&&time[1]==\'?\'&&time[3]==\'?\'&&time[4]==\'?\')\n        {\n            return 1440;\n        }\nbool p=true;\nbool q=true;\n        if(time[0]==\'?\'&&time[1]==\'?\')\n        {\n            p=false;\n            hrs*=24;\n           \n        }\n\n        if(time[3]==\'?\'&&time[4]==\'?\')\n        {  \n            q=false;\n            secs*=60;\n            \n        }\n        if(p==false&&q==false)\n        {\n            return 1440;\n        }\n\n\n\n        if(time[0]==\'?\'&&time[1]!=\'?\')\n        {\n           if(time[1]>=\'0\'&&time[1]<=\'3\')\n           {\n            hrs*=3;\n           }\n           else if(time[0]>=\'4\'&&time[1]<=\'9\')\n           {\n            hrs*=2;\n           }\n        }\n        \n        if(p==true)\n       { if(time[1]==\'?\')\n        {\n            if(time[0]==\'2\')\n            {\n                hrs*=4;\n            }\n            else if(time[0]==\'1\'||time[0]==\'0\')\n            {\n                hrs*=10;\n            }\n        }}\n        if(q==true)\n{\n        if(time[3]==\'?\')\n        {\n            secs*=6;\n        }\n\n        if(time[4]==\'?\')\n        {\n            secs*=10;\n        }\n}\n\n         return hrs*secs;\n    }\n};\n```
['C++']