백준 1712 c++

magicdrill·2024년 2월 29일

백준 문제풀이

목록 보기
63/673

백준 1712 c++

#include <iostream>

using namespace std;

int main(void)
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int A, B, C;
	int ans;

	cin >> A >> B >> C;
	if ((C - B) <= 0)
	{
		ans = -1;
	}
	else
	{
		ans = A / (C - B) + 1;
	}
	cout << ans << "\n";

	return 0;
}

0개의 댓글