結果

問題 No.851 テストケース
ユーザー ThetaTheta
提出日時 2022-10-19 13:27:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 3,153 ms
コード長 342 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 8,296 KB
最終ジャッジ日時 2023-09-12 03:23:19
合計ジャッジ時間 1,759 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,116 KB
testcase_01 AC 15 ms
8,224 KB
testcase_02 AC 15 ms
8,216 KB
testcase_03 AC 14 ms
8,168 KB
testcase_04 AC 15 ms
8,156 KB
testcase_05 AC 15 ms
8,284 KB
testcase_06 AC 14 ms
8,220 KB
testcase_07 AC 15 ms
8,248 KB
testcase_08 AC 15 ms
8,208 KB
testcase_09 AC 15 ms
8,152 KB
testcase_10 AC 15 ms
8,228 KB
testcase_11 AC 15 ms
8,296 KB
testcase_12 AC 15 ms
8,204 KB
testcase_13 AC 15 ms
8,224 KB
testcase_14 AC 15 ms
8,208 KB
testcase_15 AC 15 ms
8,076 KB
testcase_16 AC 15 ms
8,172 KB
testcase_17 AC 14 ms
8,240 KB
testcase_18 AC 15 ms
8,252 KB
testcase_19 AC 14 ms
8,088 KB
testcase_20 AC 15 ms
8,280 KB
testcase_21 AC 15 ms
8,116 KB
testcase_22 AC 15 ms
8,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations


def main():
    N = int(input())
    try:
        A = [int(input()) for _ in range(N)]
    except ValueError:
        print('"assert"')
        return

    A_sum = {first + second for (first, second) in combinations(A, 2)}
    print(sorted(A_sum, reverse=True)[1])


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