#3272
Find the Count of Good Integers
expert · 1025 · lc hard +32 · 69.5% accepted · 464 likes · top 77%
Description
You are given positive integers n and k. An integer is k-palindromic if it is a palindrome divisible by k. An integer is good if its digits can be rearranged into a k-palindromic integer.
Return the count of good n-digit integers (no leading zeros before or after rearrangement).
Code
1
2
3