~/algor $ cat problems/a-dan-b-gacha-yigindi
Sum from A to B
Easy
1000 ms
64 MB
23%
Two integers $A$ and $B$ are given ($A \le B$). Compute the sum of all integers from $A$ to $B$:
$$S = A + (A + 1) + \dots + B$$
Input
One line with two integers: $A$ and $B$.
Output
One integer — the sum.
Note
$-10^{5} \le A \le B \le 10^{5}$
Examples
Input #1
1 5
Output #1
15
Input #2
3 8
Output #2
33