#t327. 求部分区间和
求部分区间和
Partial Interval Sum
Problem Background
Special for beginners, ^_^
Problem Description
Given a sequence of integers, compute the sum of the numbers in the range .
$$\nsum(a, b) =\n\begin{cases}\nnum[a], &a=b\\\\\nnum[a]+sum(a+1, b), &a < b\n\end{cases}\n$$Input Format
The first line contains a positive integer .
The second line contains positive integers, each less than .
The third line contains two integers .
Output Format
Output the sum of the integers in the range .
Sample Input
5
1 2 3 4 5
2 4
Sample Output
9
Constraints
1s, 1024KiB for each test case.