結果

問題 No.564 背の順
ユーザー RuteRute
提出日時 2022-07-22 15:47:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 7,920 KB
最終ジャッジ日時 2023-09-17 01:02:03
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,812 KB
testcase_01 AC 13 ms
7,920 KB
testcase_02 AC 13 ms
7,880 KB
testcase_03 AC 13 ms
7,860 KB
testcase_04 AC 13 ms
7,808 KB
testcase_05 AC 13 ms
7,808 KB
testcase_06 AC 14 ms
7,920 KB
testcase_07 AC 14 ms
7,768 KB
testcase_08 AC 13 ms
7,776 KB
testcase_09 AC 13 ms
7,844 KB
testcase_10 AC 14 ms
7,808 KB
testcase_11 AC 13 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,N = map(int,input().split())
tall = []
tall.append([-H,"nama"])

for x in range(N - 1):
    h = int(input())
    tall.append([-h,""])
tall.sort()
now = 1
for h,men in tall:
    if men == "nama":
        break
    now += 1
S = str(now)
if S[-1] == "1":
    print(S + "st")
elif S[-1] == "2":
    print(S + "nd")
elif S[-1] == "3":
    print(S + "rd")
else:
    print(S + "th")
0