結果

問題 No.1096 Range Sums
ユーザー yatsurugi
提出日時 2020-06-26 22:26:36
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 193 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 262,976 KB
最終ジャッジ日時 2024-07-04 22:10:18
合計ジャッジ時間 4,650 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 TLE * 1 -- * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0