QOJ.ac

QOJ

حد الوقت: 2 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#23883. 2 番目に大きい整数

الإحصائيات

問題文

$3$ つの整数 $A, B, C$ が与えられる.これらのうち $2$ 番目に大きい数を出力せよ.

制約

  • $1 \le A \le 100$.
  • $1 \le B \le 100$.
  • $1 \le C \le 100$.

入力

入力は以下の形式で標準入力から与えられる.

A B C

出力

$A, B, C$ のうち,$2$ 番目に大きい数を出力せよ.

入出力例

入力例 1

7 5 3

出力例 1

5
  • $7, 5, 3$ のうち,$2$ 番目に大きい $5$ を出力する.

入力例 2

1 3 3

出力例 2

3
  • 与えられる整数のうち,$2$ つが等しい場合もある.
  • $1, 3, 3$ を大きい順に並べると $3, 3, 1$ であるので,$2$ 番目に大きい $3$ を出力する.

入力例 3

100 100 100

出力例 3

100
  • 与えられる整数のすべてが等しい場合もある.

入力例 4

29 83 1

出力例 4

29

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.