logo AlgoBeat OnlineJudge
登录 注册

#216778. [GKS 2020 #H] Boring Numbers

内存限制:1024 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Ron read a book about boring numbers. According to the book, a positive number is called boring if all of the digits at even positions in the number are even and all of the digits at odd positions are odd. The digits are enumerated from left to right starting from . For example, the number is boring as the odd positions include the digits which are odd and even positions include the digits which are even.

Given two numbers and , Ron wants to count how many numbers in the range ( and inclusive) are boring. Ron is unable to solve the problem, hence he needs your help.

输入格式

The first line of the input gives the number of test cases, . test cases follow. Each test case consists of a single line with two numbers and .

输出格式

For each test case, output one line containing Case #: , where is the test case number (starting from ) and is the count of boring numbers.

样例

样例输入 1

3
5 15
120 125
779 783

样例输出 1

Case #1: 6
Case #2: 3
Case #3: 2

数据范围与提示

In Sample Case , the numbers in the range are out of which are boring, hence the answer is .

In Sample Case , the numbers in the range are out of which are boring, hence the answer is .

In Sample Case , the numbers in the range are out of which are boring, hence the answer is .

Limits

.

Test Set

.

Test Set

.