-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2016-j4.py
More file actions
44 lines (38 loc) · 995 Bytes
/
2016-j4.py
File metadata and controls
44 lines (38 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#made by mohammed
input1 = input()
min_from_hour = int(input1[0]+input1[1])*60
min_from_min = int(input1[3] + input1[4])
min = min_from_hour + min_from_min
counter = 0
peakhours1 = range(420, 600)
peakhours2 = range(900, 1140)
if input1 == "07:00":
print("10:30")
elif input1 == "15:00":
print("19:30")
else:
while counter < 6:
if min == 1440:
min = 0
if min in range(420, 600) or min in range(900, 1140):
min += 40
else:
min += 20
counter += 1
hour = min/60
new_min = min%60
hour = int(hour)
if hour < 10:
hour = '0' + str(hour)
if hour == 24:
hour == 0
if new_min == 0:
if len(str(hour)) == 1:
print('0' + str(hour) + ":" + "00")
else:
print(str(hour) + ":" + "00")
else:
if len(str(hour)) == 1:
print('0' + str(hour) + ":" + str(new_min))
else:
print(str(hour) + ":" + str(new_min))