hh:mm, anywhere from 00:00 to 23:59, but the screen is smudged and some digits cannot be read: in the string display they are replaced by ?.
Return the latest time that could be hiding behind this reading, in the same hh:mm format.display="?5:4?" → '15:49'
The hour ends in 5, so it cannot start with 2 (there is no 25 o'clock), and we take 15. Minutes 4? give at most 49.
display="2?:??" → '23:59'
The hour starts with 2, so its second digit is at most 3. That gives 23:59.
display="07:?1" → '07:51'
display has the form hh:mm, where each of the four positions is a digit or ?display="?5:4?"
'15:49'
Run checks the first 3 tests in your browser. Submit checks all 92 tests on the server, hidden ones included.