손익분기점
2023. 1. 29. 17:29ㆍ개인공부/코딩테스트
1712번: 손익분기점
월드전자는 노트북을 제조하고 판매하는 회사이다. 노트북 판매 대수에 상관없이 매년 임대료, 재산세, 보험료, 급여 등 A만원의 고정 비용이 들며, 한 대의 노트북을 생산하는 데에는 재료비와
www.acmicpc.net
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <iostream>
using namespace std;
int main()
{
int FixedCost = 0;
int VariableCost = 0;
int NotebookCost = 0;
int Ans = 0;
cin >> FixedCost >> VariableCost >> NotebookCost;
if (VariableCost >= NotebookCost)
{
cout << -1;
}
else
{
Ans = FixedCost / (NotebookCost - VariableCost);
cout << Ans+1;
}
return 0;
}
|
cs |