728x90
using System;
class Program
{
static void Main(string[] args)
{
string[] arr = Console.ReadLine().Split();
int A = int.Parse(arr[0]);
int B = int.Parse(arr[1]);
int C = int.Parse(arr[2]);
int x = 1;
if (B >= C)
Console.WriteLine(-1);
else
{
Console.WriteLine(A / (C - B) + 1);
}
}
}
손익분기점이 존재하지 않는 부분은 가변비용(B)이 판매비용(C)와 같거나 높은 경우다.
판매비용(x)를 구하는 단순한 식을 통해 x를 구하고 출력한다.
728x90
'언어 > C#' 카테고리의 다른 글
[C#] 백준 2839번 (0) | 2023.01.12 |
---|---|
[C#] 백준 2292번 (0) | 2023.01.10 |
[C#] StringBuilder란 (0) | 2023.01.06 |
[C#] 구조체(struct)란? (0) | 2022.08.29 |
[C#] 델리게이트 체인(delegate chain) 단순한 예제 (0) | 2022.06.17 |