結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 13 ms
7,944 KB
testcase_02 WA -
testcase_03 AC 13 ms
7,892 KB
testcase_04 WA -
testcase_05 AC 12 ms
7,896 KB
testcase_06 AC 13 ms
7,820 KB
testcase_07 AC 12 ms
7,792 KB
testcase_08 AC 12 ms
7,840 KB
testcase_09 AC 13 ms
7,856 KB
testcase_10 AC 12 ms
7,932 KB
testcase_11 AC 12 ms
7,780 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%10]);break      
else:print(str(i+2)+"th")
0