LearnPy Hub
← Arena
AdvancedRating 2000

Block Sums Within Bounds

Count the blocks of consecutive numbers whose sum lies between lo and hi (inclusive).

Input

n, lo and hi; then n integers.

Output

One integer.

Sample 1

Input
3 -2 2
-2 5 -1
Output
3

Sample 2

Input
1 0 0
0
Output
1
solution.py
Output appears here
Block Sums Within Bounds · Python Arena problem · LearnPy Hub