Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
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")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)