結果

問題 No.564 背の順
ユーザー alcoholampalcoholamp
提出日時 2019-10-15 18:48:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-08-28 18:01:14
合計ジャッジ時間 886 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

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