fresh Posted January 21, 2013 Share Posted January 21, 2013 (edited) some Qs look simple, but it is not easy to get the right answer, here is the one below : you and your 27 classmates go to buy coca cola. the promotion is: buy 3 free 1, ask: how many bottles of coca cola you and your classmates need to buy ? (only one bottle per classmate) Edited January 21, 2013 by fresh Link to comment Share on other sites More sharing options...
Externet Posted January 21, 2013 Share Posted January 21, 2013 28 bottles come in seven promotional packs of three + one free; which is buying 21 and getting 7 free ? 1 Link to comment Share on other sites More sharing options...
fresh Posted January 21, 2013 Author Share Posted January 21, 2013 28 bottles come in seven promotional packs of three + one free; which is buying 21 and getting 7 free ? yes, you are right, but most of people get answer : 19 bottles. 1. 3*9=27 2. of total 28 bottles, i can buy 9 packs of 3 bottles,buy 3 free 1, then receive free 9 bottles, hence 28-9=19. what's the trick ? why this is the wrong answer ? Link to comment Share on other sites More sharing options...
Externet Posted January 21, 2013 Share Posted January 21, 2013 There is no trick, and 19 is wrong because it is wrong, being mathematics an exact science. 1 Link to comment Share on other sites More sharing options...
John Cuthber Posted January 21, 2013 Share Posted January 21, 2013 " how many bottles of coca cola you and your classmates need to buy ?" I need to buy 28 bottles. How much I pay for them is another question. There is no such thing as a free lunch. 1 Link to comment Share on other sites More sharing options...
Phi for All Posted January 21, 2013 Share Posted January 21, 2013 " how many bottles of coca cola you and your classmates need to buy ?" I need to buy 28 bottles. How much I pay for them is another question. There is no such thing as a free lunch. Spoken like a man who often drinks his lunch. Link to comment Share on other sites More sharing options...
John Cuthber Posted January 21, 2013 Share Posted January 21, 2013 I prefer Pepsi. Link to comment Share on other sites More sharing options...
Amaton Posted January 21, 2013 Share Posted January 21, 2013 yes, you are right, but most of people get answer : 19 bottles. 1. 3*9=27 2. of total 28 bottles, i can buy 9 packs of 3 bottles,buy 3 free 1, then receive free 9 bottles, hence 28-9=19. what's the trick ? why this is the wrong answer ? I follow you at "buy 9 packs of 3 bottles, and receive 9 free bottles". But I don't have a clue as to how you follow with "28 - 9 = 19". Start over -- You decide to buy 9 packs, receiving a free bottle for each pack. 27+9=36. You now have 36 bottles, which means you've gotten more than you should have. All you need is 7 packs of three plus the free 7 that go with them, and now you have your 28 bottles. You bought 7 packs, a total of 21 bottles. So the answer is, you bought 21 bottles of coca-cola. Right? Link to comment Share on other sites More sharing options...
fresh Posted January 22, 2013 Author Share Posted January 22, 2013 (edited) I follow you at "buy 9 packs of 3 bottles, and receive 9 free bottles". But I don't have a clue as to how you follow with "28 - 9 = 19". Start over -- You decide to buy 9 packs, receiving a free bottle for each pack. 27+9=36. You now have 36 bottles, which means you've gotten more than you should have. All you need is 7 packs of three plus the free 7 that go with them, and now you have your 28 bottles. You bought 7 packs, a total of 21 bottles. So the answer is, you bought 21 bottles of coca-cola. Right? yes you are right. i use equation to get the answer. assume I will get X free bottles, so 3*X+X=28 X=7 3*7=21 finally i will get 21 bottles + promotion of 7 bottles free lunch for total 28 classmates. but what if there is a total of 31 classmates with only 1 bottle of coca cola per person ? 3*X+X=31 X=7.75 ( 31 can't be divided exactly by 4.) the answer is you have to buy 24 bottles and get 8 free bottles, so (24+8=32) 32 bottles for 31 classmates. my Q is : anyone can give me a better equation for this Q ? thanks. Edited January 22, 2013 by fresh 1 Link to comment Share on other sites More sharing options...
LaurieAG Posted January 31, 2013 Share Posted January 31, 2013 (edited) The modulo operator can be used http://en.wikipedia.org/wiki/Modulo_operation a = Students n = Bottles per pack = (3 + 1) x = Total Bottles purchased a mod n = a - (n * INT(a/n)) = 0 if a is divisible by n or = the remainder if otherwise. But there are much easier ways to skin this cat. So x = INT(0.5 + (a/n)) * n is simpler if the INT(number) function rounds up if the decimal part is > 0.5. and x = ROUND(0.5 + (a/n), 0) * n can be used, ROUND(number, decimals), if INT() doesn't round up > 0.5. ROUND(0.5 + 27/4,0) * 4 = 7 * 4 = 28 ROUND(0.5 + 31/4,0) * 4 = 8 * 4 = 32 Edited January 31, 2013 by LaurieAG Link to comment Share on other sites More sharing options...
fresh Posted February 4, 2013 Author Share Posted February 4, 2013 The modulo operator can be used http://en.wikipedia.org/wiki/Modulo_operation a = Students n = Bottles per pack = (3 + 1) x = Total Bottles purchased a mod n = a - (n * INT(a/n)) = 0 if a is divisible by n or = the remainder if otherwise. But there are much easier ways to skin this cat. So x = INT(0.5 + (a/n)) * n is simpler if the INT(number) function rounds up if the decimal part is > 0.5. and x = ROUND(0.5 + (a/n), 0) * n can be used, ROUND(number, decimals), if INT() doesn't round up > 0.5. ROUND(0.5 + 27/4,0) * 4 = 7 * 4 = 28 ROUND(0.5 + 31/4,0) * 4 = 8 * 4 = 32 thanks for your answer, but can i correct you a bit ? quote: (x = INT(0.5 + (a/n)) * n is simpler if the INT(number) function rounds up if the decimal part is > 0.5.) when a=31students, here we go: x = INT(0.5 + (31/4)) * 4 = INT(0.5+7.75) * 4= INT(8.25) * 4= 8*4=32. quote: (x = ROUND(0.5 + (a/n) * n can be used, ROUND(number, decimals), if INT() doesn't round up > 0.5.) when a = 28 students, here we go: x = ROUND({0.5 + (28/4),0 })* 4=ROUND (0.5+7) *4= 8*4=32 ---> ( sorry, i dont get it by using your theory.) note: ROUND(7.5,0)= 8. if the decimal part is < 0.5, you still need add 0.5 to it ? i dont get it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now