python/java solution
\tclass Solution:\n\t\tdef countTime(self, time: str) -> int:\n\t\t\thh = 1\n\t\t\tmm = 1\n\t\t\tif time[0] == "?" and time[1] != "?":\n\t\t\t\tif time[1] <= "3
\tclass Solution:\n\t\tdef countTime(self, time: str) -> int:\n\t\t\thh = 1\n\t\t\tmm = 1\n\t\t\tif time[0] == "?" and time[1] != "?":\n\t\t\t\tif time[1] <= "3":\n\t\t\t\t\thh *= 3\n\t\t\t\telse:\n\t\t\t\t\thh *= 2\n\t\t\telif time[0] != "?" and time[1] == "?":\n\t\t\t\tif time[0] <= "1":\n\t\t\t\t\thh *= 10\n\t\t\t\telse:\n\t\t\t\t\thh *= 4\n\t\t\telif time[0] == "?" and time[1] == "?":\n\t\t\t\thh *= 24\n\t\t\tif time[3] == "?":\n\t\t\t\tmm *= 6\n\t\t\tif time[4] == "?":\n\t\t\t\tmm *= 10\n\t\t\treturn hh * mm\n\n\n\tclass Solution {\n\t\tpublic int countTime(String time) {\n\t\t\tint hh = 1;\n\t\t\tint mm = 1;\n\t\t\tif (time.charAt(0) == \'?\' && time.charAt(1) != \'?\') {\n\t\t\t\tif (time.charAt(1) <= \'3\') {\n\t\t\t\t\thh *= 3;\n\t\t\t\t} else {\n\t\t\t\t\thh *= 2;\n\t\t\t\t}\n\t\t\t} else if (time.charAt(0) != \'?\' && time.charAt(1) == \'?\') {\n\t\t\t\tif (time.charAt(0) <= \'1\') {\n\t\t\t\t\thh *= 10;\n\t\t\t\t} else {\n\t\t\t\t\thh *= 4;\n\t\t\t\t}\n\t\t\t} else if (time.charAt(0) == \'?\' && time.charAt(1) == \'?\') {\n\t\t\t\thh *= 24;\n\t\t\t}\n\t\t\tif (time.charAt(3) == \'?\') {\n\t\t\t\tmm *= 6;\n\t\t\t}\n\t\t\tif (time.charAt(4) == \'?\') {\n\t\t\t\tmm *= 10;\n\t\t\t}\n\t\t\treturn hh * mm;\n\t\t}\n\t}
[]