Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Another puzzle

 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In front of you are 10 sacks containing 25 gold coins each. Each gold coin weighs exactly 1 oz. One of the sacks actually contains counterfeit gold coins. The counterfeit coins weigh 1.1 oz.
Also in front of you is a penny scale. This is the type of scale that you put a penny in and it gives you back a card telling you what something weighs. The scale is accurate to .1 oz.
You have one penny. Using the scale and your one penny, how do you determine which sack contains the counterfeit gold?
[ May 07, 2002: Message edited by: Thomas Paul ]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Good one.. take 1 coin from the first bag, 2 from the second, 3 from the third .. and 10 from the tenth bag.
Stack these coins separatly on your penny scale, plonk in your penny and measure it. The weight will be xx.yy oz
if yy is 1, it means that you had 1 counterfeit coin weighing 1.1, so bag 1 is the culprit, .2 means you had 2 bad coins, so bag 2 is the culprit and so on...

[ May 07, 2002: Message edited by: Thomas Paul ]
 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take one from first sack , two from second ....
10 from tenth
If all were correct, it would weigh 1+2+... = 55
If nth sack is faulty then it would weigh
55 + .1n
Now find out n
 
Happily living in the valley of the dried frogs with a few tiny ads.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!