結果

問題 No.1096 Range Sums
ユーザー convexineqconvexineq
提出日時 2020-06-26 21:47:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 23,148 KB
最終ジャッジ日時 2023-09-18 05:08:25
合計ジャッジ時間 1,731 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 AC 15 ms
7,996 KB
testcase_02 AC 15 ms
7,984 KB
testcase_03 AC 15 ms
7,820 KB
testcase_04 AC 15 ms
7,860 KB
testcase_05 AC 15 ms
7,956 KB
testcase_06 AC 15 ms
7,852 KB
testcase_07 AC 16 ms
7,852 KB
testcase_08 AC 15 ms
7,848 KB
testcase_09 AC 15 ms
7,844 KB
testcase_10 AC 141 ms
23,120 KB
testcase_11 AC 141 ms
23,104 KB
testcase_12 AC 140 ms
23,016 KB
testcase_13 AC 142 ms
23,116 KB
testcase_14 AC 141 ms
23,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

n,*a = map(int,read().split())

ans = 0
for i,ai in enumerate(a):
    v = (i+1) * (n-i) 
    ans += ai*v
    #print(v)

print(ans)

0