結果
| 問題 |
No.1681 +-*
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-09-13 01:36:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 268 bytes |
| コンパイル時間 | 216 ms |
| コンパイル使用メモリ | 82,428 KB |
| 実行使用メモリ | 102,344 KB |
| 最終ジャッジ日時 | 2024-11-30 04:04:34 |
| 合計ジャッジ時間 | 2,844 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 4 WA * 14 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
ans=0
now=a[0]
mod=10**9+7
for i in range(n):
if i < n-1:
ans += now * 2 * max((n-2-i)*3,1)
now*=a[i+1]
now%=mod
ans%=mod
else:
ans += now
ans%=mod
print(ans)
lllllll88938494