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에는 유명한 해킹 대회도 열렸기 때문에, 참가자들은 그 시각까지 이미 호텔에 돌아와 있기를 원했습니다.

어제 모든 것이 계획대로 진행되었다고 가정할 때, 마지막 활동이 끝난 후 참가자들이 호텔로 돌아가기 위해 남은 시간이 얼마였는지 구하세요.

입력

첫 번째 줄에 활동의 개수를 나타내는 정수 $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.