結果

問題 No.1681 +-*
ユーザー O2MTO2MT
提出日時 2021-09-18 00:39:48
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 198 bytes
コンパイル時間 550 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 109,524 KB
最終ジャッジ日時 2023-09-12 11:02:12
合計ジャッジ時間 4,881 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
75,412 KB
testcase_01 AC 75 ms
71,336 KB
testcase_02 AC 75 ms
71,288 KB
testcase_03 AC 76 ms
71,256 KB
testcase_04 AC 78 ms
71,128 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7
ans = 0
n = 1
for i in range(N-1):
  a = A[i]
  n *= a
  ans += n*(2*3**(N-i-2))
  ans %= MOD

ans += n*A[-1]
ans %= MOD

print(ans)
0