본문 바로가기
알고리즘 & 자료구조/백준

백준 1712

by 신재권 2021. 7. 19.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main1712 {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String S = bf.readLine();
		StringTokenizer st = new StringTokenizer(S, " ");

		int A = Integer.parseInt(st.nextToken());
		int B = Integer.parseInt(st.nextToken());
		int C = Integer.parseInt(st.nextToken());

		if (C <= B)
			System.out.println("-1");
		else
			System.out.println((A / (C - B)) + 1);

	}

}

'알고리즘 & 자료구조 > 백준' 카테고리의 다른 글

백준 1193  (0) 2021.07.19
백준 2292  (0) 2021.07.19
백준 1316  (0) 2021.07.17
백준 2941  (0) 2021.07.16
백준 5622  (0) 2021.07.16