Skip to content

Instantly share code, notes, and snippets.

@surinoel
Last active July 6, 2019 15:45
Show Gist options
  • Save surinoel/0017a3707b95d5be9a0e0fde597dd502 to your computer and use it in GitHub Desktop.
Save surinoel/0017a3707b95d5be9a0e0fde597dd502 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
long long a, b, c;
cin >> a >> b >> c;
if (c - b <= 0) {
cout << -1 << '\n';
}
else {
cout << a / (c - b) + 1 << '\n';
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment