Skip to content

2651. Calculate Delayed Arrival Time 👍

  • Time: $O(1)$
  • Space: $O(1)$
1
2
3
4
5
6
class Solution {
 public:
  int findDelayedArrivalTime(int arrivalTime, int delayedTime) {
    return (arrivalTime + delayedTime) % 24;
  }
};
1
2
3
4
5
class Solution {
  public int findDelayedArrivalTime(int arrivalTime, int delayedTime) {
    return (arrivalTime + delayedTime) % 24;
  }
}
1
2
3
class Solution:
  def findDelayedArrivalTime(self, arrivalTime: int, delayedTime: int) -> int:
    return (arrivalTime + delayedTime) % 24