結果

問題 No.564 背の順
ユーザー Meso Meso
提出日時 2024-05-04 20:24:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-26 10:36:33
合計ジャッジ時間 959 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

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

length = [int(input()) for _ in range(n-1)]

ans = length + [l]
ans.sort(reverse=True)
ret = ans.index(l) + 1
r = ret % 10

if r == 1:
    print(f'{r}st')
elif r == 2:
    print(f'{r}nd')
elif r == 3:
    print(f'{r}rd')
else:
    print(f'{r}th')
0