Elixir Pattern Matching Solution
elixir\ndefmodule Solution do\n  @spec count_time(time :: String.t()) :: integer\n  def count_time(time) do\n    [hh, mm] = String.split(time, ":") |> Enum.map(
```elixir\ndefmodule Solution do\n  @spec count_time(time :: String.t()) :: integer\n  def count_time(time) do\n    [hh, mm] = String.split(time, ":") |> Enum.map(&String.to_charlist/1)\n    count_hh(hh) * count_mm(mm)\n  end\n\n  def count_hh([??, ??]), do: 24\n\n  def count_hh([??, h]) do\n    if h in ?0..?3, do: 3, else: 2\n  end\n\n  def count_hh([?2, ??]), do: 4\n  def count_hh([_, ??]), do: 10\n  def count_hh(_), do: 1\n\n  def count_mm([??, ??]), do: 60\n  def count_mm([??, _]), do: 6\n  def count_mm([_, ??]), do: 10\n  def count_mm(_), do: 1\nend\n```
['Elixir']