結果

問題 No.564 背の順
ユーザー pypypymipypypymi
提出日時 2022-03-05 14:53:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 71,636 KB
最終ジャッジ日時 2023-09-27 02:05:45
合計ジャッジ時間 1,951 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 71 ms
71,304 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 71 ms
71,348 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 70 ms
71,464 KB
testcase_10 AC 69 ms
71,344 KB
testcase_11 AC 71 ms
71,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,n = map(int,input().split())
array = [h] + [int(input()) for i in range(n-1)]
array_s = list(sorted(array))[::-1]
result = int(str(array_s.index(h)+1)[-1])
if result==1:
    print("{}st".format(result))
elif result==2:
    print("{}nd".format(result))
elif result==3:
    print("{}rd".format(result))
else:
    print("{}th".format(result))
0