結果

問題 No.851 テストケース
ユーザー kamomekamome
提出日時 2019-07-26 21:37:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 3,153 ms
コード長 303 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-02 06:44:10
合計ジャッジ時間 1,515 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding:utf-8
import itertools
N=int(input())
a=[]
s=[]
try:
    a.append(int(input()))
except ValueError:
    print('"assert"')
    exit(0)
for j in range(1,N):
    a.append(int(input()))
for i in itertools.combinations(a,2):
    if not i[0]+i[1] in s:
        s.append(i[0]+i[1])
s.sort()
print(s[-2])
0