Skip to content

Commit 5535f72

Browse files
authored
Update sum-of-consecutive-subsequences.py
1 parent 61ea733 commit 5535f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/sum-of-consecutive-subsequences.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def count(d):
1818
for x in nums:
1919
c = (cnt[x-d]+1)%MOD
2020
cnt[x] = (cnt[x]+c)%MOD
21-
total = (prefix[x-d]+(x*c))%MOD
21+
total = (prefix[x-d]+x*c)%MOD
2222
prefix[x] = (prefix[x]+total)%MOD
2323
result = (result+total)%MOD
2424
return result

0 commit comments

Comments
 (0)