結果

問題 No.564 背の順
ユーザー minezumuminezumu
提出日時 2018-07-29 09:24:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 10,960 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-09-22 16:51:29
合計ジャッジ時間 1,059 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
7,896 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 15 ms
7,904 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 16 ms
7,840 KB
testcase_10 AC 15 ms
7,800 KB
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

L = []
H,N = map(int,input().split())
for i in range(N-1) :
    h = int(input())
    L.append(h)
L = sorted(L)
L.reverse()
for j in range(N-1) :
    if H > L[i] :
        if i == 0 :
            print("1st")
            break
        elif i == 1 :
            print("2nd")
            break
        elif i == 2 :
            print("3rd")
            break
        else :
            print("{}th".format(i+1))
            break
    if L[N-2] > H :
        print("{}th".format(N))
        break


0