問題一覧 > ショートコード

No.3380 Third Max (Python)

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 32
作問者 : alcea / テスター : tRue naka9 Rho 259-Momone
お気に入りにしたユーザー ProblemId : 12857 / 自分の提出
問題文最終更新日: 2025-11-22 11:12:54
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
yukicoder contest TSG LIVE! 15 コードゴルフコンテスト (順位表) の他の問題:

Problem Statement

You are given a sequence $A_1, A_2, \ldots, A_{10}$ of length $10$ consisting of single-digit positive integers. Find the $3$-rd largest value in this sequence.

Input

$A_1\ A_2\ \ldots\ A_{10}$

  • $1 \leq A_i \leq 9$
  • All inputs are integers

Output

Print a newline at the end.

Score

Intended solution: $26$ bytes

Score formula When the code length of a submitted source code is $x$ and the code length of the intended solution of this problem is $y$, the score of that source code is calculated as follows.
  • If $y\leq x$: $\lfloor100\exp(-0.012(x-y))\rfloor$ points
  • If $x<y$: $101$ points
The score of this problem is the maximum score among the source codes submitted to this problem.

Sample

Sample 1
Input
3 1 4 1 5 9 2 6 5 3
Output
5

Sorting the given sequence in descending order gives 9 6 5 5 4 3 3 2 1 1. Therefore, print the $3$-rd largest value, $5$, followed by a newline.

Sample 2
Input
1 2 3 4 5 6 7 8 9 1
Output
7

Sample 3
Input
2 2 2 2 2 2 2 2 2 2
Output
2

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。