Universal Cup Judging System

Universal Cup

Time Limit: 1.0 s Memory Limit: 1024 MB Total points: 100
Statistics

尋日朝早 9:00,同 AMPPZ 比賽相關嘅必修活動正式開始。日程表入面有 $n$ 項活動接住一個跟一個進行,分別持續 $t_1, t_2, \dots, t_n$ 分鐘。尋日夜晚 19:00,出名嘅黑客大賽(hacking contest)亦都開始舉行,到嗰陣時,參賽者希望已經返到酒店。

假設尋日所有嘢都按計劃進行,請計出喺最後一項活動完咗之後,參賽者有幾多時間可以返去酒店。

輸入格式

第一行包含一個整數 $n$($1 \le n \le 100$),代表活動嘅數量。

第二行包含一個由 $n$ 個整數組成嘅序列 $t_1, t_2, \dots, t_n$($1 \le t_i \le 500$),代表連續各項活動嘅持續時間(以分鐘計)。

你可以假設主辦方確保咗日程表入面所有活動最遲喺尋日 18:59 結束,留返正數嘅時間畀參賽者返酒店。

輸出格式

輸出一個整數——參賽者返酒店所剩低嘅分鐘數。

樣例

輸入

10
45 15 180 60 30 15 105 15 30 45

輸出

60

備註

日程表入面嘅連續活動如下:

時間 活動
09:00–09:45 開幕禮
09:45–10:00 小息
10:00–13:00 講座環節
13:00–14:00 午餐
14:00–14:30 比賽組織規則
14:30–14:45 小息
14:45–16:30 熱身賽
16:30–16:45 小息
16:45–17:15 熱身賽討論
17:15–18:00 晚餐

喺 19:00 之前,剛好剩低 60 分鐘用嚟返酒店。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.