Submission

Status:

Pxxxxxxxxxxxxxxxxxxx

Subtask/Task Score:

5/100

Score: 5

User: agnes_chan

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

Language: python

Time: 0.010 second

Submitted On: 2026-05-08 13:36:22

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