Tuesday, January 15, 2019

URI 1099:: SOLUTION

URI Online Judge | 1099

Sum of Consecutive Odd Numbers II

Read an integer that is the number of test cases. Each test case is a line containing two integer numbers and Y. Print the sum of all odd values between them, not including and Y.

Input

The first line of input is an integer that is the number of test cases that follow. Each test case is a line containing two integer and Y.

Output

Print the sum of all odd numbers between X and Y.
Input SampleOutput Sample
7
4 5
13 10
6 4
3 3
3 5
3 4
3 8
0
11
5
0
0
0
12



[WAIT]
     First of all, think yourself that you have tried enough for the problem. If you did not please read the program once. REMEMBER one thing, just believe in yourself.....YOU CAN.....YOU KNOW....



See the ANSWER here...

No comments:

Post a Comment