QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 64 MB Total points: 100

#23756. 得分

Statistics

JOI 高中的 $2$ 名學生 A 同學和 B 同學參加了資訊、數學、理科、英語這 $4$ 個科目的考試。給定 A 同學和 B 同學在這 $4$ 個科目中的得分,請撰寫一個程式,輸出 A 同學的總分 $S$ 與 B 同學的總分 $T$ 中較大的一個。然而,若兩人同分,則輸出 $S$($= T$)。

輸入格式

輸入由 $2$ 行組成。

第 $1$ 行包含以 $1$ 個空格分隔的 $4$ 個整數,依序表示 A 同學的資訊得分、數學得分、理科得分、英語得分。

第 $2$ 行包含以 $1$ 個空格分隔的 $4$ 個整數,依序表示 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.