Азербайджан - подготовка. Март 18
Let's define the next recursive function F(n), where
Let's define the function S (p, q) as follows:
In this problem you have to calculate S (p, q) on given values of p and q.
Consists of multiple test cases. Each line contains two nonnegative integers p and q (p ≤ q), separated by space. p and q will fit in 32 bit signed integer. Input is terminated by a line with two negative integers. This line should not be processed.
For each pair p and q print the value S (p, q) on a single line.
1 10 10 20 30 40 -1 -1
46 48 52