Peter can see a clock in the mirror from the place he sits in the office.
When he saw the clock shows 12:22
1
2
3
4
5
6
7
8
9
10
11
12
He knows that the time is 11:38
1
2
3
4
5
6
7
8
9
10
11
12
in the same manner:
05:25 --> 06:35
01:50 --> 10:10
11:58 --> 12:02
12:01 --> 11:59
Please complete the function `WhatIsTheTime(timeInMirror)`, where `timeInMirror` is the mirrored time (what Peter sees) as string.
Return the _real_ time as a string.
Consider hours to be between 1 <= hour < 13.
So there is no 00:20, instead it is 12:20.
There is no 13:20, instead it is 01:20.
def what_is_the_time(time_in_mirror):
    hours, minutes = list(map(int, time_in_mirror.split(':')))
    
    if minutes == 0:
        mirrored_hours = 12 - hours
        mirrored_minutes = 0
    else:
        mirrored_hours = (11 - hours) % 12
        mirrored_minutes = 60 - minutes
    if mirrored_hours == 0:
        mirrored_hours = 12
        
    return "{:02d}:{:02d}".format(mirrored_hours, mirrored_minutes)

def what_is_the_time(time_in_mirror):
    hours, minutes = list(map(int, time_in_mirror.split(':')))
    
    if minutes == 0:
        mirrored_hours = 12 - hours
        mirrored_minutes = 0
    else:
        mirrored_hours = (11 - hours) % 12
        mirrored_minutes = 60 - minutes
    if mirrored_hours == 0:
        mirrored_hours = 12
        
    return "{:02d}:{:02d}".format(mirrored_hours, mirrored_minutes)
