Company: Publicis_Sapient___
Difficulty: medium
Find 5-Digit Palindromes with Digit Constraints Problem Description How many five-digit numbers satisfy all the following conditions? The number is a palindrome. The sum of its digits is 27. The middle digit is exactly 2 greater than each of the outermost digits. The number is divisible by 11. Examples Example 1: Input: No input (This is a mathematical problem asking for a count) Output: 0 Explanation: You need to verify if any number satisfies all conditions simultaneously. - A 5-digit palindrome has the form abcba . - Divisibility by 11 for a palindrome abcba implies: (a - b + c - b + a) is a multiple of 11. Or (2a + c - 2b) ≡ 0 (mod 11). - Sum of digits is 27: 2a + 2b + c = 27. - Middle digit constraint: c = a + 2. Solving this system leads to no valid integer digits. Constraints The number must be exactly five digits long (cannot start with 0). Digits must be integers from 0 to 9.