Flight timings
CodeChefOpen on judge ↗
# Flight to the Airport Chef has a flight scheduled at **X** hours (in 24-hour format). It takes him **Y** hours to travel from his house to the airport. Chef wants to arrive at the airport **exactly 2 hours before** his flight departure time. Determine the time at which Chef should leave his house. It is guaranteed that the required departure time is non-negative. ## Function Declaration ##
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start