12h to 24h Time

JavaScript Medium 4 views
Back to Questions

Problem Description

Input is time in 12-hour format like HH:MM AM/PM. Convert to 24-hour format HH:MM and print.

Input Format

One line time string.

Output Format

One line 24h time.

Sample Test Case

Input:
07:05 PM
Output:
19:05

Constraints

Valid time input.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next