 | |
10-13-2003, 09:56 PM
|
#1 (permalink)
| | Registered User
Join Date: Jul 2003
Posts: 543
| » 
math prombelm: palindromes
A palindrome is a word, number, or phrase that reads the same forwards or backwards. For example, the phrases "Madam, I'm Adam" and "Poor Dan is in a droop" are palindromes. The numbers 743347 and 828 are also both palindromes.
This week's challenge is to count how many numbers between zero and ten million are palindromes. The first ten are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 (any one digit number reads the same forwards or backwards). But 10 is not a palindrome (even though you could write it as 010, we don't want to allow zero as a leading digit).
Happy counting!
|
| |
10-14-2003, 10:39 AM
|
#2 (permalink)
| | Registered User
Join Date: Apr 2002 Location: Albany, Ga.
Posts: 1,063
|
99,999 First guess,
Anyone willing to say different? Prove me wrong?
|
| |
10-14-2003, 10:50 AM
|
#3 (permalink)
| | Senior Member
Join Date: Aug 2002 Location: Kzoo, MI
Posts: 820
|
If I had a C compiler here I'd write a little program to figure this out.
|
| |
10-14-2003, 11:26 AM
|
#4 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Ohio
Posts: 5,577
|
about 10998 ?
Last edited by DVNT1; 10-14-2003 at 11:33 AM.
|
| |
10-14-2003, 11:47 AM
|
#5 (permalink)
| | Registered User
Join Date: Oct 2001 Location: South Jersey
Posts: 3,081
|
Do it by # of digits.
Two-digit numbers, anything divisible by 11 (22,33, etc.)
Three digit numbers, anything beginning and ending in the same number. So between 100 and 199, there would be 101, 111, 121, etc. Same for each set of 100 numbers.
Carry on through each order of magnitude (4-digit, 5-digit, etc.). Shouldn't take too long.
Obviously it's less than 10998.
|
| |
10-14-2003, 12:05 PM
|
#6 (permalink)
| | Senior Member
Join Date: Aug 2002 Location: Kzoo, MI
Posts: 820
|
10999 (counting 0)
At 10's place - 10 (0 - 9)
At 100's place - 9 (11-99)
At 1000's place - 90
At 10,000's place - 90
At 100,000's place - 900
At 1,000,000's place - 900
At 10,000,000's place - 9000
|
| |
10-14-2003, 12:36 PM
|
#7 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Ohio
Posts: 5,577
| Quote: Originally posted by J-Excel 10999 (counting 0)... | "...count how many numbers between zero and ten million are palindromes..." Quote: Originally posted by osprey4 ...Obviously it's less than 10998... | Why would you say that osprey4? (btw, you came across as being a bit arrogant).
Last edited by DVNT1; 10-14-2003 at 12:51 PM.
|
| |
10-14-2003, 12:38 PM
|
#8 (permalink)
| | ResellerRatings Moderator
Join Date: Oct 2001 Location: Winter Park Florida
Posts: 2,591
|
well if nobdy does it when I get home tonight around 9PM Eastern time Ill try to whip up a little something in C++ that can do it... dont have a compiler here at this computer I can use. Plus I should be studying for my test in 2 hours... lol
-: phenious :-
|
| |
10-14-2003, 12:59 PM
|
#9 (permalink)
| | Senior Member
Join Date: Aug 2002 Location: Kzoo, MI
Posts: 820
| Quote: Originally posted by DVNT1 "...count how many numbers between zero and ten million are palindromes..." | "The first ten are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9..." |
| |
10-14-2003, 01:55 PM
|
#10 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Ohio
Posts: 5,577
|
J-Excel: tu-che'a (or however that is spelled)
Last edited by DVNT1; 10-14-2003 at 01:57 PM.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions  | | | | | Recent Discussions  | | | | | |