結果

問題 No.564 背の順
ユーザー 👑 もぐら 3.0もぐら 3.0
提出日時 2023-11-13 20:22:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 793 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 53,460 KB
最終ジャッジ日時 2023-11-13 20:22:04
合計ジャッジ時間 1,462 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 34 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 WA -
testcase_04 AC 34 ms
53,460 KB
testcase_05 AC 35 ms
53,460 KB
testcase_06 AC 36 ms
53,460 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 35 ms
53,460 KB
testcase_10 AC 35 ms
53,460 KB
testcase_11 AC 34 ms
53,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
H,N = map(int,input().split())
members = [int(input()) for _ in range(N-1)]
members.sort()

p = bisect.bisect_left(members,H)

if N-p==1:
    print("1st")
elif N-p==2:
    print("2nd")
elif N-p==3:
    print("3rd")
else:
    print(str(N-p)+"th")
0