結果

問題 No.851 テストケース
ユーザー pypypymipypypymi
提出日時 2022-02-17 14:01:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 3,153 ms
コード長 402 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 71,468 KB
最終ジャッジ日時 2023-09-11 17:39:35
合計ジャッジ時間 3,638 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,344 KB
testcase_01 AC 68 ms
71,452 KB
testcase_02 AC 69 ms
71,224 KB
testcase_03 AC 69 ms
71,208 KB
testcase_04 AC 72 ms
71,184 KB
testcase_05 AC 67 ms
71,344 KB
testcase_06 AC 67 ms
71,276 KB
testcase_07 AC 67 ms
71,148 KB
testcase_08 AC 69 ms
71,076 KB
testcase_09 AC 68 ms
71,248 KB
testcase_10 AC 69 ms
71,180 KB
testcase_11 AC 67 ms
71,052 KB
testcase_12 AC 68 ms
71,324 KB
testcase_13 AC 69 ms
71,232 KB
testcase_14 AC 68 ms
71,324 KB
testcase_15 AC 68 ms
71,208 KB
testcase_16 AC 69 ms
71,324 KB
testcase_17 AC 66 ms
71,148 KB
testcase_18 AC 68 ms
71,248 KB
testcase_19 AC 68 ms
71,176 KB
testcase_20 AC 66 ms
71,348 KB
testcase_21 AC 73 ms
71,468 KB
testcase_22 AC 70 ms
71,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a_i = list(map(int,input().split()))
if len(a_i)!=1:
    print('"assert"')
    exit()
array = [int(input()) for i in range(n-1)]
a_i=a_i+array
a_i = sorted(a_i)[::-1]
a_max = a_i[0]+a_i[1]
for i in range(0,len(a_i)-1):
    for j in range(i+1,len(a_i)):
        if a_max>a_i[i]+a_i[j]:
            print(a_i[i]+a_i[j])
            break
    else:
        continue
    break
            
0