fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define int long long int
  4.  
  5.  
  6. signed main()
  7. {
  8.  
  9.  
  10.  
  11. int x, y, cnt = 0, m, c = 0;
  12.  
  13.  
  14. cin >> x >> y;
  15. if (y <= x)
  16. {
  17. cout << 1 << endl;
  18. return 0;
  19. }
  20. c = 1;
  21. cnt = x;
  22. while (1)
  23. {
  24. if (y <= cnt)
  25. {
  26. cout << c << endl;
  27. return 0;
  28. }
  29. cnt--;
  30. cnt += x;
  31. c++;
  32. }
  33.  
  34. }
Success #stdin #stdout 0s 5644KB
stdin
 4 10
stdout
3