Problems
10001 - Military Time
SUBMIT PROBLEM

Military Time

Time Limit: 1 sec

 

The Problem

Little Shakil has learnt to read wall clock. He has a big clock in his room which is 12 hours clock. 

What time is it?

Shakil replied – 10:09 P.M.

 

 

His father (worked in Bangladesh Military) use a hand clock, that clock is using a 24-Hours’ time (sometimes referred to as “military time”).

What time is it?

Shakil replied – I don’t know (Because he does not understand military time clock).

 

Can you help Shakil to convert the military time to wall clock time?

 

The Input

Input file contain several lines of input. Each lines will contain the time Shakil reads from the clock in his father’s clock. The time will be in the following format: HH:MM 

Hours and minutes both are integer and the time is always valid.

 

The Output

For each line of Input you have to produce one line of output which will contain the wall clock (12-Houre) time, the format, namely: HH:MM A.M. or HH:MM P.M.

See sample input and output for more clarification.

 

Sample Input

22:09

06:10

 

Sample Output

10:09 P.M.

06:10 A.M.

 

 

 

Inter University Programming Contest - 2015 [BGC Trust University Bangladesh]

Problem Setter: Shahin ShamS