https://leetcode.com/problems/calculate-delayed-arrival-time/description/
Calculate Delayed Arrival Time - LeetCode
Can you solve this real interview question? Calculate Delayed Arrival Time - 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
leetcode.com
1
2
3
|
class Solution:
def findDelayedArrivalTime(self, arrivalTime: int, delayedTime: int) -> int:
return (arrivalTime+delayedTime)%24
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 2769. Find the Maximum Achievable Number (0) | 2023.07.13 |
---|---|
leetcode 2739. Total Distance Traveled (0) | 2023.07.07 |
leetcode 2544. Alternating Digit Sum (0) | 2023.07.03 |
leetcode 2595. Number of Even and Odd Bits (0) | 2023.06.27 |
leetcode 2716. Minimize String Length (0) | 2023.06.27 |
댓글