Java | easy to understand
\n   public int countTime(String time) {\n        if (time.equals("??:??")) return 24 * 60;\n        int res = 1;\n\n        if (time.charAt(0) == \'?\' && time
```\n   public int countTime(String time) {\n        if (time.equals("??:??")) return 24 * 60;\n        int res = 1;\n\n        if (time.charAt(0) == \'?\' && time.charAt(1) == \'?\') {\n            res *= 24;\n        } else if (time.charAt(0) == \'?\'){\n            res *= (time.charAt(1) - \'0\' >= 4 ? 2 : 3);\n        } else if (time.charAt(1) == \'?\'){\n            res *= (time.charAt(0) - \'0\' >= 2 ? 4 : 10);\n        }\n\n        if (time.charAt(4) == \'?\') res *= 10;\n        if (time.charAt(3) == \'?\') res *= 6;\n        return res;\n    }\n```
['Java']