Hi!
x-number of cows, y - bulls, z - 20 goats.
Build two equations:
x+5y+z=100 (1)
x+y+20x=100 (2)

(1)-(2) => 4y-19z = 0; y = 19; z = 4; Then x = 1;

2012/8/10 Bonethug <tejeshwa...@gmail.com>:
> You have $100. You need to buy cows, bulls and goats which sell at the
> following rate.
> $1 = 1 Cow
> $5 = 1 Bull
> $1 = 20 Goats
> How will you purchase these animals so that you spend your $100 and you have
> 100 animals which includes the cows, bulls and goats.
> A pretty tough question for more google code community, I need help,
> Thanks and Regards,
> Bonethug
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to google-code@googlegroups.com.
> To unsubscribe from this group, send email to
> google-code+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-code/-/Gg_LTqD8YdEJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
C уважением, Калинина Настя.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To post to this group, send email to google-code@googlegroups.com.
To unsubscribe from this group, send email to 
google-code+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to