結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,236 KB
testcase_01 AC 69 ms
71,292 KB
testcase_02 AC 70 ms
71,368 KB
testcase_03 WA -
testcase_04 AC 70 ms
71,368 KB
testcase_05 AC 71 ms
71,184 KB
testcase_06 AC 70 ms
71,312 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 71 ms
71,460 KB
testcase_10 AC 69 ms
71,480 KB
testcase_11 AC 71 ms
71,308 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 = array_s.index(h)+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