Optimizing for Success: Python Solution
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python []
class Solution(object):
    def countTime(self, time):
        """
        :type time: str
        :rtype: int
        """
        n=1
        a=time[0]
        b=time[1]
        c=time[3]
        d=time[4]
        if a=='?' and b=='?':
            n*=24
        if a=='?' and b!='?':
            if int(b)<=3:
                n*=3
            else:
                n*=2
        if a!='?' and b=='?':
            if int(a)<=1:
                n*=10
            else:
                n*=4
        if c=='?' and d=='?':
            n*=60
        if c=='?' and d!='?':
                n*=6
        if c!='?' and d=='?':
                n*=10
        return n
        
        
        
        




```
['Python']