Back
Close

Flights

Statement

 Goal

A flight was scheduled to arrive at a particular time and is now estimated to arrive at another time. Write a function that returns the flight's status : On time, early or delayed
Input
Line 1: scheduled time t for the flight to arrive (format: hh:mm:ss)
Line 2: estimated time t2 for the flight to arrive (format: hh:mm:ss)
Output
Line 1: "EARLY", "DELAYED" or "ON TIME" depending on the status of the flight
Constraints
0:00:00 ≤ t ≤ 24:00:00
0:00:00 ≤ t2 ≤ 24:00:00
Length of t and t2 = 8
Example
Input
23:18:32
22:19:40
Output
EARLY

Game modes
Fastest, Shortest, Reverse

Test cases
Test 1 Test
Input
23:18:32 22:19:40
Output
EARLY

Validator 1 Validator
Input
23:19:20 22:19:21
Output
EARLY

Test 2 Test
Input
22:23:59 22:23:59
Output
ON TIME

Validator 2 Validator
Input
22:14:03 22:14:03
Output
ON TIME

Test 3 Test
Input
00:00:01 23:23:59
Output
DELAYED

Validator 3 Validator
Input
23:23:23 24:00:00
Output
DELAYED

Test 4 Test
Input
23:23:33 23:23:31
Output
EARLY

Validator 4 Validator
Input
23:07:21 21:23:59
Output
EARLY

Test 5 Test
Input
22:18:18 22:18:18
Output
ON TIME

Validator 5 Validator
Input
22:30:17 22:30:17
Output
ON TIME

Test 6 Test
Input
22:18:15 23:18:15
Output
DELAYED

Validator 6 Validator
Input
19:34:34 19:34:35
Output
DELAYED

Solution language

Solution

Stub generator input