Limits 1.5s, 1.0 GB

Magic number is an integer number, which is only divisible by itself and total number of divisor will be 2.

Your task is to calculate the number of prime numbers from lower bound to upper bound inclusive.

Input

Input starts with an integer TT (T1000T ≤ 1000), denoting the number of test cases.

Each test case start with an integer LL (0L1000000000 \le L \le 100000000) and UU (0U1000000000 \le U \le 100000000) where LL denoting the lower bound and UU denoting the upper bound. You assume that LUL \le U. You assume that one is not a prime.

Output

For each test case, print a line in the format, "Case T: C", where T is the case number and CC is the number of prime numbers within the given interval.

Sample

InputOutput
2
1 2
1 3
Case 1: 1
Case 2: 2

Submit

Login to submit.

Statistics

80% Solution Ratio
nnnnnnEarliest, Sep '21
Nasif_44thFastest, 0.0s
Nasif_44thLightest, 36 kB
amit_royShortest, 586B
Toph uses cookies. By continuing you agree to our Cookie Policy.