2097 - I2P(I)2020_Yang_HW2 Scoreboard

Time

2020/09/22 19:00:00 2020/09/29 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11576 Time conversion
12366 svool dliow

11576 - Time conversion   

Description

Please convert 24-h time format to 12-h time format .


Hint1:

You can define an integer called 'flag' to indicate a.m. or p.m.
And then you can use 'flag' to compute the key information : 'a' , 'p'
int key_info = 'a' * ((flag+1)%2) + 'p' * flag ; 
key_info will be 'p' when flag is 1 , and be 'a' when flag is 0.

Hint2:

Note that 1200 belongs to p.m. 
Namely, the output should be 00:00 p.m.

and 0000 belongs to a.m.

Namely, the output should be 00:00 a.m.

Input

always a 4-digit integer

Output

  hour    +   ":"   +  minute  +  "whitespace"  +  "a.m." / "p.m."
(2-digit)                (2-digit)

hour and minute numbers need to have 0 prepended if needded.

Note that there is no need to add "\n" at the end of output.

Sample Input  Download

Sample Output  Download

Tags

#11576



Discuss




12366 - svool dliow   

Description

Given a 5 characters word, try to encrypt the string by reversing each alphabet.

That is,

  'a' becomes 'z'.

  'b' becomes 'y'.

  'c' becomes 'x'.

  ...

  'y' becomes 'b'.

  'z' becomes 'a'.

ouo.

Input

Input contains only a line.

A 5 character word.

It's is guarantee that the word contains only lower case alphabet.

Output

Output contains only a line.

The encrypted word.

With a new line after.

Sample Input  Download

Sample Output  Download

Tags




Discuss