Anyone up for a money riddle?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Kev

Lifer
Dec 17, 2001
16,367
4
81
Originally posted by: mjuszczak
mj$ sh blah.sh | grep 1040 | grep 53
Total with 34 quarters AND 19 dimes WITH 53 total coins: 1040
mj$

There is only one answer

Here is the shell script:

#!/bin/sh

QUARTERS=0
DIMES=0

while [ "$QUARTERS" -lt "100" ]
do
DIMES=0
QUARTERS=`expr $QUARTERS + 1`
while [ "$DIMES" -lt "100" ]
do
DIMES=`expr $DIMES + 1`;
TOTAL_DIMES=`expr $DIMES \* 10`
TOTAL_QUARTERS=`expr $QUARTERS \* 25`
TOTAL=`expr $TOTAL_DIMES + $TOTAL_QUARTERS`
TOTALCOINS=`expr $QUARTERS + $DIMES`
echo "Total with $QUARTERS quarters AND $DIMES dimes WITH $TOTALCOINS total coins:$TOTAL"
done
done

you were one of those guys in my programming class that had 30 pages of code when i thought i forgot part of the assignment cause mine was only 10
 

dullard

Elite Member
May 21, 2001
26,074
4,725
126
First correct coin answer:
Originally posted by: jimbob200521
There were 53 coins in the jar, all dimes and quators and it added up to $10.40... How many of each coins are there?
There WERE 34 quarters and 19 dimes. But after the whole world saw this post about all this money, there are no longer ANY coins left. I think someone was feeding them to the flamingos. Thus, to answer how many coins are there, the answer is 0.

 

ABitTooSpicy

Senior member
Jun 30, 2004
922
0
76
x + y = 30
4x + 2y = 94
2x + 2y = 60
2x = 34
x = 17
horses = 17
flamingos = 13

-----------------

x + y = 53
10x + 25y = 1040
10x + 10y = 530
15y = 510
y = 34
34 quarters
19 dimes

edit: forgot to mention... Notepad rox your socks...
 

krotchy

Golden Member
Mar 29, 2006
1,942
0
76
Originally posted by: dullard
First correct coin answer:
Originally posted by: jimbob200521
There were 53 coins in the jar, all dimes and quators and it added up to $10.40... How many of each coins are there?
There WERE 34 quarters and 19 dimes. But after the whole world saw this post about all this money, there are no longer ANY coins left. I think someone was feeding them to the flamingos. Thus, to answer how many coins are there, the answer is 0.

considering the op didn't even spell quarter correctly, and "are there" can be taken 10 different ways in the context of the sentence, then technically there are 2 correct answers, based on n00by typing skills
 

KK

Lifer
Jan 2, 2001
15,903
4
81
Originally posted by: krotchy
Same for horse, flamingo (horse = 4, flamingo =2 I assume, since flamingo could be on 1 leg if it wanted)

30 horses = 120 legs - 94 = 26/2 = 13 flamingos

so 13 flamingo, 17 horses...

I went the other way with this one, 60 feet with 30 flamingos. need 34 more feet so that'd be 17 horses and 13 flamingos.
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Originally posted by: dullard
But after the whole world saw this post about all this money, there are no longer ANY coins left. I think someone was feeding them to the flamingos. Thus, to answer how many coins are there, the answer is 0.

Also, if you change it to:

There were 53 coins in the jar, all dimes and quators and it added up to $10.40... How many of each coins were there?

Impossible to know, because the monetary value of a "quator" is unknown, although for the $10.40 sum to be possible then it must be at least ~$0.19. Furthermore, if "quator" is a foreign currencty, between the time asked and the time any answer is posted, it could change due to currency conversion rates.

Also, the heads and legs is totally impossible because you don't know if there are other animals/beings/porta-pottys/uneaten picnic chicken legs.
 

dullard

Elite Member
May 21, 2001
26,074
4,725
126
Originally posted by: torpid
Also, the heads and legs is totally impossible because you don't know if there are other animals/beings/porta-pottys/uneaten picnic chicken legs.
I was trying to get at that with an earlier post. But I certainly didn't properly think out the uneaten chicken leg aspect. I bow down to my new master, Torpid.
 

markgm

Diamond Member
Aug 23, 2001
3,291
2
81
x+y=53
.10x+.25y=10.40

.10(53-y)+.25y=10.40
5.30-.10y+.25y=10.40
.15y=5.10
y=34

x+34=53
x=19




x+y=30
4x+2y=94

4(30-y)+2y=94
120-4y+2y=94
-2y=-26
y=13

x+13=30
x=17


I too used Notepad.

I miss Algebra.
 

sdifox

No Lifer
Sep 30, 2005
100,520
17,965
126
x+y=53
10x+25y=1040

x=53-Y

10(53-y)+25y=1040
530-10y+25Y=1040
15Y=510
Y=34
X=19

Test
10*19+34*25=1040
190+850=1040

2nd one, well same thing. I always remembered that problem as "Chicken and Rabbit in the Same Cage"...
 

sdifox

No Lifer
Sep 30, 2005
100,520
17,965
126
Originally posted by: SilthDraeth
Don't flamingos bury their heads in the sand anyways?

Not exactly. Flamingos pick food off the riverbed with their beak. Ostridge is what you are thinking about.
 

Demon-Xanth

Lifer
Feb 15, 2000
20,551
2
81
Answer #1:
Zero, the mechanic that took the change out of my change holder stole your change too.

Answer #2:
Does it matter? It must be a horrific blood bath given the fact that all there is left are heads and legs. I would say that the horses probably won the battle after taking heavy losses to the flamingo horde.
 

Alone

Diamond Member
Nov 19, 2006
7,490
0
0
Originally posted by: sdifox
Originally posted by: SilthDraeth
Don't flamingos bury their heads in the sand anyways?

Not exactly. Flamingos pick food off the riverbed with their beak. Ostridge is what you are thinking about.

Ostrich is what you're thinking about.
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Originally posted by: Alone
Originally posted by: sdifox
Originally posted by: SilthDraeth
Don't flamingos bury their heads in the sand anyways?

Not exactly. Flamingos pick food off the riverbed with their beak. Ostridge is what you are thinking about.

Ostrich is what you're thinking about.

Mmm.... ostrich. *blaargghalll* <-- Homer Simpson drool noise.
 

sdifox

No Lifer
Sep 30, 2005
100,520
17,965
126
Originally posted by: Alone
Originally posted by: sdifox
Originally posted by: SilthDraeth
Don't flamingos bury their heads in the sand anyways?

Not exactly. Flamingos pick food off the riverbed with their beak. Ostridge is what you are thinking about.

Ostrich is what you're thinking about.

Typo for the lose :(.
 

jman19

Lifer
Nov 3, 2000
11,225
664
126
Originally posted by: aleckz
Originally posted by: mjuszczak
mj$ sh blah.sh | grep 1040
Total with 2 quarters AND 99 dimes: 1040
Total with 4 quarters AND 94 dimes: 1040
Total with 6 quarters AND 89 dimes: 1040
Total with 8 quarters AND 84 dimes: 1040
Total with 10 quarters AND 79 dimes: 1040
Total with 12 quarters AND 74 dimes: 1040
Total with 14 quarters AND 69 dimes: 1040
Total with 16 quarters AND 64 dimes: 1040
Total with 18 quarters AND 59 dimes: 1040
Total with 20 quarters AND 54 dimes: 1040
Total with 22 quarters AND 49 dimes: 1040
Total with 24 quarters AND 44 dimes: 1040
Total with 26 quarters AND 39 dimes: 1040
Total with 28 quarters AND 34 dimes: 1040
Total with 30 quarters AND 29 dimes: 1040
Total with 32 quarters AND 24 dimes: 1040
Total with 34 quarters AND 19 dimes: 1040
Total with 36 quarters AND 14 dimes: 1040
Total with 38 quarters AND 9 dimes: 1040
Total with 40 quarters AND 4 dimes: 1040

I think everyone just got raped by this script.

Brute forcing an answer = everyone got raped? Not quite. Anyone can enumerate possibilities until they find the right answer.