結果

問題 No.1096 Range Sums
ユーザー neterukunneterukun
提出日時 2020-06-26 21:28:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 104,988 KB
最終ジャッジ日時 2023-09-18 04:53:59
合計ジャッジ時間 2,334 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,364 KB
testcase_01 AC 68 ms
71,340 KB
testcase_02 AC 69 ms
71,188 KB
testcase_03 AC 71 ms
71,364 KB
testcase_04 AC 73 ms
71,248 KB
testcase_05 AC 71 ms
71,232 KB
testcase_06 AC 69 ms
71,168 KB
testcase_07 AC 71 ms
71,160 KB
testcase_08 AC 67 ms
71,168 KB
testcase_09 AC 70 ms
71,300 KB
testcase_10 AC 106 ms
104,560 KB
testcase_11 AC 104 ms
104,988 KB
testcase_12 AC 105 ms
104,676 KB
testcase_13 AC 104 ms
104,588 KB
testcase_14 AC 104 ms
104,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    l_cnt = i + 1
    r_cnt = n - i
    ans += a[i] * l_cnt * r_cnt
print(ans)
0