Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test_hour = int(input())
- test_minute = int(input())
- arriving_hour = int(input())
- arriving_minute = int(input())
- total_minutes_test = test_hour * 60 + test_minute
- total_minutes_arrival = arriving_hour * 60 + arriving_minute
- if total_minutes_arrival > total_minutes_test:
- total_minutes = total_minutes_arrival - total_minutes_test
- hours = total_minutes // 60
- minutes = total_minutes % 60
- print("Late")
- if hours < 1:
- print(f"{minutes} minutes after the start")
- else:
- if minutes >= 10:
- print(f"{hours}:{minutes} hours after the start")
- else:
- print(f"{hours}:0{minutes} hours after the start")
- elif total_minutes_test >= total_minutes_arrival and total_minutes_test - total_minutes_arrival <= 30:
- print("On time")
- if total_minutes_test - total_minutes_arrival != 0:
- print(f"{total_minutes_test - total_minutes_arrival} minutes before the start")
- else:
- print("Early")
- total_minutes = total_minutes_test - total_minutes_arrival
- hours = total_minutes // 60
- minutes = total_minutes % 60
- if hours < 1:
- print(f"{minutes} minutes before the start")
- else:
- if minutes >= 10:
- print(f"{hours}:{minutes} hours before the start")
- else:
- print(f"{hours}:0{minutes} hours before the start")
Advertisement
Add Comment
Please, Sign In to add comment