結果

問題 No.564 背の順
ユーザー minezumu
提出日時 2018-07-29 09:23:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-08 08:15:51
合計ジャッジ時間 1,150 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 7
権限があれば一括ダウンロードができます

ソースコード

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")
        elif i == 1 :
            print("2nd")
        elif i == 2 :
            print("3rd")
        else :
            print("{}th".format(i+1))
            break
    if L[N-2] > H :
        print("{}th".format(N))
        break

0