結果

問題 No.564 背の順
ユーザー k0825
提出日時 2019-04-29 13:30:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-24 06:59:43
合計ジャッジ時間 1,275 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

h,n=map(int,input().split())
hx=[int(input()) for _ in '1'*(n-1)];hx.append(h)
hx=sorted(hx,reverse=True)
i=hx.index(h)+1
if str(i)[-1]=='1': m='st'
elif str(i)[-1]=='2': m='nd'
elif str(i)[-1]=='3': m='rd'
else:m='th'
print(i,m,sep='')
0