Welcome to BrainDen.com - Brain Teasers Forum
![]() |
Welcome to BrainDen.com - Brain Teasers Forum. Like most online communities you must register to post in our community, but don't worry this is a simple free process. To be a part of BrainDen Forums you may create a new account or sign in if you already have an account. As a member you could start new topics, reply to others, subscribe to topics/forums to get automatic updates, get your own profile and make new friends. Of course, you can also enjoy our collection of amazing optical illusions and cool math games. If you like our site, you may support us by simply clicking Google "+1" or Facebook "Like" buttons at the top. If you have a website, we would appreciate a little link to BrainDen. Thanks and enjoy the Den :-) |
Guest Message by DevFuse
Form a dollar from n coins
Started by bonanova, Jan 23 2013 10:04 AM
Best Answer markdane22, 23 January 2013 - 03:34 PM
As this question was getting no answers, I have cheated and made the program
:
Spoiler for Program output
Go to the full post
2 replies to this topic
#1
Posted 23 January 2013 - 10:04 AM
You are given n > 0 of each of the standard denomination US coins: 1¢, 5¢, 10¢, 25¢, 50¢, $1.
Your task is then to select from them a set of n coins whose total value is exactly $1.
Clearly, if n=1, you can do this by selecting the $1 coin. If n=2 you select the two half-dollar coins.
But if n > 100, then every set of n coins (e.g. all the pennies) will have a total that is too large.
What is the smallest n such that it is impossible to select n coins that make exactly a dollar?
Your task is then to select from them a set of n coins whose total value is exactly $1.
Clearly, if n=1, you can do this by selecting the $1 coin. If n=2 you select the two half-dollar coins.
But if n > 100, then every set of n coins (e.g. all the pennies) will have a total that is too large.
What is the smallest n such that it is impossible to select n coins that make exactly a dollar?
The greatest challenge to any thinker is stating the problem in a way that will allow a solution.
- Bertrand Russell
- Bertrand Russell
#2
Posted 23 January 2013 - 03:34 PM Best Answer
As this question was getting no answers, I have cheated and made the program
:
Spoiler for Program output
Edited by markdane22, 23 January 2013 - 03:42 PM.
#3
Posted 23 January 2013 - 04:15 PM
Hi markdane, and welcome to the Den.
That's the answer. Thanks for posting.
That's the answer. Thanks for posting.
The greatest challenge to any thinker is stating the problem in a way that will allow a solution.
- Bertrand Russell
- Bertrand Russell
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users






