submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s263814709 | p03861 | C++ | #include<stdio.h>
int main()
{
int a,b,x,i;
scanf("%d%d%d",&a,&b,&x);
for(int i=a;i<=b,i++);
{
if(i%x==0);
printf("%d\n",i);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before ')' token
6 | for(int i=a;i<=b,i++);
| ^
| ;
|
s493987122 | p03861 | C++ | #include<stdio.h>
int main()
{
int a,b,x;
scanf("%d%d%d",&a,&b,&x);
for(int i=a;i<=b,i++);
{
if(i%x==0);
printf("%d\n",i);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before ')' token
6 | for(int i=a;i<=b,i++);
| ^
| ;
a.cc:8:8: error: 'i' was not declared in this scope
8 | if(i%x==0);
| ^
a.cc:9:19: error: 'i' was not declared in th... |
s545485889 | p03861 | C | #include<stdio.h>
long long a,b,x,ans;
long long na,nb;
int main{
scanf("%lld %lld %lld",&a,&b,&x);
if(a>0)a--;
na=(a-a%x)/x;nb=(b-b%x)/x;
ans=nb-na;
printf("%lld\n",ans);
}
| main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
4 | int main{
| ^
|
s978004297 | p03861 | C | #include<stdio.h>
int a,b,x,ans;
int main(){
scanf("%d %d %d",&a,&b,&x);
if(a>b)
int c=a,a=b,b=c;
for(int i=a;i<=b;i++){
if(i%x==0)
ans++;
}
printf("%d",ans);
}
| main.c: In function 'main':
main.c:6:17: error: expected expression before 'int'
6 | int c=a,a=b,b=c;
| ^~~
|
s606479508 | p03861 | C | #include<stdio.h>
int a,b,x,ans;
int main(){
scanf("%d %d %d",&a,&b,&x);
if(a>b)
long c=a,a=b,b=c;
for(int i=a;i<=b;i++){
if(i%x==0)
ans++;
}
printf("%d",ans);
}
| main.c: In function 'main':
main.c:6:17: error: expected expression before 'long'
6 | long c=a,a=b,b=c;
| ^~~~
|
s184043406 | p03861 | C | #include<stdio.h>
long a,b,x,ans;
int main(){
scanf("%d %d %d",&a,&b,&x);
if(a>b)
long c=a,a=b,b=c;
for(int i=a;i<=b;i++){
if(i%x==0)
ans++;
}
printf("%d",ans);
}
| main.c: In function 'main':
main.c:6:17: error: expected expression before 'long'
6 | long c=a,a=b,b=c;
| ^~~~
|
s464922164 | p03861 | C | #include<stdio.h>
long a,b,x,ans;
int main(){
scanf("%d %d %d",&a,&b,&x);
if(a>b)
long c=a,a=b,b=c;
for(int i=a;i<=b;i++){
if(i%x==0)
ans++;
}
printf("%d",ans)ii;
}
| main.c: In function 'main':
main.c:6:17: error: expected expression before 'long'
6 | long c=a,a=b,b=c;
| ^~~~
main.c:11:25: error: expected ';' before 'ii'
11 | printf("%d",ans)ii;
| ^~
| ;
|
s780202379 | p03861 | C++ | #include<iostream>
using namespace std;
int main()
{
long a,b,x;cin>>a>>b>>x;
cout<<b/x-a/x+!(a%x&&b%x)+a==0<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout<<b/x-a/x+!(a%x&&b%x)+a==0<<endl;
| ~^~~~~~
|
s223698294 | p03861 | C++ | #include<bits/stdc++.h>
int main()
{
long long a,b,c,x,sum;
cin>>a>>b>>x;
if(a%x==0) sum=a/x;
else sum=a/x+1;
c=b/x;
cout<<c-sum+1<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>a>>b>>x;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: n... |
s792923711 | p03861 | C++ | #include <bits/stdc++.h >
using namespace std;
int main(){
long long a,b,x,c,d;
cin>>a>>b;
if(a%x>0){ c=(a/x+1)*x;}
else{c=a;}
if(b%x>0){ d=(b/x-1)*x;}
else{d=b;}
cout<<(d-c)/x+1<<endl;
return 0;
} | a.cc:1:10: fatal error: bits/stdc++.h : No such file or directory
1 | #include <bits/stdc++.h >
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s358183504 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b){
cout<<0<<endl;
}
else{
cout<<1+(a/c)-(b/c)<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s860003634 | p03861 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) pu... | a.cc: In function 'long long int f(long long int, long long int)':
a.cc:21:6: error: 'b' was not declared in this scope
21 | if(b==-1) return 0;
| ^
a.cc:22:10: error: 'b' was not declared in this scope
22 | return b/x + 1;
| ^
|
s837494152 | p03861 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
long long a,b,x;
cin >> a >> b >> x;
cout << b/x - max(0,(a-1))/x << endl;
}
| a.cc: In function 'int main()':
a.cc:10:20: error: no matching function for call to 'max(int, long long int)'
10 | cout << b/x - max(0,(a-1))/x << endl;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s703606136 | p03861 | C++ | #include <iostream>
int main() {
int a, b, x;
std::cin >> a >> b >> x;
if ( a == 0 ) std::cout << b / x + 1 << std::endl;
else if ( b == 0 ) std::cout << 1 << std::endl;
else std::cout << b / x - (a - 1) std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:36: error: expected ';' before 'std'
9 | else std::cout << b / x - (a - 1) std::endl;
| ^~~~
| ;
|
s706510791 | p03861 | C++ | #include<iostream>
#include<climits>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<stdio.h>
#include <string>
#include <complex>
#include <functional>
using namespace std;
typedef pair<int,int> P;
double dat[100][100];
int dp[6][1010];//動的計画法
int prime[10000001];
char str[1010][1010];
... | a.cc: In function 'int main()':
a.cc:23:20: error: expected primary-expression before '<' token
23 | cout<<ans<<<endl;
| ^
|
s430067833 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
#define INF 1<<30
#define LINF 1ll<<60ll
#define MOD 1000000007
#define pb(a) push_back(a)
#defi... | a.cc: In function 'int main()':
a.cc:49:12: error: too few arguments to function 'll f(ll, ll)'
49 | cout<<f(b)-f(a-1)<<endl;
| ~^~~
a.cc:41:11: note: declared here
41 | inline ll f(ll a,ll x){
| ^
a.cc:49:17: error: too few arguments to function 'll f(ll, ll)'
49 | cout... |
s886145733 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
#define INF 1<<30
#define LINF 1ll<<60ll
#define MOD 1000000007
#define pb(a) push_back(a)
#defi... | a.cc: In function 'll f(ll, ll)':
a.cc:43:17: error: expected ';' before '}' token
43 | return a/x+1
| ^
| ;
44 | }
| ~
a.cc: In function 'int main()':
a.cc:49:12: error: too few arguments to function 'll f(ll, ll)'
49 | cout<<f(b)-f(a-1... |
s003837052 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long A,B,X;
cin>>A>>B>>X;
cout<<B/X+1-(A?(A-1)/X+1+:0)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:30: error: expected primary-expression before ':' token
7 | cout<<B/X+1-(A?(A-1)/X+1+:0)<<endl;
| ^
|
s608670673 | p03861 | C++ | int main(){
long long A,B,X;
cin>>A>>B>>X;
cout<<B/(X+1)-(A-1?(A-1)/(X+1):0)<<endl;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin>>A>>B>>X;
| ^~~
a.cc:4:5: error: 'cout' was not declared in this scope
4 | cout<<B/(X+1)-(A-1?(A-1)/(X+1):0)<<endl;
| ^~~~
a.cc:4:40: error: 'endl' was not declared in this scope
4 | ... |
s865480346 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
long long int a,b,c;
cin>>a>>b>>c;
long long int ret =b/c;
long long int ret2 = max(0LL,a-1LL)/x;
if (a==0) {
ret++;
}
ret-=ret2;
cout<<ret<<endl;
return 0;
} | a.cc: In function 'int main(int, const char**)':
a.cc:8:41: error: 'x' was not declared in this scope
8 | long long int ret2 = max(0LL,a-1LL)/x;
| ^
|
s082120601 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,x;
cin>>a>>b>>x;
cout<<b/x-(a-1)/x
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before 'return'
7 | cout<<b/x-(a-1)/x
| ^
| ;
8 | return 0;
| ~~~~~~
|
s690213830 | p03861 | C++ | i#include <iostream>
#include <string>
#include <set>
#include <math.h>
using namespace std;
int main(int argc, const char * argv[]) {
int a, b, x;
int res = 0;
cin >> a >> b >>x;
for(int i = a; i <= b; i++){
if(i % x == 0){
res += 1;
}
}
cout << res << endl;
} | a.cc:1:2: error: stray '#' in program
1 | i#include <iostream>
| ^
a.cc:1:1: error: 'i' does not name a type
1 | i#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/... |
s108369351 | p03861 | C++ | a,b,x = map(int,input().split())
print(b/x-(a-1)/x) | a.cc:1:1: error: 'a' does not name a type
1 | a,b,x = map(int,input().split())
| ^
|
s647129846 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long a,b,c;
cin>>a>>b>>c;
if(a==0){
cout<<b/c<<endl;
}else{
cout<<-((a-1)/c)+b/c<<endl;
} | a.cc: In function 'int main()':
a.cc:11:4: error: expected '}' at end of input
11 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s138795084 | p03861 | C++ | a, b, x = map(int, input().split())
num = 0
for t in range(a, b + 1):
if t % x == 0:
num += 1
print(num) | a.cc:1:1: error: 'a' does not name a type
1 | a, b, x = map(int, input().split())
| ^
|
s746411861 | p03861 | C++ | #include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
cin>>a>>b>>c;
cout<<b/c-a/c+1;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'a' was not declared in this scope
9 | cin>>a>>b>>c;
| ^
a.cc:9:17: error: 'b' was not declared in this scope
9 | cin>>a>>b>>c;
| ^
a.cc:9:20: error: 'c' was not declared in this scope
9 | cin>... |
s080506786 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
unsigned long i=0,a,b,c;
cin>>a>>b>>c;
while(b+1-a){
i+=(a%c=0);
a++;
}
cout<<i<<endl;
} | a.cc: In function 'int main()':
a.cc:8:10: error: lvalue required as left operand of assignment
8 | i+=(a%c=0);
| ~^~
|
s855745625 | p03861 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long lng;
#define UP(i,a,b) for(int i=(a); i<=(b); ++i)
#define DOWN(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) UP(i,0,n-1)
#define ALL(a) (a).begin(), (a).end()
#define UNIQUE(a) a.erase(unique(ALL(a)), ... | a.cc: In function 'int main()':
a.cc:27:20: error: no matching function for call to 'max(lng, int)'
27 | cout << b/x-max(a-1,0)/x << endl;
| ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
f... |
s036879231 | p03861 | C++ | #include <bits/stdc++.h> using namespace std; int main() { long long int a, b, x; cin >> a >> b >> x; long long int m = b - a; long long int r1 = m % x; long long int r2 = (x - b % x) + (a % x); if(r1 >= r2 || b % x == 0 || a % x == 0){ cout << m / x + 1 << endl; } else{ cout << m / x << endl; } }
| a.cc:1:26: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h> using namespace std; int main() { long long int a, b, x; cin >> a >> b >> x; long long int m = b - a; long long int r1 = m % x; long long int r2 = (x - b % x) + (a % x); if(r1 >= r2 || b % x == 0 ... |
s274988002 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int a, b, x;
cin >> a >> b >> x;
if(b - a + 1 == x){
cout << m / x << endl;
return 0;
}
long long int m = b - a;
long long int r1 = m % x;
long long int r2 = (b % x) + (a % x);
if(r1 >= r2 || b % x == 0 || a % x == 0){
cout << m / x + 1... | a.cc: In function 'int main()':
a.cc:8:25: error: 'm' was not declared in this scope
8 | cout << m / x << endl;
| ^
|
s117394068 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b, x;
cin >> a >> b >> x;
if(a != 0){
long long S = b/x - (a-1)/x ;
cout << S << endl;}
else {long long S = b/x + 1 ;
cout << S << endl;} | a.cc: In function 'int main()':
a.cc:11:22: error: expected '}' at end of input
11 | cout << S << endl;}
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s370355114 | p03861 | C++ | #include <iostream>
using namespace std;
int main() {
long long int A, B, X; cin >> A >> B >> X;
cout << B/X - A/X + (A%X == 0) << endl;
reutrn 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'reutrn' was not declared in this scope
7 | reutrn 0;
| ^~~~~~
|
s280335764 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x,i,c=0;
for(i=a,i<=b;i++){
if(i%x==0){
c++;
}
}
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:25: error: expected ';' before ')' token
5 | for(i=a,i<=b;i++){
| ^
| ;
|
s988932638 | p03861 | C++ | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ll a,b,c,i,ans=0;
ios::sync_with_stdio(false);
cin>>a>>b>>c;
if(a!=0) ans+=b/c+(a-1)/c;
if(a==0) ans=b/x+1;
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:20: error: 'x' was not declared in this scope
10 | if(a==0) ans=b/x+1;
| ^
|
s436945283 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
unsigned int_64 a, b, x;
cin >> a >> b >> x;
unsigned int_64 num = 0;
for (unsigned int_64 i = a; i <= b; i++) {
if (i % x == 0)
num++;
}
cout << num << endl;
}
| a.cc: In function 'int main()':
a.cc:6:19: error: expected initializer before 'a'
6 | unsigned int_64 a, b, x;
| ^
a.cc:7:10: error: 'a' was not declared in this scope
7 | cin >> a >> b >> x;
| ^
a.cc:7:15: error: 'b' was not declared in this scope
7 | cin >> a >... |
s260170962 | p03861 | C++ | #include <iostream>
using namespace std;
int func(int n, int x)
{
if (n >= 0) {
return n/x + 1;
} else {
return 0;
}
}
int main()
{
int a, b, x;
cin >> a >> b >> x;
num = func(b, x) - func (a, x);
cout << num << endl;
}
| a.cc: In function 'int main()':
a.cc:17:3: error: 'num' was not declared in this scope; did you mean 'enum'?
17 | num = func(b, x) - func (a, x);
| ^~~
| enum
|
s882858191 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
double a, b, x;
cin >> a >> b >> x;
double num = 0;
for (int i = a; i <= b; i++) {
if (i % x == 0)
num++;
}
cout << num << endl;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: invalid operands of types 'int' and 'double' to binary 'operator%'
10 | if (i % x == 0)
| ~ ^ ~
| | |
| int double
|
s257538047 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
double a, b, x;
cin >> a >> b >> x;
double num = 0;
for (double i = a; i <= b; i++) {
if (i % x == 0)
num++;
}
cout << num << endl;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
10 | if (i % x == 0)
| ~ ^ ~
| | |
| | double
| double
|
s994354216 | p03861 | C++ | using namespace std;
int main(void){
long a,b,x,ans;
cin>>a>>b>>x;
long n;
n=a%x;
a=a-n;
if(n==0){
ans=(b-a)/x+1;
}else{
ans=(b-a)/x;
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin>>a>>b>>x;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:13:5: error... |
s382381911 | p03861 | C++ | #include <bits/stdc++.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
using namespace std;
#define pi M_PI
int main(){
ll a, b, x;
cin >> a >> b >> x;
ll ans = b/x - (a - 1)/x;
if(a==0)ans=b/x;
cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: 'll' was not declared in this scope
9 | ll a, b, x;
| ^~
a.cc:10:12: error: 'a' was not declared in this scope
10 | cin >> a >> b >> x;
| ^
a.cc:10:17: error: 'b' was not declared in this scope
10 | cin >> a >> b >> x;
... |
s682081229 | p03861 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <stdlib.h>
using namespace std;
using ll=long long;
int main (void) {
cin >> a >> b >> x;
ll ans=0;
if (a==0){
return 0;
}
ans=func(b/x+1)-func((a-1)/x+1);
cout << ans;
} | a.cc: In function 'int main()':
a.cc:11:10: error: 'a' was not declared in this scope
11 | cin >> a >> b >> x;
| ^
a.cc:11:15: error: 'b' was not declared in this scope
11 | cin >> a >> b >> x;
| ^
a.cc:11:20: error: 'x' was not declared in this scope
11 | cin >> a >> b... |
s592898199 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b,x;
cin>>a>>b>>x;
long long ans;
if(a==0) ans=b/x+1
else ans=b/x-(a-1)/x;
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before 'else'
7 | if(a==0) ans=b/x+1
| ^
| ;
8 | else ans=b/x-(a-1)/x;
| ~~~~
|
s518403935 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b,x;
cin>>a>>b>>x;
long long ans;
ans=b/x-(c-1)/x;
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:7:14: error: 'c' was not declared in this scope
7 | ans=b/x-(c-1)/x;
| ^
|
s472348794 | p03861 | C++ | #include <bits/stdc++.h>
#define rep(i, a, b) for(int i=(a);i<(b);++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = (1 << 30) - 1;
const ll INF64 = ((ll)1 << 62) - 1;
const ll MOD = 1e9 + 7;
const double PI = 3.1415926535897932384626433832795;
int main()
{
ll a, b, x
cin >> ... | a.cc: In function 'int main()':
a.cc:16:9: error: expected initializer before 'cin'
16 | cin >> a >> b >> x;
| ^~~
a.cc:20:25: error: 'x' was not declared in this scope
20 | if (i % x == 0)
| ^
|
s028819015 | p03861 | C++ | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
long a, b, x;
cin >> a >> b >> x;
cout << b / x - max(0, (a - 1) / x) << endl;
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:9:28: error: no matching function for call to 'max(int, long int)'
9 | cout << b / x - max(0, (a - 1) / x) << endl;
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/... |
s932712467 | p03861 | C++ | #include <iostream>
using namespace std;
int main() {
long long a, b, x;
cin >> a >> b >> h;
cout<< ((b - a)+1)/x <<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:26: error: 'h' was not declared in this scope
6 | cin >> a >> b >> h;
| ^
|
s696242656 | p03861 | C++ | #include<iostream>
using namespace std;
signed main(){
long int a,b,x;
cin >> a >> b >> x;
if(a%x!=0){
a -= a%x;
}
if(b%x!=0){
b -= b%x;
}
ans = b/x - a/x;
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
14 | ans = b/x - a/x;
| ^~~
| abs
|
s989720850 | p03861 | Java | import java.util.*;
import java.util.Arrays;
import java.util.Set;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
long a=sc.nextLong();
long b=sc.nextLong();
long x=sc.nextLong();
int sum=0;
for(int i=a;i<=b;i++){
... | Main.java:12: error: incompatible types: possible lossy conversion from long to int
for(int i=a;i<=b;i++){
^
1 error
|
s900817620 | p03861 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
#include<string>
#include<bitset>
using namespace std;
int main(){
long long a,b,x;
cin >> a >> b >> x;
cout << long long(b/x)-long long((a-1)/x) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:13: error: expected primary-expression before 'long'
14 | cout << long long(b/x)-long long((a-1)/x) << endl;
| ^~~~
|
s025544683 | p03861 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
#include<string>
#include<bitset>
using namespace std;
int main(){
long long a,b,x;
cin >> a >> b >> x;
cout << long long int(b/x)-long long int((a-1)/x) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:13: error: expected primary-expression before 'long'
14 | cout << long long int(b/x)-long long int((a-1)/x) << endl;
| ^~~~
|
s080493420 | p03861 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
#include<string>
#include<bitset>
using namespace std;
int main(){
long long a,b,x;
cin >> a >> b >> x;
cout << long long int(b/x)-long long int((a-1)/x) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:13: error: expected primary-expression before 'long'
14 | cout << long long int(b/x)-long long int((a-1)/x) << endl;
| ^~~~
|
s769395848 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long int a,b,x;
cin >> a >> b >> x;
cout << (a==0)?(b/x+1):(b/x-(a-1)/x) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:40: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | cout << (a==0)?(b/x+1):(b/x-(a-1)/x) << endl;
| ~~~~~~~~~~~~~~^~~~~~~
|
s391516446 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a, b, x, c=0;
cin >> a >> b >> x;
while(){
if((a+c)%x!=0) c++;
else break;
}
a=a+c;
b=b+c;
if((b-a)%x==0){
cout << (b-a)/x+1 << endl;
} else {
cout << (b-a)/x << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before ')' token
7 | while(){
| ^
|
s305272104 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a, b, x, c=0;
cin >> a >> b >> x;
while(){
if((a+c)%x!=0) c++;
else break;
}
a=a+c;
b=b+c;
cout << (b-a+x)/x << endl;
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before ')' token
7 | while(){
| ^
|
s628037061 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a, b, x;
cin >> a >> b >> x;
cout << (b-a-x)/x; << endl;
} | a.cc: In function 'int main()':
a.cc:7:28: error: expected primary-expression before '<<' token
7 | cout << (b-a-x)/x; << endl;
| ^~
|
s837354230 | p03861 | C++ | #include<iostream>
#include<stdint>
using namespace std;
int main() {
int64_t a, b, x;
cin >> a >> b >> x;
if (a == b) {
if (a % x == 0) cout << 1;
else cout << 0;
}
else if ((a + (b - a) / x * x) % x == 0 || (a + (b - a) / x * x) % x > b % x) cout << (b - a) / x + 1;
else cout << (b - a) / x;
return 0;
}
/... | a.cc:2:9: fatal error: stdint: No such file or directory
2 | #include<stdint>
| ^~~~~~~~
compilation terminated.
|
s456047131 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, x, i, ans=0;
cin >> a >> b >> x;
for(i=0;i<=b-a;i++){
if((a+i)%x==0){
a = a+i;
break;
}
while(a<=b){
ans++;
a += x;
}
cout << ans;
}
| a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s337314238 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, x, i, ans=0;
cin >> a >> b >> x;
for(i=0;i<=b-a;i++){
if((a+i)%x==0) ans++, break;
}
while(a+i<=b){
a+i += x;
ans++;
}
cout << ans;
}
| a.cc: In function 'int main()':
a.cc:8:39: error: expected primary-expression before 'break'
8 | if((a+i)%x==0) ans++, break;
| ^~~~~
a.cc:11:18: error: lvalue required as left operand of assignment
11 | a+i += x;
| ... |
s989810839 | p03861 | C++ | #include <iostream>
#include<set>
#include<string>
#include<algorithm>
using namespace std;
int main(void){
long long a,b,x,cnt=0;
cin>>a>>b>>x;
long long aa,bb,;
bb=b/x;
if(a==0){// 中身がー1のとき ==f(-1) 用//
bb=0;
}
else {
aa=(a-1)/x;
}
cout<<<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:21: error: expected unqualified-id before ';' token
9 | long long aa,bb,;
| ^
a.cc:17:11: error: expected primary-expression before '<<' token
17 | cout<<<<endl;
| ^~
|
s831566526 | p03861 | C++ | #include<bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9+7;
using LL = long long;
const LL LINF = 1e18;
using namespace std;
#define COUT(v) cout<<(v)<<endl
#define CIN(n) long long int(n);cin >> (n)
#define YES(n) cout<<((n)? "YES" : "NO")<<endl
#define Yes(n) cout<<((n)? "Yes" : "No")<<endl
#define POSSIBLE(... | a.cc:28:3: error: extended character is not valid in an identifier
28 | if(A!=0){
| ^
a.cc: In function 'int main()':
a.cc:28:3: error: '\U00003000if' was not declared in this scope
28 | if(A!=0){
| ^~~~
a.cc:30:5: error: 'else' without a previous 'if'
30 | }else{
| ^~~~
|
s629125934 | p03861 | C++ | #include<bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9+7;
using LL = long long;
const LL LINF = 1e18;
using namespace std;
#define COUT(v) cout<<(v)<<endl
#define CIN(n) long long int(n);cin >> (n)
#define YES(n) cout<<((n)? "YES" : "NO")<<endl
#define Yes(n) cout<<((n)? "Yes" : "No")<<endl
#define POSSIBLE(... | a.cc:28:3: error: extended character is not valid in an identifier
28 | if(a!=0){
| ^
a.cc: In function 'int main()':
a.cc:28:8: error: 'a' was not declared in this scope
28 | if(a!=0){
| ^
a.cc:28:3: error: '\U00003000if' was not declared in this scope
28 | if(a!=0){
| ... |
s477350995 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,c;
cin >> a >> b >> c;
cout << (b+x)/c - (a+x-1)/c << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:20: error: 'x' was not declared in this scope
8 | cout << (b+x)/c - (a+x-1)/c << endl;
| ^
|
s999521203 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,c;
cin >> a >> b >> c;
cout << b/c-a/c+!(a%x) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:29: error: 'x' was not declared in this scope
8 | cout << b/c-a/c+!(a%x) << endl;
| ^
|
s737660174 | p03861 | C++ |
#include <iostream>
#include <string.h>
#include <algorithm>
#include <vector>
#include <queue>
#define rep(i,a,b)for(int i=a;i<b;++i)
#define rrep(i,a,b)for(int i=a;i>b;--i)
#define yesno(flag)if(flag)cout<<"Yes"<<endl; else cout<<"No"<<endl;
using namespace std;
typedef long long ll;
const ll INF=100000000000LL;
... | a.cc: In function 'int main()':
a.cc:19:28: error: found ':' in nested-name-specifier, expected '::'
19 | if(a==0&&x!=1)++ans:
| ^
| ::
a.cc:19:25: error: 'ans' is not a class, namespace, or enumeration
19 | if(a==0&&x!=1)++ans:
... |
s784421006 | p03861 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
long long a, b, x;
cin >> a >> b >> x;
if (a % x==0 &&| b % x==0)
{
cout << (b - a) / x + 1 << endl;
}
else
{
cout << (b - a) / x << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before '|' token
8 | if (a % x==0 &&| b % x==0)
| ^
|
s046586255 | p03861 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<utility>
#include<array>
#include<cassert>
#include<list>
using namespace std;
#define SPEEDY cin.tie(0);ios::sync_with_stdio(false);
#d... | a.cc: In function 'void BFS()':
a.cc:48:1: error: expected unqualified-id before '}' token
48 | }
| ^
|
s946024145 | p03861 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int a;
int b;
int x;
cin >> a;
cin >> b;
cin >> x;
if (a%x==0&&b%x==0)
{
cout << b / x - a / x + 1 << endl;
}
else if (a%x == 0 && b%x != 0)
{
cout << b / x - a / x << endl;
}
else(a%x != 0b % x != 0)
{
cout << (b + 1) / x - a /... | a.cc: In function 'int main()':
a.cc:20:21: error: unable to find numeric literal operator 'operator""b'
20 | else(a%x != 0b % x != 0)
| ^~
|
s501979363 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int a,b,c,count=0;
cin >> a >> b >> c;
count=a/c-b/c;
if(c%2=0){
count++;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: lvalue required as left operand of assignment
7 | if(c%2=0){
| ~^~
a.cc:10:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | cout << ans << endl;
| ^~~
| abs
|
s498635359 | p03861 | C | #include<stdio.h>
int main(void)
{
int d,i;
unsigned __int64 a,b,c;
scanf("%d%d%d",&a,&b,&c);
for(i = a ;i <= b ;i++) {
if(b%a == 0) {
d++;
}
}
printf("%d\n",c);
return 0;
} | main.c: In function 'main':
main.c:6:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
6 | unsigned __int64 a,b,c;
| ^
main.c:6:23: error: 'a' undeclared (first use in this function)
main.c:6:23: note: each undeclared identifier is reported only once for each fu... |
s738857241 | p03861 | C | #include<stdio.h>
int main(void)
{
int d,i;
unsigned int64 a,b,c;
scanf("%d%d%d",&a,&b,&c);
for(i = a ;i <= b ;i++) {
if(b%a == 0) {
d++;
}
}
printf("%d\n",c);
return 0;
} | main.c: In function 'main':
main.c:6:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
6 | unsigned int64 a,b,c;
| ^
main.c:6:21: error: 'a' undeclared (first use in this function)
main.c:6:21: note: each undeclared identifier is reported only once for each functi... |
s316842975 | p03861 | C | #include<stdio.h>
int main(void)
{
int d,i;
unsigned __int64 a,b,c;
scanf("%d%d%d",&a,&b,&c);
for(i = a ;i <= b ;i++) {
if(b%a == 0) {
d++;
}
}
printf("%d\n",c);
return 0;
} | main.c: In function 'main':
main.c:6:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
6 | unsigned __int64 a,b,c;
| ^
main.c:6:23: error: 'a' undeclared (first use in this function)
main.c:6:23: note: each undeclared identifier is reported only once for each fu... |
s129781339 | p03861 | C | #include<stdio.h>
int main(void)
{
int d,i;
unsigned __int64 a,b,c;
scanf("%d%d%d",a,b,c);
for(i = a ;i <= b ;i++) {
if(b%a == 0) {
d++;
}
}
printf("%d\n",c);
return 0;
} | main.c: In function 'main':
main.c:6:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
6 | unsigned __int64 a,b,c;
| ^
main.c:6:23: error: 'a' undeclared (first use in this function)
main.c:6:23: note: each undeclared identifier is reported only once for each fu... |
s171386428 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long a, b, x;
cin >> a >> b >> x;
if (a != 0) {
cout << ((b / x) + 1) - (((a - 1) / x) + 1) << endl;
}
else {
cout << (b / x) + 1 << endl;
} | a.cc: In function 'int main()':
a.cc:11:5: error: expected '}' at end of input
11 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s679204195 | p03861 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long x = sc.nextLong();
long count = 0;
for(long i=a;i<=b;i++){
System.out.println(b/x-a/x+(a%x==0?1:0));
}
} | Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s508466903 | p03861 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
long a, b, x;
cin >> a >> b >> x;
cout << (b - b % x) / x - max(0, ((a - 1) - (a - 1) % x) / x) << endl;
} | a.cc: In function 'int main()':
a.cc:8:38: error: no matching function for call to 'max(int, long int)'
8 | cout << (b - b % x) / x - max(0, ((a - 1) - (a - 1) % x) / x) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51... |
s288404989 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;
ll a, b, x;
int main(int argc, char const *argv[]) {
ios_base::sync_with_st... | a.cc: In function 'int main(int, const char**)':
a.cc:14:20: error: no matching function for call to 'max(int, ll)'
14 | cout << max(0, b/x-(a+x-1)/x+1) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-l... |
s660685099 | p03861 | C++ | #include<bits/stdc++.h>
#include<string>
#include<cctype>
#include<cmath>
#include<queue>
#include<stack>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){
long long a,b,X;
long long ans,ans1,ans2;
cin >> a >> b >> X;
if(a==b){
ans=0;
}else if(a==1){
ans = b/X;
}else{
... | a.cc:28:3: error: 'cout' does not name a type
28 | cout << ans << endl;
| ^~~~
a.cc:30:3: error: expected unqualified-id before 'return'
30 | return 0;
| ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
31 | }
| ^
|
s395483157 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
int f(int n,int x){
if(n==-1)return 0;
return n/x+1;
}
signed main(){
int a,b,x;
cin>>a>>b>>x;
cout<<n(b,x)-n(a-1,x)<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:11: error: 'n' was not declared in this scope
11 | cout<<n(b,x)-n(a-1,x)<<endl;
| ^
|
s990310247 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
long long a, b, x;
cin >> a >> b >> x;
long long minx = (a/x) + (a%x!=);
long long maxx = b/x;
cout << maxx - minx + 1 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:34: error: expected primary-expression before ')' token
8 | long long minx = (a/x) + (a%x!=);
| ^
|
s576894760 | p03861 | Java |
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long x = sc.nextLong();
long sum = 0;
sum = (b / x) - (a / x);
if (a % x == 0) {
sum++;
}... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s663088482 | p03861 | C++ | #include <bits/stdc++.h>
#include <string>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
using namespace std;
int main() {
long long a, b, x, ans = 0;
cin >> a >> b >> x;
if ((a - b) % x != 0)
cout << (a - b) / x + 1 << endl;
else if ((a - b) % x == 0)
cout << (a - b)... | a.cc: In function 'int main()':
a.cc:13:26: error: expected primary-expression before '<' token
13 | cout << (a - b) / x, < endl;
| ^
|
s664965233 | p03861 | C++ | #include"bits/stdc++.h"
//#include<bits/stdc++.h>
using namespace std;
#define print(x) cout<<x<<endl;
#define rep(i,a,b) for(int i=a;i<b;i++)
typedef long long ll;
//const int mod = 1e9 + 7;
int main() {
ll a, b, c;
cin >> a >> b >> c;
ll f = (b-1) / c;
ll b = a / c;
print(f - b);
} | a.cc: In function 'int main()':
a.cc:13:12: error: redeclaration of 'll b'
13 | ll b = a / c;
| ^
a.cc:10:15: note: 'll b' previously declared here
10 | ll a, b, c;
| ^
|
s566521915 | p03861 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 10000
//コメントアウトするとdebug()を実行しない
#define DEBUG
using namespace std;
t... | a.cc:25:14: error: 'll' was not declared in this scope
25 | typedef pair<ll ,ll > P;
| ^~
a.cc:25:18: error: 'll' was not declared in this scope
25 | typedef pair<ll ,ll > P;
| ^~
a.cc:25:21: error: template argument 1 is invalid
25 | typedef pair<ll ,ll > P;
| ... |
s530704022 | p03861 | Java | import java.util.Scanner;
public classMain {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
long a=sc.nextLong(),b=sc.nextLong(),x=sc.nextLong(),C =0;
C =b/x-a/x;
if(a%x==0){
C++;
}
System.out.println(C);
sc.close();
}
} | Main.java:3: error: class, interface, enum, or record expected
public classMain {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
^
(use --enable-preview to enable unnamed classes)
Main.java:14: error: class,... |
s509396133 | p03861 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
int a,b,x,count=0;
Scanner sc = new Scanner(System.in);
a = sc.nextInt();
b = sc.nextInt();
x = sc.nextInt();
for(int i=a; i<=b; i++){
if(i%x == 0) count++;
}
System.out.println(cout);
}
}
| Main.java:16: error: cannot find symbol
System.out.println(cout);
^
symbol: variable cout
location: class Main
1 error
|
s415477623 | p03861 | Java | import java.util.Scanner;
public class Main(){
public static void main(String[] args){
int a,b,x,count=0;
Scanner sc = new Scanner(System.in);
a = sc.nextInt();
b = sc.nextInt();
x = sc.nextInt();
for(int i=a; i<=b; i++){
if(i%x == 0) count++;
}
System.out.println(cout);
}
}
| Main.java:3: error: '{' expected
public class Main(){
^
1 error
|
s027678130 | p03861 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long x = sc.nextLong();
long ans;
ans = b / x - a / x;
if(a % x == 0){
ans++;
}
System.out.println(ans);
}
| Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s372410903 | p03861 | Java | import java.util.*;
public class ABC048_B {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
long a=sc.nextLong(),b=sc.nextLong(),x=sc.nextLong(),c=0;
c=b/x-a/x;
if(a%x==0){
c++;
}
System.out.println(c);
}
} | Main.java:2: error: class ABC048_B is public, should be declared in a file named ABC048_B.java
public class ABC048_B {
^
1 error
|
s120261544 | p03861 | Java | import java.util.*;
public class ABC048_B {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt(),b=sc.nextInt(),x=sc.nextInt(),c=0;
for(;a<=b;a++){
if(a%x==0){
c++;
}
}
System.out.println(c);
}
} | Main.java:2: error: class ABC048_B is public, should be declared in a file named ABC048_B.java
public class ABC048_B {
^
1 error
|
s413750503 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int x = sc.nextInt();
int cnt = b / x - a / x;
if(a % x ==0){
cnt++;
}
System.out.prin... | Main.java:10: error: illegal character: '\u3000'
??if(a % x ==0){
^
Main.java:10: error: illegal character: '\u3000'
??if(a % x ==0){
^
2 errors
|
s668676156 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int x = sc.nextInt();
int cnt = b / x - a / x;
if(a % x ==0){
cnt++;
}
System.out.prin... | Main.java:10: error: illegal character: '\u3000'
??if(a % x ==0){
^
Main.java:10: error: illegal character: '\u3000'
??if(a % x ==0){
^
2 errors
|
s670150786 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int x = sc.nextInt();
int i;
int cnt;
if((a>=&&i>=b) && i%x==0){
cnt++;
}
... | Main.java:11: error: illegal start of expression
if((a>=&&i>=b) && i%x==0){
^
1 error
|
s271954875 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int x = sc.nextInt();
int i;
int cnt;
if(a<=i<=b && i%x==0){
cnt++;
}
... | Main.java:11: error: bad operand types for binary operator '<='
if(a<=i<=b && i%x==0){
^
first type: boolean
second type: int
1 error
|
s237700082 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
int x =sc.nextInt();
int count=0;
for(int i=0;a<=b;i++){
if((a)%x==0){
count=count+1;
}
a=a+1;... | Main.java:18: error: reached end of file while parsing
}
^
1 error
|
s314658923 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long x = sc.nextLong();
long sum = (b/x + 1);
if(a==0){sum++};else{sum -=(a - 1)/x + 1;};
System.out.println(sum);
}
} | Main.java:9: error: ';' expected
if(a==0){sum++};else{sum -=(a - 1)/x + 1;};
^
Main.java:9: error: 'else' without 'if'
if(a==0){sum++};else{sum -=(a - 1)/x + 1;};
^
2 errors
|
s561610820 | p03861 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main() {
unsigned long long a, b, x;
cin >> a >> b >> x;
if (a %x != 0)
cout << b / x - a / x << endl;
else
cout << /*b / x - a / x + 1*/ << endl;
} | a.cc: In function 'int main()':
a.cc:13:47: error: expected primary-expression before '<<' token
13 | cout << /*b / x - a / x + 1*/ << endl;
| ^~
|
s944458974 | p03861 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main() {
unsigned long long a, b, x;
cin >> a >> b >> x;
if (a %x != 0)
//cout << b / x - a / x << endl;
else
cout << b / x - a / x + 1 << endl;
} | a.cc: In function 'int main()':
a.cc:12:9: error: expected primary-expression before 'else'
12 | else
| ^~~~
|
s356378642 | p03861 | C++ | #include<iostream>
using namespace std;
int main() {
__int64 a, b, x;
cin >> a >> b >> x;
__int64 ans = 0,c;
ans = b / x - a / x;
cout << ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
4 | __int64 a, b, x;
| ^~~~~~~
| __int64_t
a.cc:5:16: error: 'a' was not declared in this scope
5 | cin >> a >> b >> x;
| ^
a.cc:5:21: error: ... |
s003807747 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
long longa,b,c,s=0;
cin>>a>>b>>c;
s+=b/c;
s-=a/c;
cout<<s<<endl;
} | a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s766924166 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
long longa,b,c,s=0;
cin>>a>>b>>c;
s+=b/c;
s-=a/c;
cout<<s<<endl;
} | a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.