Limits
1s, 512 MB
Today is Poltu’ first C programming class. And, he needs your help with a programming task.
Given two integer numbers L and R, you have to calculate the summation of all odd numbers 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 each contains 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
Input | Output |
---|
2
1 10
2 10
| Case 1: 25
Case 2: 24
|
Input is huge, use faster input/output functions.
Factors
| CPU | Memory | Source |
---|
Bash 5.2 | 1× | 1× | 1× |
Brainf*ck | 1× | 1× | 1× |
C# Mono 6.0 | 1× | 1× | 1× |
C++17 GCC 13.2 | 1× | 1× | 1× |
C++20 Clang 16.0 | 1× | 1× | 1× |
C++20 GCC 13.2 | 1× | 1× | 1× |
C++23 GCC 13.2 | 1× | 1× | 1× |
C11 GCC 13.2 | 1× | 1× | 1× |
C17 GCC 13.2 | 1× | 1× | 1× |
C23 GCC 13.2 | 1× | 1× | 1× |
Common Lisp SBCL 2.0 | 1× | 1× | 1× |
D8 11.8 | 1× | 1× | 1× |
Erlang 22.3 | 1× | 1× | 1× |
Free Pascal 3.0 | 1× | 1× | 1× |
Go 1.22 | 1× | 1× | 1× |
Grep 3.7 | 1× | 1× | 1× |
Haskell 8.6 | 1× | 1× | 1× |
Java 1.8 | 2× | 1× | 1× |
Kotlin 1.1 | 1× | 1× | 1× |
Lua 5.4 | 1× | 1× | 1× |
Node.js 10.16 | 1× | 1× | 1× |
Perl 5.30 | 1× | 1× | 1× |
PHP 8.3 | 1× | 1× | 1× |
PyPy 7.1 (3.6) | 2× | 1× | 1× |
Python 3.12 | 1× | 1× | 1× |
Ruby 3.2 | 1× | 1× | 1× |
Rust 1.57 | 1× | 1× | 1× |
Swift 5.3 | 1× | 1× | 1× |
Whitespace | 1× | 1× | 1× |