結果

問題 No.1096 Range Sums
ユーザー yatsurugiyatsurugi
提出日時 2020-06-26 22:26:36
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 193 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-09-18 05:49:22
合計ジャッジ時間 5,689 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,604 KB
testcase_01 AC 74 ms
71,116 KB
testcase_02 AC 73 ms
71,480 KB
testcase_03 AC 75 ms
71,192 KB
testcase_04 AC 74 ms
71,248 KB
testcase_05 AC 74 ms
71,460 KB
testcase_06 AC 75 ms
71,244 KB
testcase_07 AC 74 ms
71,124 KB
testcase_08 AC 74 ms
71,136 KB
testcase_09 AC 74 ms
71,248 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます

ソースコード

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