#K58572. Convert Minutes to 12-hour Time Format
Convert Minutes to 12-hour Time Format
Convert Minutes to 12-hour Time Format
You are given a single integer representing the number of minutes since midnight, where . Your task is to convert these minutes into a time string formatted in the 12-hour clock format with leading zeros for both hours and minutes. Note that midnight is represented as "12:00 AM" and noon as "12:00 PM". Ensure that you handle edge cases such as midnight (0 minutes) and one minute before midnight (1439 minutes) correctly.
inputFormat
The input is provided via standard input (stdin) and consists of a single integer , where , representing the minutes passed since midnight.
outputFormat
Output the corresponding time in 12-hour format as a string (HH:MM AM/PM) to standard output (stdout).## sample
0
12:00 AM