結果
| 問題 | No.1096 Range Sums |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-26 22:26:36 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 193 bytes |
| 記録 | |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 95,940 KB |
| 実行使用メモリ | 303,448 KB |
| 最終ジャッジ日時 | 2026-08-06 23:41:41 |
| 合計ジャッジ時間 | 5,210 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 TLE * 1 -- * 4 |
ソースコード
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)