#41Easy
Sum from a to b
Time: 1 s · Memory: 256 MB
- Loops
Statement
You are given two integers and (). Find the sum of all integers from to inclusive.
Input format
A single line with two integers and ().
Output format
A single integer — the sum.
Examples
Input
2 5
Output
14
Input
-3 3
Output
0
Note
Accumulate the sum with a for loop: start from and add the next number on each step. The sum reaches — use long long in C++ and int64 in Go.
In the first example: .
