結果

問題 No.564 背の順
コンテスト
ユーザー utsumidaisuke
提出日時 2018-12-07 18:29:28
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
WA  
実行時間 -
コード長 303 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 344 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-14 03:34:49
合計ジャッジ時間 1,609 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 4 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

h, n = map(int, input().split())

ls = [h]
for i in range(n-1):
    ls.append(int(input()))
    
ls.sort()

ls.reverse()
r = ls.index(h) + 1

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