cow=1 bull=19 goat=80. You can solve with with the help of x+y+z=100 x+5y+z/20=100 replace x=100-y-z in eq 2. you will get y/z=19/80. i.e. ratio of bull and goad should be 19:80. hence you can keep bull=19 and goat =80 remaining 1 will be cow.
Er. Sudhir Yadav Sasken Communication Technologies Bangalore-47 On Fri, Aug 10, 2012 at 3:11 PM, Paul Smith <[email protected]> wrote: > b = number of bulls bought > c = number of cows bought > g = number of batches of 20 goats bought > > So you need to spend your $100? => c + 5b + g = 100 > You need to have 100 animals? => c + b + 20g = 100 > You need at least 1 of each animal? => c > 0, b > 0, g > 0 > > Looks like a simplex problem to me? > > Paul Smith > > [email protected] > > > On Fri, Aug 10, 2012 at 7:44 AM, Bonethug <[email protected]> wrote: > > 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > 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. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
