Sum on a segment
Very easy
Execution time limit is 2 seconds
Runtime memory usage limit is 128 megabytes
Given array of integers . For given indexes and find
Input
The first line contains the amount of numbers . The second line contains the numbers . The third line contains the number of queries . Each of the next line contains the query and .
Output
Print in separate lines the numbers .
Examples
Input #1
Answer #1
Submissions 8K
Acceptance rate 25%