Challenge Questions Blog

Challenge Questions

Stop in and exercise your brain. Talk about this month's Challenge from Specs & Techs or similar puzzles.

So do you have a Challenge Question that could stump the community? Then submit the question with the "correct" answer and we'll post it. If it's really good, we may even roll it up to Specs & Techs. You'll be famous!

Answers to Challenge Questions appear by the last Tuesday of the month.

Previous in Blog: Bears and Ferries, Oh My! (July '23 Challenge Question)   Next in Blog: A Deck of Cards in the Dark (September '23 Challenge Question)
Close
Close
Close
6 comments

Counting to 1,000 by 3's (August 2023 Challenge Question)

Posted July 31, 2023 12:00 AM
Pathfinder Tags: challenge question

Bored? Need to stay busy?

How many different integers between the numbers 1 to 1,000 contain the digit 3 at least once? (i.e., the number 333 only counts once)

How many different instances of the digit 3 occur? (i.e, the number 333 counts thrice)

Reply

Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".
3
Guru

Join Date: Mar 2007
Location: by the beach in Florida
Posts: 33280
Good Answers: 1810
#1

Re: Counting to 1,000 by 3's (August 2023 Challenge Question)

07/31/2023 1:48 AM

271 numbers contain at least one three, and a total of 300 3's are used in total...

__________________
All living things seek to control their own destiny....this is the purpose of life
Reply Good Answer (Score 3)
Guru

Join Date: Aug 2005
Location: Hemel Hempstead, UK
Posts: 5803
Good Answers: 315
#2
In reply to #1

Re: Counting to 1,000 by 3's (August 2023 Challenge Question)

07/31/2023 8:05 AM

GA

Easy bit of "spreadsheeting"

__________________
We are alone in the universe, or, we are not. Either way it's incredible... Adapted from R. Buckminster Fuller/Arthur C. Clarke
Reply
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9742
Good Answers: 1119
#3

Re: Counting to 1,000 by 3's (August 2023 Challenge Question)

07/31/2023 8:46 AM

1/10 have 3 in ones digit, 1/10 have 3 in tens digit, and 1/10 have 3 in hundreds digit, so 100 + 100 + 100 = 300 threes in all. (i.e., counting 333 as 3 instances).

Multiple threes:

Three threes: 1,: 333, subtract 1 x 2

Two threes: 3,: 330, 303, 033, subtract 3 x 1

300 - 1x2 - 3x1 = 295 numbers with one or more 3's

Reply
2
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9742
Good Answers: 1119
#4
In reply to #3

Re: Counting to 1,000 by 3's (August 2023 Challenge Question)

07/31/2023 9:03 AM

Correction:

1/10 have 3 in ones digit, 1/10 have 3 in tens digit, and 1/10 have 3 in hundreds digit, so 100 + 100 + 100 = 300 threes in all. (i.e., counting 333 as 3 instances).

Multiple threes:

Three threes: 1,: 333, subtract 1 x 2

Two threes: 3,: 33(9 digits), 3(9 digits)3, (9 digits)33, subtract 27 x 1

300 - 1x2 - 3x9 = 271 numbers with one or more 3's

Reply Good Answer (Score 2)
Guru

Join Date: Aug 2005
Location: Hemel Hempstead, UK
Posts: 5803
Good Answers: 315
#5
In reply to #4

Re: Counting to 1,000 by 3's (August 2023 Challenge Question)

07/31/2023 10:17 AM

GA. I couldn't see an easy way to work it out without counting them.

__________________
We are alone in the universe, or, we are not. Either way it's incredible... Adapted from R. Buckminster Fuller/Arthur C. Clarke
Reply
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7870
Good Answers: 452
#6
In reply to #4

Re: Counting to 1,000 by 3's (August 2023 Challenge Question)

08/02/2023 4:48 PM

Nicely done without a spreadsheet, not that there is anything wrong with that, but I do have an appreciation for solutions based on logic rather than brute force computing.

Reply
Reply to Blog Entry 6 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".
Copy to Clipboard

Users who posted comments:

Brave Sir Robin (1); Randall (2); Rixter (2); SolarEagle (1)

Previous in Blog: Bears and Ferries, Oh My! (July '23 Challenge Question)   Next in Blog: A Deck of Cards in the Dark (September '23 Challenge Question)

Advertisement