»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 10-13-2003, 09:56 PM   #1 (permalink)
Registered User
 
gentry_joey's Avatar
 
Join Date: Jul 2003
Posts: 543
gentry_joey is on a distinguished road
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!

gentry_joey is offline   Reply With Quote
Old 10-14-2003, 10:39 AM   #2 (permalink)
Registered User
 
Join Date: Apr 2002
Location: Albany, Ga.
Posts: 1,063
no1_vern is on a distinguished road
99,999 First guess,

Anyone willing to say different? Prove me wrong?
no1_vern is offline   Reply With Quote
Old 10-14-2003, 10:50 AM   #3 (permalink)
Senior Member
 
J-Excel's Avatar
 
Join Date: Aug 2002
Location: Kzoo, MI
Posts: 820
J-Excel is on a distinguished road
If I had a C compiler here I'd write a little program to figure this out.
J-Excel is offline   Reply With Quote
Old 10-14-2003, 11:26 AM   #4 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
about 10998 ?

Last edited by DVNT1; 10-14-2003 at 11:33 AM.
DVNT1 is offline   Reply With Quote
Old 10-14-2003, 11:47 AM   #5 (permalink)
Registered User
 
osprey4's Avatar
 
Join Date: Oct 2001
Location: South Jersey
Posts: 3,081
osprey4 is on a distinguished road
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.
osprey4 is offline   Reply With Quote
Old 10-14-2003, 12:05 PM   #6 (permalink)
Senior Member
 
J-Excel's Avatar
 
Join Date: Aug 2002
Location: Kzoo, MI
Posts: 820
J-Excel is on a distinguished road
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
J-Excel is offline   Reply With Quote
Old 10-14-2003, 12:36 PM   #7 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
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.
DVNT1 is offline   Reply With Quote
Old 10-14-2003, 12:38 PM   #8 (permalink)
ResellerRatings Moderator
 
Join Date: Oct 2001
Location: Winter Park Florida
Posts: 2,591
phenious is on a distinguished road
Send a message via AIM to phenious
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 :-
phenious is offline   Reply With Quote
Old 10-14-2003, 12:59 PM   #9 (permalink)
Senior Member
 
J-Excel's Avatar
 
Join Date: Aug 2002
Location: Kzoo, MI
Posts: 820
J-Excel is on a distinguished road
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..."
J-Excel is offline   Reply With Quote
Old 10-14-2003, 01:55 PM   #10 (permalink)
Registered User
 
DVNT1's Avatar
 
Join Date: Oct 2001
Location: Ohio
Posts: 5,577
DVNT1 is on a distinguished road
J-Excel: tu-che'a (or however that is spelled)

Last edited by DVNT1; 10-14-2003 at 01:57 PM.
DVNT1 is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 06:28 AM.