2481. Strictly Palindromic Number
My accepted Python solution to LeetCode problem 2481, Strictly Palindromic Number, running in 0ms.
- Difficulty: Medium
- Python
- Runtime 0ms
- Memory 17MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 0ms, memory 17MB, accepted 2026-01-01.
class Solution:
def isStrictlyPalindromic(self, n: int) -> bool:
# For any n >= 4, n in base (n-2) is always "12" which is not palindromic
# Therefore, no number >= 4 is strictly palindromic
return False