結果
| 問題 | No.2235 Line Up Colored Balls |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-24 00:40:13 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 81 ms / 2,000 ms |
| + 439µs | |
| コード長 | 172 bytes |
| 記録 | |
| コンパイル時間 | 262 ms |
| コンパイル使用メモリ | 96,360 KB |
| 実行使用メモリ | 97,280 KB |
| 最終ジャッジ日時 | 2026-08-29 22:33:59 |
| 合計ジャッジ時間 | 7,480 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 55 |
ソースコード
N = int(input())
x = list(map(int, input().split()))
s, s1, mod = 0, 0, 1000000007
for v in x:
s1 += s * v
s += v
print((1 + 2 * s1 * pow(s, mod - 2, mod)) % mod)