Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- time = input()
- steps = int(input())
- step_sec = int(input())
- hour = int(time.split(":")[0])
- minute = int(time.split(":")[1])
- total_seconds = int(time.split(":")[2])
- seconds_in_day = 86400
- seconds_in_hour = 3600
- seconds_in_minute = 60
- total_seconds = (((hour*60)*60) + (minute * 60) + total_seconds) + (steps * step_sec)
- days = total_seconds // seconds_in_day
- total_seconds = total_seconds - (days * seconds_in_day)
- hours = total_seconds // seconds_in_hour
- total_seconds = total_seconds - (hours * seconds_in_hour)
- minutes = total_seconds // seconds_in_minute
- total_seconds = total_seconds - (minutes * seconds_in_minute)
- print(f"Time Arrival: {hours:02d}:{minutes:02d}:{total_seconds:02d}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement