Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Poltu and Odd Number

By RamprosadG · Limits 1s, 512 MB

Poltu is a student of CSE department of BSMRSTU. Today is his first C programming class. Poltu learned the basic of C programming language. At the end of the class the teacher gives a task to poltu. But poltu does not know how to complete this task, because he doesn’t know the advance topic of C. Poltu needs your help. Can you help Poltu?

The task is described below-

You are given two integer number L and R. You have to calculate the summation of all odd number which is not less than L and is not greater than R.

Input

Input will starts with an integer T(1 ≤ T ≤ 100000), Number of test case.

The next T lines contain two integers L and R(1 ≤ L ≤ R ≤ 1000000000).

Output

For each test case print the case number and the result of the problem described above in a separate line.

Sample

InputOutput
2
1 10
2 10
Case 1: 25
Case 2: 24

Note: Input is huge, Use faster input, output

Discussion

Statistics


74% Solution Ratio

iammarajulEarliest, 7M ago

salman.exeFastest, 0.0s

shojib_muLightest, 3.1 MB

DasjituShortest, 137B

Submit

Login to submit