問題一覧 > 通常問題

No.3700 Middle (Middle)

レベル : / AI推定難易度 : 98 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 1024 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 42
作問者 : Rapca1256 / テスター : tomorunn
お気に入りにしたユーザー ProblemId : 13978 / 自分の提出
問題文最終更新日: 2026-09-10 17:36:07
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
JOI1次風非公式模試 (Suken Programming Contest 007) (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。