結果

問題 No.564 背の順
ユーザー alcoholamp
提出日時 2019-10-15 18:48:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-30 01:55:04
合計ジャッジ時間 1,406 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

class Problem0564:
    def solve(this):
        h, n = map(int, input().split())
        
        res = [h]
        for i in range(0, n - 1):
            res.append(int(input()))
        res.sort(reverse=True)       
        
        t = res.index(h) + 1
        if t == 1:
            print("1st")
        elif t == 2:
            print("2nd")
        elif t == 3:
            print("3rd")
        else:
            print(str(t) + "th")

if __name__ == "__main__":
    problem = Problem0564()
    problem.solve()

0