Jam's story

[1712번] 손익분기점 본문

코딩테스트/백준

[1712번] 손익분기점

애플쩀 2022. 5. 26. 08:30
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
 
 
		int a = in.nextInt();
		int b = in.nextInt();
		int c = in.nextInt();
        
		if (c <= b) {
			System.out.println("-1");
		} 
		else {
			System.out.println((a/(c-b))+1);
		}
	}
}
Comments