結果

問題 No.564 背の順
ユーザー utsumidaisuke
提出日時 2018-12-07 18:29:28
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-14 03:34:51
合計ジャッジ時間 1,027 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 4 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

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