java || easy || Beats 0ms beats 100%
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
```java []
class Solution {
    public int countTime(String time) {
        if(time.equals("??:??")){
            return 24*60;
        }
        int res=1;
        //0-->10 1-->10 2-->5
        if(time.charAt(0)=='?' && time.charAt(1)=='?')
           res=res*24;
        else if(time.charAt(0)=='?'){
            if(time.charAt(1)-'0'>=4)
            res=res*2;
            else
            res=res*3;
        }
        else if(time.charAt(1)=='?'){
           if(time.charAt(0)-'0'>=2){
             res=res*4;
           }
           else
           res=res*10;
        }
        if(time.charAt(4)=='?'){
            res=res*10;
        }
        if(time.charAt(3)=='?')
        res=res*6;
        return res;
    }
}
```
['Java']