啊哈添柴——挑战
1032. 区间和
import java.util.Scanner;
/**
* @author yinglongwu
*/
//1032. 区间和
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int m= scanner.nextInt();
int n= scanner.nextInt();
int sum = 0;
for (int i = m; i <= n; i++) {
sum = sum + i;
}
System.out.println(sum);
scanner.close();
}
}