TopCoder

Cheng0928
笨笨的笨蛋 $\huge \color{red}{I'm\ Stupid. How\ to\ AC?}$

User's AC Ratio

100.0% (5/5)

Submission's AC Ratio

61.5% (8/13)

Tags

Description

給一個長度為 $n$ 的序列 $A$,求 $A_l$ 到 $A_r$ 的和。


對於所有測試資料:
$1 \le n \le 100$
$1 \le l \le r \le n$
$1 \le A_i \le 100$

Input Format

輸入共兩行,
第一行有三個數字,依序為 $n$、$l$、$r$,
第二行有 $n$ 個數字,第 $i$ 個數字代表 $A_i$。

Output Format

輸出一個數字代表答案

Sample Input 1

5 3 4
1 2 3 4 5

Sample Output 1

7

Sample Input 2

5 2 5
3 5 7 2 4

Sample Output 2

18

Hints

Problem Source

Subtasks

No. Testdata Range Constraints Score
1 0~29 題目範圍限制 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 1
2 1000 65536 65536 1
3 1000 65536 65536 1
4 1000 65536 65536 1
5 1000 65536 65536 1
6 1000 65536 65536 1
7 1000 65536 65536 1
8 1000 65536 65536 1
9 1000 65536 65536 1
10 1000 65536 65536 1
11 1000 65536 65536 1
12 1000 65536 65536 1
13 1000 65536 65536 1
14 1000 65536 65536 1
15 1000 65536 65536 1
16 1000 65536 65536 1
17 1000 65536 65536 1
18 1000 65536 65536 1
19 1000 65536 65536 1
20 1000 65536 65536 1
21 1000 65536 65536 1
22 1000 65536 65536 1
23 1000 65536 65536 1
24 1000 65536 65536 1
25 1000 65536 65536 1
26 1000 65536 65536 1
27 1000 65536 65536 1
28 1000 65536 65536 1
29 1000 65536 65536 1