Top | Newest First | Oldest First
Gusman 路 61-69, M
Lots....馃
Starting with 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 454, 464, 474, 484, 494, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 606, 616, 626, 636, 646, 656, 666, 676, 686, 696, 707, 717, 727, 737, 747, 757, 767, 777, 787, 797, 808, 818, 828, 838, 848, 858, 868, 878, 888, 898, 909, 919, 929, 939, 949, 959, 969, 979, 989, 999
Is that right?
Starting with 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 454, 464, 474, 484, 494, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 606, 616, 626, 636, 646, 656, 666, 676, 686, 696, 707, 717, 727, 737, 747, 757, 767, 777, 787, 797, 808, 818, 828, 838, 848, 858, 868, 878, 888, 898, 909, 919, 929, 939, 949, 959, 969, 979, 989, 999
Is that right?
View 1 more replies 禄
This message was deleted by its author.
OldBrit 路 61-69, M
Always been into palindromes... Goes back to first Z80 assembler program I wrote at college in 81 which was a palindrome analyser 馃ぃ馃ぃ馃ぃ
Will watch mathematic replies with interest
Will watch mathematic replies with interest
OldBrit 路 61-69, M
So there's one per 10 ie 101 111 121 etc so 10 per hundred.
10x9 so 90?
Is it that simple?
10x9 so 90?
Is it that simple?
Riemann 路 31-35, M
Should've written, write in a paper.
DDonde 路 31-35, M
for i is 100 to 1000
For each digit left of middle, push to stack
If it's odd length, ignore the middle digit
For every digit after middle, check to see if it matches the top of the stack and pop it if it does. If there is a mismatch, it's not a palindrome. Or if the stack is not empty at the end, it is not a palindrome.
If it the stack is empty by the end, add 1 to the count of palindromes.
Clear the stack. Next number.
For each digit left of middle, push to stack
If it's odd length, ignore the middle digit
For every digit after middle, check to see if it matches the top of the stack and pop it if it does. If there is a mismatch, it's not a palindrome. Or if the stack is not empty at the end, it is not a palindrome.
If it the stack is empty by the end, add 1 to the count of palindromes.
Clear the stack. Next number.