結果

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

ソースコード

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 % 10 == 1 :
            print("1st")
        elif answer % 10 == 2 :
            print("2nd")
        elif answer % 10 == 3 :
            print("3rd")
        else :
            print("{}th".format(j+1))

0