結果

問題 No.851 テストケース
ユーザー はむ吉🐹はむ吉🐹
提出日時 2019-07-26 21:25:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 3,153 ms
コード長 381 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 8,328 KB
最終ジャッジ日時 2023-09-15 00:32:58
合計ジャッジ時間 1,675 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,196 KB
testcase_01 AC 15 ms
8,136 KB
testcase_02 AC 16 ms
8,228 KB
testcase_03 AC 16 ms
8,288 KB
testcase_04 AC 16 ms
8,144 KB
testcase_05 AC 16 ms
8,280 KB
testcase_06 AC 15 ms
8,328 KB
testcase_07 AC 16 ms
8,140 KB
testcase_08 AC 16 ms
8,208 KB
testcase_09 AC 16 ms
8,176 KB
testcase_10 AC 16 ms
8,152 KB
testcase_11 AC 16 ms
8,108 KB
testcase_12 AC 16 ms
8,288 KB
testcase_13 AC 16 ms
8,132 KB
testcase_14 AC 15 ms
8,216 KB
testcase_15 AC 16 ms
8,284 KB
testcase_16 AC 15 ms
8,196 KB
testcase_17 AC 16 ms
8,188 KB
testcase_18 AC 16 ms
8,288 KB
testcase_19 AC 15 ms
8,240 KB
testcase_20 AC 16 ms
8,144 KB
testcase_21 AC 16 ms
8,236 KB
testcase_22 AC 15 ms
8,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools


def solve(xs):
    ss = sorted(set(x + y for x, y in itertools.combinations(xs, 2)), reverse=True)
    return ss[1]


def main():
    n = int(input())
    res = None
    try:
        xs = [int(input()) for _ in range(n)]
        res = solve(xs)
    except ValueError:
        print('"assert"')
    else:
        print(res)


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