結果
| 問題 | No.1096 Range Sums |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-26 22:26:36 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 193 bytes |
| 記録 | |
| コンパイル時間 | 339 ms |
| コンパイル使用メモリ | 85,424 KB |
| 実行使用メモリ | 344,280 KB |
| 最終ジャッジ日時 | 2026-03-26 04:42:01 |
| 合計ジャッジ時間 | 16,383 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 TLE * 5 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
total = 0
t = n//2 if n % 2 == 0 else n//2+1
total = sum(a)*n
for i in range(1, t):
total += sum(a[i:-i]) * len(a[i:-i])
print(total)