Tripartite Palindromic Partition of Integer (HP 50g) Challenge
|
03-18-2023, 09:31 PM
Post: #78
|
|||
|
|||
RE: Tripartite Palindromic Partition of Integer (HP 50g) Challenge
peruna's code does greedy search, picking the biggest palindrome for x first.
For n of 6 or 7 diigits, first (n-x) are under 3 digits. Example: 3141592 - 3141413 = 179 = 171 + 8 Out of 1000 possibiilties, only 8*2 = 16 are unable to be represented by 2 palindromes. This may explain why it is fast for small integer cases. 21, 32, 43, 54, 65, 76, 87, 98 201, 302, 403, 504, 605, 706, 807, 908 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)