Logo
(追記) (追記ここまで)

25085번 - Palindromic Factors 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB1951119656.805%

문제

You are given a positive integer $A$. Find the number of factors of $A$ 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.

입력

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

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

출력

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

제한

  • 1ドル≤T≤100$.

Test Set 1 (6점)

  • 1ドル≤A≤10^3$.

Test Set 2 (9점)

  • 1ドル≤A≤10^{10}$.

예제 입력 1

4
6
10
144
242

예제 출력 1

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

힌트

In the first test case, $A$ has 4ドル$ factors which are palindromes: 1ドル,ドル 2ドル,ドル 3ドル,ドル and 6ドル$.

In the second test case, $A$ has 3ドル$ factors which are palindromes: 1ドル,ドル 2ドル,ドル and 5ドル$.

In the third test case, $A$ has 7ドル$ factors which are palindromes: 1ドル,ドル 2ドル,ドル 3ドル,ドル 4ドル,ドル 6ドル,ドル 8ドル,ドル and 9ドル$.

In the fourth test case, $A$ has 6ドル$ factors which are palindromes: 1ドル,ドル 2ドル,ドル 11ドル,ドル 22ドル,ドル 121ドル,ドル and 242ドル$.

출처

Contest > Google > Kick Start > Google Kick Start 2022 > Round B B번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /