QOJ.ac

QOJ

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

#23883. The Second Largest Integer

통계

Problem

You are given $3$ integers $A, B, C$. Output the $2$-nd largest number among them.

Constraints

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

Input

The input is given from Standard Input in the following format:

A B C

Output

Output the $2$-nd largest number among $A, B, C$.

Sample Input and Output

Sample Input 1

7 5 3

Sample Output 1

5
  • Output $5$, which is the $2$-nd largest among $7, 5, 3$.

Sample Input 2

1 3 3

Sample Output 2

3
  • Among the given integers, $2$ of them may be equal.
  • When $1, 3, 3$ are arranged in descending order, they are $3, 3, 1$, so output $3$, which is the $2$-nd largest.

Sample Input 3

100 100 100

Sample Output 3

100
  • All of the given integers may be equal.

Sample Input 4

29 83 1

Sample Output 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.