#!/bin/python
import sys
time = raw_input().strip()
times = time.split(":")
isEvening = 0
#print times[2]
if (times[2].find("PM") != -1):
isEvening = 1
#print 'PM detection'
if (isEvening == 1):
print ("%d:%s:%s") % ((int(times[0]) + 12) , times[1], times[2].replace("PM", ''))
else:
print ("%d:%s:%s") % ((int(times[0])) , times[1], times[2].replace("AM", ''))
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.