fork download
  1. #include <iostream>
  2.  
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. double a, b, h, day;
  8.  
  9. int main() {
  10.  
  11. cin >> a >> b >> h;
  12.  
  13. day = ceil((h - a) / (a - b)) + 1;
  14.  
  15. cout << day;
  16.  
  17. }
Success #stdin #stdout 0s 4520KB
stdin
2 1 1000000000
stdout
1e+09