fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long int a,b,x,k;
  6. cin >> a >> b >> x;
  7. k =b/x - a/x;
  8. if (!(a%x)) k++;
  9. cout << k;
  10. return 0;
  11. }
Success #stdin #stdout 0s 15232KB
stdin
3 2 5
stdout
Standard output is empty