結果

問題 No.1096 Range Sums
ユーザー 👑 KazunKazun
提出日時 2020-06-26 21:28:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 121 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 105,080 KB
最終ジャッジ日時 2023-09-18 04:54:56
合計ジャッジ時間 2,324 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,232 KB
testcase_01 AC 77 ms
71,380 KB
testcase_02 AC 71 ms
71,140 KB
testcase_03 AC 72 ms
71,364 KB
testcase_04 AC 69 ms
71,140 KB
testcase_05 AC 70 ms
71,328 KB
testcase_06 AC 73 ms
71,568 KB
testcase_07 AC 70 ms
71,248 KB
testcase_08 AC 72 ms
71,288 KB
testcase_09 AC 71 ms
71,136 KB
testcase_10 AC 109 ms
104,684 KB
testcase_11 AC 108 ms
104,948 KB
testcase_12 AC 109 ms
104,776 KB
testcase_13 AC 109 ms
105,080 KB
testcase_14 AC 109 ms
104,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

S=0
T=0
d=N
for i in range(N):
    T+=d
    d-=2
    S+=A[i]*T
print(S)
0