Problem Statement for rice

``` You are given an array of N numbers with N tasks to perform. For each task, find the sum of the numbers from the range [L, R] inclusive. Input specification: First line: N Second line: The array of numbers separated by spaces Next N lines: The tasks consisting of L and R separated by a space Output specification: For each task, print the answer for the task on separate lines. Time limits: Python/Java - 5.5 seconds, C++ - 2.5 seconds, C - 1.5 seconds Sample input 1: 5 5 5 3 6 7 1 3 1 4 1 1 5 5 2 4 Sample output 1: 13 19 5 7 14 Constraints: for 35% marks: 1 ≤ N ≤ 200 - O(N ^ 2) will pass for 65% marks: 1 ≤ N ≤ 200000 - O(N) will pass Note: For java users, it is imperative that you print output using PrintWriter due to the large amount of output ```


🕑 Time limit: 1.5 seconds
 java: 3.0 seconds
 python: 5.0 seconds
⚎ Memory limit: 256.0 MB