Submission #3606534


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
 
	ll a, b, x;
	cin >> a >> b >> x;
 
	cout << b/x+1-(a>0?(a-1)/x+1:0) << endl;
	return 0;
}

Submission Info

Submission Time
Task B - Between a and b ...
User higiri_27
Language C++14 (GCC 5.4.1)
Score 0
Code Size 204 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:7:2: error: ‘ll’ was not declared in this scope
  ll a, b, x;
  ^
./Main.cpp:8:9: error: ‘a’ was not declared in this scope
  cin >> a >> b >> x;
         ^
./Main.cpp:8:14: error: ‘b’ was not declared in this scope
  cin >> a >> b >> x;
              ^
./Main.cpp:8:19: error: ‘x’ was not declared in this scope
  cin >> a >> b >> x;
                   ^