QOJ.ac

QOJ

시간 제한: 2 s 메모리 제한: 64 MB 총점: 100

#23756. 득점

통계

JOI 고등학교의 $2$명의 학생 A 씨와 B 씨는 정보, 수학, 과학, 영어의 $4$교과 시험을 보았다. A 씨와 B 씨의 이 $4$교과 득점이 주어졌을 때, A 씨의 합계 점수 $S$와 B 씨의 합계 점수 $T$ 중 큰 쪽을 출력하는 프로그램을 작성하라. 단, 동점인 경우에는 $S$ ($= T$)를 출력하라.

입력

입력 파일은 $2$줄로 이루어진다.

$1$번째 줄에는 $4$개의 정수가 $1$개의 공백으로 구분되어 적혀 있으며, 각각 순서대로 A 씨의 정보 득점, 수학 득점, 과학 득점, 영어 득점을 나타낸다.

$2$번째 줄에는 $4$개의 정수가 $1$개의 공백으로 구분되어 적혀 있으며, 각각 순서대로 B 씨의 정보 득점, 수학 득점, 과학 득점, 영어 득점을 나타낸다.

어느 교과의 득점도 $100$점 만점이며, 음수 득점이 주어지는 일은 없다.

출력

제출하는 출력 파일은 구하고자 하는 $1$개의 정수로 이루어진다.

예제

입력 1

100 80 70 60
80 70 80 90

출력 1

320

입력 2

100 80 70 60
80 70 60 100

출력 2

310

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.