2651. 计算列车到站时间
思路:直接取模
class Solution {
public:
int findDelayedArrivalTime(int arrivalTime, int delayedTime) {
return (arrivalTime+delayedTime)%24;
}
};
思路:直接取模
class Solution {
public:
int findDelayedArrivalTime(int arrivalTime, int delayedTime) {
return (arrivalTime+delayedTime)%24;
}
};