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

백준 2869

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

public class Main2869 {

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

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

		int cnt = (V - B) / (A - B);

		if ((V - B) % (A - B) != 0)
			cnt++;

		System.out.println(cnt);

	}

}

 

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

백준 2750  (0) 2021.07.28
백준 10250  (0) 2021.07.22
백준 1193  (0) 2021.07.19
백준 2292  (0) 2021.07.19
백준 1712  (0) 2021.07.19