logo AlgoBeat OnlineJudge
登录 注册

#216859. [GKS 2022 #B] Palindromic Factors

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

题目描述

You are given a positive integer . Find the number of factors of which are palindromes. A number is called a palindrome if it remains the same when the digits in decimal representation are reversed. For instance, is a palindrome, while is not.

输入格式

The first line of the input gives the number of test cases, . lines follow.

Each line represents a test case and contains a single integer .

输出格式

For each test case, output one line containing Case #: , where is the test case number (starting from ) and is the number of factors of which are palindromes.

样例

样例输入 1

4
6
10
144
242

样例输出 1

Case #1: 4
Case #2: 3
Case #3: 7
Case #4: 6

数据范围与提示

In the first test case, has factors which are palindromes: , , , and .

In the second test case, has factors which are palindromes: , , and .

In the third test case, has factors which are palindromes: , , , , , , and .

In the fourth test case, has factors which are palindromes: , , , , , and .

Limits

.

Test Set

.

Test Set

.