2024-11-29:替换字符可以得到的最晚时间。用go语言,给定一个字符串 s,其中包含一个12小时制的时间格式,部分数字可能被"?"替换。将 s 中的问号替换为数字,使得结果字符串表示的时间是一个有效的12小时制时间,并且是可能的最晚时间。输入: s = "1?:?4"。
输出: "11:54"。字符,可以得到的最晚12小时制时间是 "11:54"。
{"Response":{"Error":{"Code":"InvalidParameter","Message":"The request content not valid json format for specified content-type=application/json."},"RequestId":"985bf499-401a-4009-9724-fe6d7b059bc3"}}