HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > CEN109/111_2016_Questions > problem:


PE09. 51040 - Annual profit

CEN109/111_2016_Questions

Start: Dec.07.2016 at 12:37:00 PM
Finish: Dec.07.2016 at 01:42:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• PE01. 51027 - Download Percentage
• PE02. 51028 - Isosceles Triangles
• PE03. 51029 - Buy Three Items
• PE04. 51030 - Number of Right Tria...
• PE05. 51031 - Convert from Hex to...
• PE06. 51032 - Triangle Property
• PE07. 51033 - Sum of the series
• PE08. 51034 - Area of 3 Shapes
• PE09. 51040 - Annual profit
• PE10. 51041 - Plane Segmentation
• PE11. 51038 - Simple interest
• PE12. 51039 - Automated billing system
• RE1. 51077 - Grades Histogram
• RE2. 51078 - Max trade
• hw3. 51057 - Number of students
• hw4. 51058 - Third grade students
• hw5. 51059 - Football teams

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