fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);
  7. int a, b, k;
  8. cin >> a >> b >> k;
  9. cout << ((b - a) / k) + 1;
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5320KB
stdin
0 20 10
stdout
3