結果

問題 No.564 背の順
ユーザー alcoholampalcoholamp
提出日時 2019-10-16 11:14:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 530 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-09-02 12:37:27
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,924 KB
testcase_01 AC 15 ms
7,884 KB
testcase_02 AC 15 ms
7,976 KB
testcase_03 WA -
testcase_04 AC 14 ms
7,784 KB
testcase_05 AC 15 ms
7,984 KB
testcase_06 AC 16 ms
7,828 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 16 ms
7,856 KB
testcase_10 AC 16 ms
7,884 KB
testcase_11 AC 16 ms
7,884 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 % 10 == 1:
            print("1st")
        elif t % 10 == 2:
            print("2nd")
        elif t % 10 == 3:
            print("3rd")
        else:
            print(str(t) + "th")

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

0