package s004;
import java.util.*;//用于java输入语句的包。
public class A
{
private static Scanner a;
public static void main(String[]args)
{
int[] a={-2574,-4010,8243,771,2447,-5197,2556,8044,3314,3617,6065,-2817,3131,6318,2186,-113,629,-2582,-37,-1520,164,2055,-5936,5912,1717,5988,4781,5757,892,-4394,8034,2213,-1080,-2080,5364,106,2657,566,3940,-5116};
int sum=0;
Scanner a = new Scanner(System.in) ;//定义对数组元素从其中的一个元素项开始到另一个元素项结束,所以这里用到Scanner类的nextInt()方法。
System.out.println("input:");
int input = a.nextInt() ;
System.out.println("output:");
int output =a.nextInt();
for(int i=input;i<=output;i++)
System.out.println(sum+=a[i]);
}
}