結果
問題 | No.1681 +-* |
ユーザー | Eki1009 |
提出日時 | 2021-09-18 00:22:51 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 212 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 87,096 KB |
実行使用メモリ | 115,132 KB |
最終ジャッジ日時 | 2023-09-12 10:42:50 |
合計ジャッジ時間 | 5,740 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
75,744 KB |
testcase_01 | AC | 71 ms
71,608 KB |
testcase_02 | AC | 74 ms
71,572 KB |
testcase_03 | AC | 74 ms
71,548 KB |
testcase_04 | AC | 74 ms
71,500 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 | -- | - |
ソースコード
mod = 10**9+7 n, *A = map(int, open(0).read().split()) ans = 0 t = 1 for i in range(n): t = t*A[i]%mod if i < n-1: ans += t * 2 * pow(3, n-2-i) else: ans += t ans %= mod print(ans)