Riddle me this

Discussion in 'The Lounge' started by Avirock, Jan 18, 2011.

  1. Avirock

    Avirock Private E-2

    A shop keeper sell a candy for $1. and he would offer a free candy in exchange of 3 candy wrappers. now u have $555, how many candys can u buy?
    if u got the answer.

    find the answer when u have $5555
    now
    find me the answer for $'n'
     
  2. Maxwell

    Maxwell Folgers

    There are two possibles solutions to this depending on the definition of "buy":

    1. With $555 you buy 555 candies the rest are free. Similarly with $5555, you buy 5555 candies with the rest free. The same goes with $n. So you only ever buy n candies.

    2. However, if you talk about the total number of candies both purchased ones as well as free ones then you need a formula.
     
  3. Rikky

    Rikky Wile E. Coyote - One of a kind

    Is this like?Puzzle spam?

    If U need help with U'er homework U will have more luck if U explained which part U'er stuck on.:-D

    Welcome to the forum:)
     
  4. ACE 256

    ACE 256 MajorGeeks Forum Administrator - Overclocking Expe

    Smells of clever spam filter test post, but I will bite.
    The answer is batman. :-D
     
  5. Rikky

    Rikky Wile E. Coyote - One of a kind

    :-D@Maxwell
     
  6. LauraR

    LauraR MajorGeeks Super-Duper Administrator Staff Member

    Is it bad that I looked at it, thought it might be, but left it to see where you all would go with it?:-D
     
  7. Rikky

    Rikky Wile E. Coyote - One of a kind

    One of those threads eh Laura? Lets break this question down then :-D A shopkeeper is selling a single piece of candy for $1? I've heard of this candy its called Crack Rock! And he's offering 1 free with every 3 you buy which is great deal as Maxwell will tell you.

    You then hold up a gas station and steal $555 but are wounded in a vicious shoot out,Tom Cruise was in the Gas station buying gas and even though only 6 rounds are fired Tom was hit 24 times,in the forehead.

    You run so you find an underground doctor to removed the bullet and amputate the leg,the doctor charges you $200 for the amputation and $100 for a pint of O-,your down to $255.You hop over to the 'shop keeper' to spend your hard earned cash but on the way find out your friend Ice box has been fooling around with your lady so you confront him but he has a mechete and he takes your arm,you cauterise wound with your good arm but set it on fire and have to revisit the doctor who amputates again,he charges you another $200,your down to $55.

    You try to make to the 'shopkeeper' but your one good leg just spins you around in a circle,a passer buy gives you $5 thinking your body popping,$60, but on seeing the other $55 in your pocket he cuts the Achilles tendon in your last leg and takes it,you cry.

    So the answer is you can't buy any candy the world is too dangerous.:(:wave
     
  8. LauraR

    LauraR MajorGeeks Super-Duper Administrator Staff Member

    roflmao

    I think I saw that in a Monty Python movie. Something about 'tis just a flesh wound'. :-D I don't think the knight was on crack though.
     
    Last edited: Jan 19, 2011
  9. BoredOutOfMyMind

    BoredOutOfMyMind Picabo, ICU

    audiedoggie, did you get 2 First-Aid Merit badges as a teen?
     
  10. Rikky

    Rikky Wile E. Coyote - One of a kind

    "Tis just a flesh wound!":-D There actually isn't any substance abuse in my Math solution,its a lesson to all kids don't steal or do drugs! You'll end up having to have your leg amputated,burn one arm off,have the other chopped off,lose a lot of blood,people will laugh at you as spin round with your last remaining leg then you'll have your Achilles tendon cut and lose all your money.

    The only good that ever comes out of stealing and doing drugs is you take out Tom Cruise...
     
    Last edited: Jan 19, 2011
  11. Phantom

    Phantom Brigadier Britches

    You can take him out to the movies if ya want - you're single. .....:puke
     
  12. Nedlamar

    Nedlamar MajorGeek

    I kinda stopped reading about here :-D

    The real question is.... who on gods green earth would spend $555 on candy?... let alone $5555.
    I don't think this is a question of mathematics, but one more of sanity.
     
  13. BILLMCC66

    BILLMCC66 Bionic Belgian

    Not long ago the series "The Osbourns" Ozzie went into a store and spent $600 on candy and when he got home it filled a cabinet in the kitchen.
     
  14. LauraR

    LauraR MajorGeeks Super-Duper Administrator Staff Member


    See how realistic $555 worth of candy is??? :-D
     
  15. Rikky

    Rikky Wile E. Coyote - One of a kind


    You always were the smart one Ned:-D Nice to see you again.
     
  16. Nedlamar

    Nedlamar MajorGeek

    That kind of proves my point about sanity :-D

    At Rikky.... tat reminds me of a great quote...

    "I am so smart.... S..M... R..T "
    homer. ......Simpson :-D
     
  17. Avirock

    Avirock Private E-2

    hello every one

    for $ 555 u can buy 832 candies
    for $ 5555 it works out to be 8332 candies

    now i m stuck here
    i need formula for $n. i tried a lot. not getting
    i think here something opposite of factorial will do, i dont know how.
     
  18. Maxwell

    Maxwell Folgers

    I think you only get 830 candies out of a purchase of 555 (you can't get a fraction of a candy nor wrapper). The calculation goes:

    Buy 555 candies and get 555 wrappers.

    This gives 555/3 = 185 more candies and hence 185 more wrappers.

    Then 185 wrappers gets 185/3 = 61 candies with 2 wrappers left over and hence 61 more wrappers.

    Then 61 wrappers gets 61/3 = 20 candies with 1 wrapper left over and hence 20 more wrappers.

    Then 20 wrappers gets 20/3 = 6 candies with 2 wrappers left over and hence 6 more wrappers.

    Then 6 wrappers gets 6/3 = 2 candies with no wrappers left over.

    Add up the left over wrappers and get 2+1+2=5 wrappers which gets you another candy and 2 wrappers left.

    Thus the total number of candies is: 555+185+61+20+6+2+1=830 and 2 wrappers left.


    The solution above is solving a recursive modular arithmetic equation by adding remainders. I put a simple solution to this problem in an Excel spreadsheet and let it churn out a few more answers which, hopefully, will lead you to a formula...

    Buy 5555 you get 8330 candies in total with no wrappers left over.
    Buy 999 you get 1497 candies in total with 2 wrappers left over.
    Buy 9999 you get 14997 candies in total with no wrappers left over.
    Buy 333 you get 498 candies in total with 2 wrappers left over.



    Hopefully, you are sharing the candies and not eating them all yourself :-D
     
  19. GCWesq

    GCWesq MajorGeek

    @Maxwell: I think in adding up the wrappers left over, you have omitted the two gained from the final 6/3 transaction (as above). Should it not thus be 7 wrappers left over, which yields a further 2 candies and 1 wrapper left, and this yields three wrappers, and this gives one more candy, with the wrapper from that candy left over. That gives a total of 832 candies, with one wrapper left over - and his name is Eminem.

    P.S.There will always be 1 or 2 wrappers left.

    @Avirock:
    You'll find it's much simpler than that. Can I suggest you try some simpler numbers - make a table starting with an amount of $1, then $3, then $5 and so on with odd numbers, and see how many candies you get for each dollar amount. Then make a second table with $2, $4 and so on with even numbers, and see how many candies you get with each. Then look for the pattern in your results. For example, $4 gets you 5 candies with 2 wrappers left over, while $5 gets you 7 candies with 1 wrapper left over.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds