結果

問題 No.564 背の順
ユーザー YU Hirose
提出日時 2024-07-09 13:53:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-09 13:53:08
合計ジャッジ時間 2,013 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

h, n = map(int, input().split())
d = [int(input()) for _ in range(n-1)]
d.append(h)
d.sort(reverse=True)
r = d.index(h)+1
if str(r)[-1] == "1":
    print(f"{r}th")
elif str(r)[-1] == "2":
    print(f"{r}nd")
elif str(r)[-1] == "3":
    print(f"{r}rd")
else:
    print(f"{r}th")
0