PAT 1008 电梯
1008 Elevator The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one floor. The elevator will stay for 5 seconds at each stop. 我们城市最高的建筑只有一台电梯。有一个请求列表由 N 个正整数组成,这些数字指定电梯停在哪些楼层,按指定的顺序。电梯每上升一层需要 6 秒钟,每下降一层需要 4 秒钟。电梯每停留一个楼层需要 5 秒钟。 For a given request list, you are to compute the total ....