Palindromic Factors Round B 2022 - Kick Start 2022
Problem
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, 121 is a palindrome, while 123 is not.
Input
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 .
Output
For each test case, output one line containing Case #:
, where is the test case number (starting from 1) and is the number of factors of which are palindromes.
Solution Click Below:-
Limits
Time limit: 2 seconds.
Memory limit: 1 GB.
.
Test Set 1
.
Test Set 2
.
Sample
4 6 10 144 242
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 .
No comments:
Post a Comment