HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


51040 - Annual profit

Guest
• Review clarifications (1)

Volume problems

• 50885 - Calculate the Average
• 50887 - Average of Test Scores
• 50895 - Hours Minutes and Seconds
• 50902 - Translate Score into Grade
• 50890 - Convert Celsius to Fahrenheit
• 50889 - Convert to Minutes and Sec...
• 50900 - Put the Numbers in Descend...
• 50884 - Area and Perimeter Of The ...
• 51040 - Annual profit
• 51038 - Simple interest
• 51041 - Plane Segmentation
• 51039 - Automated billing system
• El Clasico
• 51007 - Function f(x)
• 50481 - Car Parking
• 50480 - What quadrant is it?
• 50482 - Bank Charges

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
bfs.

Annual profit

Question: 

Mr. Latif has two factories for producing two different electronic devices and he wants to calculate the total profit of two factories in the end of the year. Where each factory has different profit per year.

  • First Factory produced Q1 PC’s during the year. The price per each unit of PC is $P1, while the variable cost per each unit is $v1, and Fixed Costs are $FC1;
  • Second Factory produced Q2 Monitor’s during the year. The price per each unit of Monitor is $P2, while the variable cost per each unit is  $v2, and Fixed Costs are $FC2;

A profit for a company (one factory) is calculating using this formula:

Profit   = Total Revenue – Total Costs

            = Total Revenue – (Variable Cost +Fixed Costs)

Profit   = P*Q – (v*Q + FC)

Where:

  • P: is price per each unit,
  • Q: is quantity (number of products)
  • v: is variable cost per each unit
  • FC: is Fixed Costs

What is the total profit of the two factories?

 

Input Specifications: You will be given four inputs P, Q, v, FC for each factory. Where 50.00<=P<=300.00, 100<=Q<=50000, 20.00<=v<=1500.00, 3000.00=< FC<= 50000.00 

Output Specifications: Show the total profit of the two factories

 

Sample Input I
50 100 20 3000
1400 7840 860 17548
Sample Input II
50.50 105 21.52 3256.43
3000.00 50000 1500.00 500000.00
Sample Output I
4216052.00
Sample Output II
74499786.47

 

 Sample Input I Explanation: 

First factory profit =  P1*Q1 – (v1*Q1 + FC1) = 50*100-(20*100+3000)=0

Second factory profit =  P2*Q2 – (v2*Q2 + FC2) = 1400*7540-(860*17840+17548)= 4216052.00

Annual Profit = First factory profit+ second factory profitt=4216052.00

 
 
Для отправки решений необходимо выполнить вход.

www.contester.ru