結果

問題 No.1681 +-*
ユーザー Mik10
提出日時 2021-10-07 14:30:23
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 232 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,360 KB
実行使用メモリ 111,844 KB
最終ジャッジ日時 2024-07-23 03:06:36
合計ジャッジ時間 4,918 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 TLE * 1 -- * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
seql = list(map(int, input().split()))
import operator, itertools

ans = 0
m = n - 2 
for p in itertools.accumulate(seql, func=operator.mul):
    ans += p * 3**m * 2 if m >= 0 else p
    m -= 1
print (ans%(10**9+7))
0