fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cin.tie(0);
  6. ios::sync_with_stdio(false);
  7.  
  8. int h, a, b;
  9.  
  10. cin >> h >> a >> b;
  11.  
  12. if (h <= a) cout << 1;
  13. else {
  14. cout << (h - a + (a - b) - 1) / (a - b);
  15.  
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5288KB
stdin
10 3 2
stdout
7