Skip to content

Commit 73d622b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8883596 commit 73d622b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/3_Silver/Prefix_Sums.mdx

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,12 @@ In Python you can use [itertools.accumulate](https://docs.python.org/3.6/library
277277
```py
278278
# import itertools
279279

280+
280281
def psum(a):
281282
psum = [0]
282283
for i in a:
283284
psum.append(psum[-1] + i) # psum[-1] is the last element in the list
284-
return psum # Or with itertools.accumulate: [0] + list(itertools.accumulate(a))
285+
return psum # Or with itertools.accumulate: [0] + list(itertools.accumulate(a))
285286

286287

287288
N, Q = map(int, input().split())

0 commit comments

Comments
 (0)