Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Chefland has 2 different types of coconut, type A and type B. Type A contains only xa milliliters of coconut water and type B contains

Chefland has 2 different types of coconut, type A and type B. Type A contains only xa milliliters of coconut water and type B contains only xb grams of coconut pulp. Chef's nutritionist has advised him to consume Xa milliliters of coconut water and Xb grams of coconut pulp every week in the summer. Find the total number of coconuts (type A + type B) that Chef should buy each week to keep himself active in the hot weather.

Input

The first line contains an integer T, the number of test cases. Then the test cases follow.
Each test case contains a single line of input, four integers xa, xb, Xa, Xb.

Sample Input 3 100 400 1000 1200 100 450 1000 1350 150 400 1200 1200 Sample Output 13 13 11 Explanation 1000 - 100 TestCase 1: Number of coconuts of Type A required: coconuts of Type B required = 1200 = 3. So the total number of coconuts required is 10+ 3 = 13. 400 TestCase 2: Number of coconuts of Type A required coconuts of Type B required 1350 450 required is 10+ 3 = 13. 1000 100 3. So the total number of coconuts 1200 400 = 10 and number of = = 10 and number of 1200 8 and number of TestCase 3: Number of coconuts of Type A required 150 coconuts of Type B required= = 3. So the total number of coconuts required is 8 +3 = 11.

Step by Step Solution

3.43 Rating (162 Votes )

There are 3 Steps involved in it

Step: 1

For each test case we need to calculate the number of coconuts of type A and type B requi... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microeconomics An Intuitive Approach with Calculus

Authors: Thomas Nechyba

1st edition

538453257, 978-0538453257

More Books

Students also viewed these Programming questions

Question

Describe four technical features of Darwins theory of evolution.

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago