|
|||
Odd SumGiven a range [a, b], you are to find the sum of all the odd integers in this range. For example, the sum of all the odd integers in the range [3, 9] is 3 + 5 + 7 + 9 = 24. Input SpecificationThere can be several test cases. The first line of the input gives you the number of test cases, T (1 ≤ T ≤ 100). Then T test cases follow. Each test case consists of 2 integers a and b (0 ≤ a ≤ b ≤ 100) in two separate lines. Output SpecificationFor each test case, you are to print one line of output – the number of the test case, followed by the sum of the odd integers in the range [a, b]. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |