結果

問題 No.564 背の順
ユーザー minezumuminezumu
提出日時 2018-07-29 09:35:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 8,004 KB
最終ジャッジ日時 2023-09-22 17:08:34
合計ジャッジ時間 1,047 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

0