Submission

Status:

Pxxxxxxxxxxxxxxxxxxx

Subtask/Task Score:

5/100

Score: 5

User: agnes_chan

Problemset: ผลบวก (กลาง)

Language: python

Time: 0.011 second

Submitted On: 2026-05-08 13:46:41

sc , N = [0] , int(input())
for i in map(int,input().split()): sc.append(sc[-1]+i)
for k in range(int(input())):
    i , j = map(int,input().split())
    print(sc[j+1]-sc[i])