結果

問題 No.1096 Range Sums
ユーザー tobusakanatobusakana
提出日時 2022-12-15 01:04:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 400 ms
コンパイル使用メモリ 82,644 KB
実行使用メモリ 99,352 KB
最終ジャッジ日時 2024-04-26 04:57:49
合計ジャッジ時間 2,045 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,928 KB
testcase_01 AC 39 ms
52,396 KB
testcase_02 AC 38 ms
52,200 KB
testcase_03 AC 37 ms
52,740 KB
testcase_04 AC 39 ms
52,696 KB
testcase_05 AC 37 ms
52,276 KB
testcase_06 AC 38 ms
52,376 KB
testcase_07 AC 38 ms
52,540 KB
testcase_08 AC 37 ms
52,548 KB
testcase_09 AC 38 ms
52,748 KB
testcase_10 AC 76 ms
99,068 KB
testcase_11 AC 76 ms
99,352 KB
testcase_12 AC 76 ms
98,680 KB
testcase_13 AC 77 ms
98,112 KB
testcase_14 AC 77 ms
99,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0
for i in range(N):
  left = i + 1
  right = N - i
  ans += left * right * A[i]
  
print(ans)
0