Setting

Given a range [a, b], you are to find the summation of all the odd integers in this range. For example, the summation of all the odd integers in the range [3, 9] is 3 + 5 + 7 + 9 = 24.

Input

There can be at multiple test cases. The first line of 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

For each test case you are to print one line of output - the serial number of the test case followed by the summation of the odd integers in the range [a, b].

Sample Input

2
1
5
3
5

Sample Output

Case 1: 9
Case 2: 8

This challenge is provided by the ACM International Collegiate Programming Contest.

Upload Solution

Please log in to submit your solution.

Statistics

Difficulty (11 votes)
Average test runtime 0.26
Points (changes over time) 10
Tried by 76 users
Solved by 71 users

Global ranking

# Name Runtime Points worth
1 Brian 0.12 19
2 Justin 0.13 17
3 贝尔恩德 0.13 17
4 The Dude 0.13 17
5 ,s/java/NaN/gi 0.14 16
6 JB 0.14 16
7 Pascal 0.14 16
8 mascent 0.14 16
9 Daniel 0.14 16
10 Jan 0.15 15
11 Sebastian 0.15 15
12 Dark 0.15 15
13 Irfan 0.15 15
14 Maria-Anna 0.17 13
15 mad 0.17 13
16 Chris Danger 0.19 12
17 Marvin 0.19 12
18 Lars 0.19 12
19 Ali 0.19 12
20 Kristof 0.20 11
21 Daniel 0.20 11
22 Thomas 0.20 11
23 Thorsten 0.20 11
24 Paul 0.20 11
25 Melf 0.20 11
26 Sven 0.20 11
27 AlexanderP 0.20 11
28 Nico 0.21 11
29 Mo 0.21 11
30 Phatti McButterpants 0.23 10
31 maltesar 0.24 9
32 Marek 0.24 9
33 Connor 0.24 9
34 Finn-Lasse 0.25 9
35 Michael 0.25 9
36 Jona 0.25 9
37 Gyde 0.25 9
38 Alexander 0.25 9
39 Jonah 0.26 9
40 c. 0.26 9
41 Ansgar 0.26 9
42 IeM 0.27 8
43 Jonas 0.28 8
44 Peanut 0.28 8
45 Yannick 0.28 8
46 Merle 0.28 8
47 The Prof 0.31 7
48 Jan 0.31 7
49 Nis 0.32 7
50 Pascal 0.32 7
51 Florian 0.32 7
52 YaAlex 0.34 7
53 Lasse 0.34 7
54 Ohreally 0.35 6
55 Birger 0.35 6
56 Henrik 0.35 6
57 KnorpelSenf 0.35 6
58 Mac 0.35 6
59 Valentin 0.35 6
60 Anne 0.35 6
61 Philip 0.35 6
62 Christian 0.36 6
63 Benedict 0.36 6
64 Malte 0.37 6
65 Jana 0.37 6
66 Sloner 0.37 6
67 Skøgland 0.38 6
68 Eren B. Yilmaz 0.38 6
69 Christoph 0.38 6
70 Philip 0.39 6
71 Soeren 0.40 6