ABC048B - Between a and b ...
#include <iostream> using namespace std; int main(void) { long long a, b, x, ans; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> x; if (a == 0) { ans = b / x + 1; } else { ans = b / x - (a - 1) / x; } cout << ans << "\n"; return 0; }