結果

問題 No.851 テストケース
ユーザー shamio
提出日時 2020-06-06 16:52:28
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 3,153 ms
コード長 307 bytes
コンパイル時間 462 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-23 13:09:51
合計ジャッジ時間 1,939 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

if len(a) == 3:
    print("\"assert\"")

else:
    for _ in range(2):
        a.append(int(input()))

    nums = set()
    for i in range(3):
        for j in range(i + 1, 3):
            nums.add(a[i] + a[j])

    ans = sorted(nums)[-2]
    print(ans)
0