Universal Cup Judging System

Universal Cup

時間限制: 1.0 s 記憶體限制: 1024 MB 總分: 100
统计

昨日の 9:00 に、AMPPZ コンテストに関連する必須のアクティビティが始まりました。スケジュールには次々と行われる $n$ 個のアクティビティが含まれており、それぞれの所要時間は $t_1, t_2, \dots, t_n$ 分でした。昨日の 19:00 には有名なハッキングコンテストも開催され、その時刻までに参加者たちはすでにホテルに戻っていたいと考えていました。

昨日すべてが計画通りに進んだと仮定して、最後のアクティビティが終わった後に参加者たちがホテルに戻るために残されていた時間を求めてください。

入力

1 行目には、アクティビティの個数を表す整数 $n$ ($1 \le n \le 100$) が与えられます。

2 行目には、連続する各アクティビティの所要時間(分単位)を表す $n$ 個の整数の列 $t_1, t_2, \dots, t_n$ ($1 \le t_i \le 500$) が与えられます。

主催者はスケジュール内のすべてのアクティビティが昨日の 18:59 までに終了するようにしており、参加者がホテルに戻るための正の時間が残されていると仮定して構いません。

出力

参加者がホテルに戻るために残されていた分数(整数 1 つ)を出力してください。

入出力例

入力

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.