A Loop Problem

View as PDF

Submit solution

Points: 3
Time limit: 0.2s
Memory limit: 64M

Author:
Problem type

Dereck is learning for loops but doesn't know what a keyboard is. Can you help him?

Given L and R, output the sum of all integer numbers between L and R (inclusive).

Input Specification

The first line will contain the integers L and R (0\ <\ L\ \le\ R\ \le\ 2^{31}-1).

Output Specification

Output the sum of all integer numbers between L and R (inclusive).

Sample Input

1 10

Sample Output

55

Comments

There are no comments at the moment.