#93Easy
Sum over a range
Time: 1 s · Memory: 256 MB
- Functions
Statement
Write a function Range(A, B) that returns the sum of all integers in ; if , it returns . Using it, find Range(a, b) and Range(b, c) for the numbers , , .
Input format
A single line with three integers , , ().
Output format
A single line with two numbers: Range(a, b) and Range(b, c).
Examples
Input
3 8 5
Output
33 0
Input
1 1 1
Output
1 1
Note
In the first example: Range(3, 8) , and Range(8, 5) because .
