結果

問題 No.564 背の順
ユーザー superzugansuperzugan
提出日時 2019-07-16 15:35:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 209 bytes
コンパイル時間 795 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-08-20 18:17:12
合計ジャッジ時間 2,154 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 13 ms
7,756 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 13 ms
7,900 KB
testcase_06 AC 13 ms
7,744 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 13 ms
7,880 KB
testcase_10 AC 13 ms
7,812 KB
testcase_11 AC 13 ms
7,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,n=map(int,input().split())
lst=sorted(int(input()) for _ in range(n-1))[::-1]
for i,j in enumerate(lst):
    if x>=j and (i %10 <=3) :print(str(i+1)+["st","nd","rd"][i]);break      
else:print(str(i+2)+"th")
0