pastebin
Add a new paste
View all pastes
Change language
Dutch
English
French
Russian
menu
URL Shortener
Multiple URL shortener
browser info
Whois IP and domain lookup
Capture a Website screenshot
Disqus Chatroom
Registration
pastebin
Paste Search Dynamic
Recent pastes
scan
3 hours ago
Helpers optimizePhp
3 hours ago
setPalindrome
3 hours ago
helpers strip
3 hours ago
struct node
3 hours ago
Helpers date
3 hours ago
map long long
3 hours ago
Helpers bytes
3 hours ago
inside
3 hours ago
IGit not found
3 hours ago
diff hist
diff_hist =
[
0
,
10
,
20
,
30
,
40
]
prev =
0
accum_hist =
[
]
for
i
in
diff_hist:
prev = prev + i
accum_hist.
append
(
prev
)
print
(
accum_hist
)
accum_hist2 =
[
sum
(
diff_hist
[
:i
]
)
for
i
in
range
(
len
(
diff_hist
)
)
]
print
(
accum_hist
)
Parsed in 0.004 seconds