Tummy ache!
#984705
10/22/14 12:54 AM
10/22/14 12:54 AM
|
Joined: Nov 2000
Posts: 18,719 Ottawa Ontario Canada
CanukDenis
OP
Graduate Boomer
|
OP
Graduate Boomer
Joined: Nov 2000
Posts: 18,719
Ottawa Ontario Canada
|
You buy 9999 candies individually wrapped. For each 5 wrappers, you can get another candy (candy store special!). What is maximum number of candies that you can eat? How many wrappers will you have left (less than 5 of course)?
I'm a man of few words, BUT I use 'em often!!
|
|
|
Re: Tummy ache!
[Re: CanukDenis]
#984731
10/22/14 06:44 AM
10/22/14 06:44 AM
|
Joined: Oct 2011
Posts: 3,440 47.79N, 122.24W
BobH
Addicted Boomer
|
Addicted Boomer
Joined: Oct 2011
Posts: 3,440
47.79N, 122.24W
|
10,248 candies eaten with 3 wrappers left. Oops, one fifth of 10,000 is not 200.
Last edited by BobH; 10/22/14 08:53 AM. Reason: mea culpa
Bob As I've grown older, I've found that my memory is not as good as I used to think it was.
|
|
|
Re: Tummy ache!
[Re: CanukDenis]
#984741
10/22/14 07:46 AM
10/22/14 07:46 AM
|
Joined: Apr 2006
Posts: 4,944 Nova Scotia
Flo NS
Addicted Boomer
|
Addicted Boomer
Joined: Apr 2006
Posts: 4,944
Nova Scotia
|
12,494 - 1 wrapper left.
missed an addition of 3
new number 12,497 with 1 wrapper left.
Last edited by Flo NS; 10/22/14 08:25 AM.
|
|
|
Re: Tummy ache!
[Re: CanukDenis]
#984778
10/22/14 10:27 AM
10/22/14 10:27 AM
|
Joined: Nov 2000
Posts: 18,719 Ottawa Ontario Canada
CanukDenis
OP
Graduate Boomer
|
OP
Graduate Boomer
Joined: Nov 2000
Posts: 18,719
Ottawa Ontario Canada
|
Thanks all; I get 12,498 (same as CCbomber) but with 2 left over. My method (r = remainder):
9999 / 5 = 1999 r4
(1999+4) / 5 = 400 r3
(400+3) / 5 = 80 r3
(80+3) / 5 = 16 r3
(16+3) / 5 = 3 r4
(3+4) / 5 = 1 r2***
9999 + 1999 + 400 + 80 + 16 + 3 + 1 = 12,498 *** leftover wrappers. Where am I missing a leftover wrapper?
I'm a man of few words, BUT I use 'em often!!
|
|
|
Re: Tummy ache!
[Re: CanukDenis]
#984835
10/22/14 01:56 PM
10/22/14 01:56 PM
|
Joined: Nov 2004
Posts: 21,887 Bucks, England
Urban Worrier
True Blue Boomer
|
True Blue Boomer
Joined: Nov 2004
Posts: 21,887
Bucks, England
|
Rats! Mrs Worrier agrees with you, CCb Surprising how a seemingly easy problem can cause so much grief...
To waste one second of one's life is a betrayal of one's self. I wonder what's on television...?
|
|
|
Re: Tummy ache!
[Re: CanukDenis]
#984856
10/22/14 03:04 PM
10/22/14 03:04 PM
|
Joined: Nov 2000
Posts: 18,719 Ottawa Ontario Canada
CanukDenis
OP
Graduate Boomer
|
OP
Graduate Boomer
Joined: Nov 2000
Posts: 18,719
Ottawa Ontario Canada
|
Ahhh... thanks CCB...made me laugh; that's quite shrewd !!
I had written a short looper/recursive program to handle any given case...forgot to convert last candy/candies to wrappers at the last step...
I'm a man of few words, BUT I use 'em often!!
|
|
|
Re: Tummy ache!
[Re: CanukDenis]
#984884
10/22/14 04:48 PM
10/22/14 04:48 PM
|
Joined: Oct 2011
Posts: 3,440 47.79N, 122.24W
BobH
Addicted Boomer
|
Addicted Boomer
Joined: Oct 2011
Posts: 3,440
47.79N, 122.24W
|
Ahhh... thanks CCB...made me laugh; that's quite shrewd !!
I had written a short looper/recursive program to handle any given case...forgot to convert last candy/candies to wrappers at the last step... I did think of that and was quite proud of myself. Now I just have to graduate to being able to divide four-digit numbers.
Bob As I've grown older, I've found that my memory is not as good as I used to think it was.
|
|
|
|
|