結果

問題 No.564 背の順
ユーザー otsunekootsuneko
提出日時 2021-05-07 17:07:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 621 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 71,672 KB
最終ジャッジ日時 2023-10-13 08:17:57
合計ジャッジ時間 2,393 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,456 KB
testcase_01 AC 70 ms
71,204 KB
testcase_02 AC 71 ms
71,624 KB
testcase_03 AC 72 ms
71,268 KB
testcase_04 AC 71 ms
71,672 KB
testcase_05 AC 72 ms
71,344 KB
testcase_06 AC 72 ms
71,296 KB
testcase_07 AC 71 ms
71,252 KB
testcase_08 AC 74 ms
71,152 KB
testcase_09 AC 71 ms
71,456 KB
testcase_10 AC 71 ms
71,480 KB
testcase_11 AC 70 ms
71,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import bisect
# H,N = map(int,input().split())
# H_list = [int(input()) for _ in range(N-1)]
# H_list.sort()
# n = N - bisect.bisect(H_list,H)

H,N = map(int,input().split())
H_list = [int(input()) for _ in range(N-1)]

n = 1
for h in H_list:
    if H < h:
        n += 1

ans = ""
if n%10 == 1:
    ans = str(n)+"st"
elif n%10 == 2:
    ans = str(n)+"nd"
elif n%10 == 3:
    ans = str(n)+"rd"
else:
    ans = str(n)+"th"

print(ans)
0