LearnPy Hub
← Arena
EasyRating 1000

12-Hour to 24-Hour

Convert a time like 07:05:45PM to 24-hour form (19:05:45). 12:00:00AM is 00:00:00 and 12:00:00PM is 12:00:00.

Input

One time in hh:mm:ssAM or hh:mm:ssPM form.

Output

hh:mm:ss

Sample 1

Input
07:05:45PM
Output
19:05:45

Sample 2

Input
12:00:00AM
Output
00:00:00
solution.py
Output appears here
12-Hour to 24-Hour · Python Arena problem · LearnPy Hub