Jump to content

buy 3 free 1 (what is your answer?)


fresh

Recommended Posts

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 by fresh
Link to comment
Share on other sites

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

 

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

 

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 by fresh
Link to comment
Share on other sites

  • 2 weeks later...

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 by LaurieAG
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.