Simple Python Solution
\nclass Solution:\n    def countTime(self, time: str) -> int:\n        \n        ## if we have 0? then we can replace ? with 10 different values [0-9]\n        
```\nclass Solution:\n    def countTime(self, time: str) -> int:\n        \n        ## if we have 0? then we can replace ? with 10 different values [0-9]\n        ## if we have 1? then we can replace ? with 10 different values [0-9]\n        ## if we have 2? then we can replace ? with 4 different values  [0-3]\n        hr12 = {0:10, 1:10, 2:4} \n        \n        ## if we have ?0 we can replace ? with 3 values [0-2]\n        hr21 = {0:3,1:3, 2:3, 3:3, 4:2, 5:2, 6:2, 7:2, 8:2, 9:2}\n        \n        \n        min12 = {0:10, 1:10, 2:10, 3:10, 4:10, 5:10}\n        min21 = {0:6, 1:6, 2:6, 3:6, 4:6, 5:6, 6:6, 7:6, 8:8, 9:6}\n        \n        \n        ## calculating how many hours can be made from this structure\n        a = 1\n        comp1 = [time[0], time[1]]\n        \n        if comp1 == [\'?\',"?"]:\n            a = 24\n            \n        elif comp1[0] == \'?\' and comp1[1]!="?":\n            a = hr21[int(comp1[1])]\n\n        elif comp1[0]!="?" and comp1[1] == "?":\n            a = hr12[int(comp1[0])]\n            \n            \n        ## calculating how many minutes can be made from this structure\n        comp2 = [time[3], time[4]]\n        b = 1\n        if comp2 == [\'?\',"?"]:\n            b = 60\n            \n        elif comp2[0] == \'?\' and comp2[1]!="?":\n            b = min21[int(comp2[1])]\n\n        elif comp2[0]!="?" and comp2[1] == "?":\n            b = min12[int(comp2[0])]\n        \n        return a*b  ## finding total combinations\n```
['Python']