No.3700 Middle (Middle)
問題文最終更新日: 2026-09-10 17:36:07
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
Problem Statement
You are given $3$ integers $A,B,C$. When choosing $2$ of them and taking their sum, output the $2$-nd largest value among the possible sums.
Input
$A\ B\ C$
- $1 \le A, B, C \le 1000$
- All input values are integers.
Output
Output the answer.
Do not output anything other than the answer. (Do not output any text prompting for input, either.)
You may refer to practice problems and their sample solutions regarding the answer format, but note that no links are provided.
Sample
Sample 1
Input
1 3 5
Output
6
The possible sums are $1+3=4,1+5=6,3+5=8$, and the $2$-nd largest among them is $6$.
Sample 2
Input
1 1 1
Output
2
Sample 3
Input
241 938 317
Output
1179
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。