結果

問題 No.564 背の順
ユーザー minezumuminezumu
提出日時 2018-07-29 09:38:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 7,856 KB
最終ジャッジ日時 2023-09-22 17:15:19
合計ジャッジ時間 975 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,776 KB
testcase_01 AC 17 ms
7,772 KB
testcase_02 AC 16 ms
7,768 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,816 KB
testcase_05 AC 16 ms
7,816 KB
testcase_06 AC 16 ms
7,856 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 16 ms
7,828 KB
testcase_10 AC 15 ms
7,820 KB
testcase_11 AC 16 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(j+1))

0