結果

問題 No.564 背の順
ユーザー 👑 colognecologne
提出日時 2023-07-12 13:02:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-10-12 03:20:15
合計ジャッジ時間 2,045 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,836 KB
testcase_01 AC 15 ms
7,944 KB
testcase_02 AC 15 ms
7,812 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,824 KB
testcase_05 AC 15 ms
7,944 KB
testcase_06 AC 15 ms
7,880 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 15 ms
7,996 KB
testcase_10 AC 15 ms
7,824 KB
testcase_11 AC 15 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    H, N = map(int, input().split())
    A = [int(input()) for i in range(N-1)]
    A = sorted(A+[H], reverse=True)
    print((['1st', '2nd', '3rd'] +
          [f'{n}th' for n in range(4, N+1)])[A.index(H)])


if __name__ == '__main__':
    main()
0