728x90
package BAEKJOON;
import java.util.Scanner;
public class NO1712 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int answer = 0;
if (B > C) {
answer = -1;
} else {
answer = A / (C - B) + 1;
}
System.out.println(answer);
}
}
728x90
'Algorithm & SQL > BAEKJOON' 카테고리의 다른 글
백준 JAVA 5622 다이얼 (0) | 2022.06.30 |
---|---|
백준 JAVA 2292 벌집 (0) | 2022.06.30 |
백준 JAVA 2750 수 정렬하기 (0) | 2022.06.29 |
백준 JAVA 10039 평균 점수 (0) | 2022.06.29 |
백준 JAVA 2439 별 찍기 -2 (0) | 2022.06.29 |
댓글