結果
問題 | No.1681 +-* |
ユーザー | Mik10 |
提出日時 | 2021-10-07 14:30:23 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 232 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 87,056 KB |
実行使用メモリ | 110,168 KB |
最終ジャッジ日時 | 2023-09-30 09:03:12 |
合計ジャッジ時間 | 6,489 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 78 ms
76,408 KB |
testcase_01 | AC | 78 ms
71,568 KB |
testcase_02 | AC | 81 ms
71,572 KB |
testcase_03 | AC | 81 ms
71,220 KB |
testcase_04 | AC | 83 ms
71,492 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 | -- | - |
ソースコード
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))