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