結果

問題 No.1096 Range Sums
ユーザー H3PO4H3PO4
提出日時 2020-06-26 21:29:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 23,648 KB
最終ジャッジ日時 2023-09-18 04:54:49
合計ジャッジ時間 1,673 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,836 KB
testcase_01 AC 15 ms
7,808 KB
testcase_02 AC 15 ms
7,932 KB
testcase_03 AC 15 ms
7,864 KB
testcase_04 AC 15 ms
7,816 KB
testcase_05 AC 15 ms
7,800 KB
testcase_06 AC 15 ms
7,904 KB
testcase_07 AC 15 ms
7,852 KB
testcase_08 AC 15 ms
7,852 KB
testcase_09 AC 15 ms
7,912 KB
testcase_10 AC 144 ms
23,512 KB
testcase_11 AC 144 ms
23,564 KB
testcase_12 AC 144 ms
23,648 KB
testcase_13 AC 142 ms
23,532 KB
testcase_14 AC 139 ms
23,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = tuple(map(int, input().split()))

T = [N] * N
for i in range(N // 2):
    T[i + 1] = T[i] + N - (i + 1) * 2
    T[N - i - 2] = T[i + 1]
print(sum(A[i]*T[i] for i in range(N)))
0