結果

問題 No.564 背の順
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-09-30 09:57:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 71,480 KB
最終ジャッジ日時 2023-09-24 12:20:30
合計ジャッジ時間 2,166 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 72 ms
71,056 KB
testcase_02 WA -
testcase_03 AC 73 ms
71,328 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 74 ms
71,224 KB
testcase_07 AC 73 ms
71,156 KB
testcase_08 AC 74 ms
71,468 KB
testcase_09 AC 72 ms
71,160 KB
testcase_10 WA -
testcase_11 AC 73 ms
71,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,n = map(int,input().split())
H = [h]
for i in range(n-1):
    H.append(int(input()))
H.sort(reverse=True)
if str(H.index(h) + 1)[-1] == "1":
    print(str(H.index(h) + 1) + "st")
elif str(H.index(h) + 1)[-1] == "2":
    print(str(H.index(h) + 1) + "nd")
elif str(H.index(h) + 1)[-1] == "3":
    print(str(H.index(h) + 1) + "rd")
else:
    print(str(H.index(h) + 1) + "st")
0