Practice Calculate Delayed Arrival Time
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given a positive integer arrivalTime denoting the arrival time of a train in hours, and another positive integer delayedTime denoting the amount of delay in hours. Return the time when the train will arrive at the station. Note that the time in this problem is in 24-hours format.
Source: Calculate Delayed Arrival Time on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
arrivalTime = 15, delayedTime = 5
Output
20
# Example 2
Input
arrivalTime = 13, delayedTime = 11
Output
0
Constraints
1 <= arrivaltime < 24
1 <= delayedTime <= 24
Related LeetCode Problems
Practice more problems similar to Calculate Delayed Arrival Time.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.