Given an array of integers and q queries, each query asks: what's the sum of elements from index a to b? The naive approach loops through a to b for each query. With n, q up to , that's too slow. You just learned prefix sums.
This problem is the direct application. Can you see how to answer each query in ? Build pref[i] = pref[i-1] + a[i], then answer each query with pref[r] - pref[l-1].