fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main ()
  5. {
  6. long A, B, V;
  7. cin>>A>>B>>V;
  8. if (A==V) cout<<"1";
  9. else
  10. {
  11. if ((V-B)%(A-B)==0) cout<<(V-B)/(A-B);
  12. else cout<<(V-B)/(A-B)+1;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 4412KB
stdin
100 99 1000000000
stdout
999999901