Question: Ada and coding tests Ada is a proficient programmer who loves to give coding tests. She maintains a list of marks she scored in these
Ada and coding tests
Ada is a proficient programmer who loves to give coding tests. She maintains a list of marks she scored
in these tests, denoted as dots. where represents the marks she obtained in the test.
One day, she grew curious and decided to analyse her performance in the tests she had attempted so
far. To do this, she wanted to determine the total hrarks she scored between two given tests. With
multiple queries of this nature, can you help her analyse her performance?
Input Format
The first line contains one integer representing the number of tests attempted byAdaso far.
The nextline contains nintegers, marks scored by her in tests.
The next line contains one integer denoting the number of queries she has
The next lines describe the test indices. Each line contains two integers, and representing the tests
between which she wants to find out the total marks scored including both and
Constraints
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
