結果

問題 No.564 背の順
ユーザー htkbhtkb
提出日時 2017-09-08 22:26:14
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 8,064 KB
最終ジャッジ日時 2023-08-07 08:25:35
合計ジャッジ時間 979 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,064 KB
testcase_01 AC 16 ms
7,984 KB
testcase_02 AC 16 ms
7,980 KB
testcase_03 AC 15 ms
7,936 KB
testcase_04 AC 16 ms
7,928 KB
testcase_05 AC 16 ms
7,856 KB
testcase_06 AC 15 ms
7,992 KB
testcase_07 AC 15 ms
8,028 KB
testcase_08 AC 15 ms
7,988 KB
testcase_09 AC 15 ms
7,924 KB
testcase_10 AC 16 ms
7,908 KB
testcase_11 AC 16 ms
8,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect
H, N = map(int, input().split())
a = sorted([int(input()) for _ in [0]*(N-1)])
ans = str(N-bisect(a, H))
print(ans+(["st", "nd", "rd"][int(ans[-1])-1] if 0 < int(ans[-1]) < 4 else "th"))
0