結果

問題 No.3613 Legendary Bread Maker
コンテスト
ユーザー ルク
提出日時 2026-08-06 14:24:04
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 116 ms / 2,000 ms
+ 589µs
コード長 652 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 236 ms
コンパイル使用メモリ 96,100 KB
実行使用メモリ 115,328 KB
最終ジャッジ日時 2026-08-06 14:24:09
合計ジャッジ時間 4,102 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 0 % AC * 3
小課題1 10 % AC * 5
小課題2 40 % AC * 13
小課題3 50 % AC * 23
合計 2 * 100% = 200 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import permutations
from bisect import bisect_left, bisect_right
import random
import math
from collections import deque
from collections import Counter
from collections import defaultdict
inf = 1 << 60


def sgn(x):
    if x > 0:
        return 1
    elif x == 0:
        return 0
    else:
        return -1


def popC(x):
    ans = 0
    while x != 0:
        ans += x % 2
        x //= 2
    return ans


def LI():
    return list(map(int, input().split()))


def II():
    return int(input())


def SI():
    return input()


n = II()
a = LI()
now = a[0]
ans = 0
for i in range(1, n):
    ans += a[i]*now
    now += a[i]
print(ans)
0