2437. Number of Valid Clock Times, Time complexity: O(1), Space complexity: O(1)
IntuitionApproachComplexity
Time complexity: O(1)

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

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

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

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

# Code
```python3 []
class Solution:
    def countTime(self, time: str) -> int:
        hh, mm = time.split(':')
        count_possible_hours = 1
        if (hh == '??'):
            count_possible_hours = 24
        elif (hh[0] == '?' and int(hh[1]) >= 4):
            count_possible_hours = 2
        elif (hh[0] == '?' and int(hh[1]) <= 4):
            count_possible_hours = 3
        elif (int(hh[0]) <= 1 and hh[1] == '?'):
            count_possible_hours = 10
        elif (int(hh[0]) == 2 and hh[1] == '?'):
            count_possible_hours = 4
        
        count_possible_minutes = 1
        if (mm == '??'):
            count_possible_minutes = 60
        elif (mm[0] == '?'):
            count_possible_minutes = 6
        elif (mm[1] == '?'):
            count_possible_minutes = 10

        return count_possible_hours * count_possible_minutes
```
['Python3']