Tap here to switch tabs
Problem
Submissions

Problem: Number of Valid Clock Times

med
30 min
Try to solve the Number of Valid Clock Times problem.

Statement

You are given a string time of length 55 representing a 2424 hour clock format "hh:mm", where some digits may be replaced with the character '?'.

A valid clock time is between "00:00" and "23:59", inclusive.

Return the total number of valid clock times that can be formed by replacing each '?' with a digit from 00 to 99.

Constraints:

  • time is a valid string of length 55 in the format "hh:mm".

  • "00" ≤\leq hh ≤\leq "23"

  • "00" ≤\leq mm ≤\leq "59"

  • Some of the digits might be replaced with '?' and need to be replaced with digits from 00 to 99.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Valid Clock Times

med
30 min
Try to solve the Number of Valid Clock Times problem.

Statement

You are given a string time of length 55 representing a 2424 hour clock format "hh:mm", where some digits may be replaced with the character '?'.

A valid clock time is between "00:00" and "23:59", inclusive.

Return the total number of valid clock times that can be formed by replacing each '?' with a digit from 00 to 99.

Constraints:

  • time is a valid string of length 55 in the format "hh:mm".

  • "00" ≤\leq hh ≤\leq "23"

  • "00" ≤\leq mm ≤\leq "59"

  • Some of the digits might be replaced with '?' and need to be replaced with digits from 00 to 99.