submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s701517950 | p03861 | C++ | #include<bits/stdc++.h>
uing namespace std;
int main(){
long long a,b,x;
scanf("%lld%lld%lld",&a&b&x);
if(a<0)
printf("%lld",(b/x)-(a-1)/x);
else
printf("%lld",(b/x)+1;
} | a.cc:2:1: error: 'uing' does not name a type; did you mean 'uint'?
2 | uing namespace std;
| ^~~~
| uint
a.cc: In function 'int main()':
a.cc:5:32: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
5 | scanf("%lld%lld%lld",&a&b&x);
| ... |
s590274894 | p03861 | C++ | #include<stdio. h>
using namespace std;
int main()
{
long long a, b, x, cnt;
scanf("%lld%lld%lld", &a, &b, &x);
cnt = (b / x) - ((a - 1) / x);
if
(a==0)
++cnt ;
printf("%lld", cnt);
return 0;
} | a.cc:1:9: fatal error: stdio. h: No such file or directory
1 | #include<stdio. h>
| ^~~~~~~~~~
compilation terminated.
|
s685888631 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
int A;
int B;
char OP;
cin>>A;
cin>>OP;
cin>>B;
if(OP=="+")
cout<<A+B<<endl;
if(OP="-")
cout<<A-B;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(OP=="+")
| ~~^~~~~
a.cc:12:15: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
12 | if(OP="-")
| ^~~
| ... |
s855226461 | p03861 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(){
int a;
int b;
char x;
scanf("%d%c%d",&a,&x,&b);
switch(x){
case '-':
cout<<a-b;
break;
case '+':
cout<<a+b;
break;
}
return 0;
} | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s589892707 | p03861 | C++ | #include<stdio. h>
using namespace std;
int main()
{
long long a, b, x, cnt;
if (a<=b)
scanf("%lld%lld%lld", &a, &b, &x);
cnt = (b / x) - ((a - 1) / x);
printf("%lld", cnt);
return 0;
} | a.cc:1:9: fatal error: stdio. h: No such file or directory
1 | #include<stdio. h>
| ^~~~~~~~~~
compilation terminated.
|
s540429380 | p03861 | C | #include <iostream>
using namespace std;
int main()
{
long long a,b,x ,i=0;
cin >> a>>b>>x;
i=(b/x)-(a-1)/x;
if (a<=b)
cout << i<<endl;
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s946760141 | p03861 | C | #include <iostream>
using namespace std;
int main()
{
long long a,b,x ,i;
cin >> a>>b>>x;
i=(b/x)-(a-1)/x;
if (a<=b)
cout << i<<endl;
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s237103976 | p03861 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(){
int a,b,x,c=0;
cin>>a>>b>>x;
if(a>0&&b>0&&b>a&&x>0)
//scanf("%d%d%d",&a,&b,&x);
for(int i=a;i<=b;i++)
if(i%x==0)
c++;
printf("%d",c);
return 0;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s846967277 | p03861 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(){
int a,b,x,c=0;
cin>>a>>b>>x;
if(a>0&&b>0&&b>a&&x>0)
//scanf("%d%d%d",&a,&b,&x);
for(int i=a;i<=b;i++)
if(i%x==0)
c++;
printf("%d",c);
return 0;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s251943757 | p03861 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(){
int a,b,x,c=0;
cin>>a>>b>>x;
if(a>0&&b>0&&b>a&&x>0)
for(int i=a;i<=b;i++)
if(i%x==0)
c++;
printf("%d",c);
return 0;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s489183637 | p03861 | C++ | #include<iostream>
using namespace std;
int main()
{
long long a,b,x,sum=0;
cin>>a>>b>>x;
if(x>0&&a<=b)
{
if(b%x==0)
sum=((b/x-a/x)+1;
else
sum=(b/x-a/x);
}
cout<<sum;
} | a.cc: In function 'int main()':
a.cc:10:17: error: expected ')' before ';' token
10 | sum=((b/x-a/x)+1;
| ~ ^
| )
|
s038111920 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x,ans;
cin>>a>>b>>x;
if(a==0){
ans=(b/x)+1;
}
else {
ans=(b/x)-(a-1)/x;
}
cout<<ans;
| a.cc: In function 'int main()':
a.cc:12:19: error: expected '}' at end of input
12 | cout<<ans;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s786331704 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std ;
int main() {
long long a,b,x;int c=0;
cin>>a>>b>>x;
if (a>0&&b>=a&&x>0)
{
for(int i=a;i<=b;i++)
{
if(i%x==0)
{c++;}
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s112921024 | p03861 | C++ | #include <stdio.h >
using namespace std;
int main() {
int a, b, x,c=0;
scanf("%d %d %d",&a,&b,&x);
for (int i = a; i <= b; i++) {
if (i % x == 0)
c += 1;
}
printf("%d",c);
} | a.cc:1:10: fatal error: stdio.h : No such file or directory
1 | #include <stdio.h >
| ^~~~~~~~~~
compilation terminated.
|
s870636199 | p03861 | C++ | #include <iostream >
using namespace std;
int main() {
int a, b, x,c=0;
cin >> a >> b >> x;
for (int i = a; i <= b; i++) {
if (i % x == 0)
c += 1;
}
cout << c;
} | a.cc:1:10: fatal error: iostream : No such file or directory
1 | #include <iostream >
| ^~~~~~~~~~~
compilation terminated.
|
s156432240 | p03861 | C++ | #include<cstring>
#include<iostream>
#include<Bits/stdc++.h>
using namespace std;
int main(){
int a,b,x,count=0;
scanf("%d%d%d",&a,&b,&x);
for(int i=0;i<1000000000000000000;i++){
if(a<0||a>b||b<a||b>1000000000000000000||x<=1||x>1000000000000000000){
printf("Wrong answer");
scanf("%d%d%d",&a,&b,&x);
}
else
... | a.cc:3:9: fatal error: Bits/stdc++.h: No such file or directory
3 | #include<Bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s544126979 | p03861 | C++ | #include <iostream>
using namespace std;
int main() {
long long a,b,x,count=0;
cin>>a>>b>>x;
if(a==0) {
count=(b/x)+1;
}
else {
count=(b/x)-(a-1)/x;
} cout<<count;
return0;
} | a.cc: In function 'int main()':
a.cc:12:1: error: 'return0' was not declared in this scope
12 | return0;
| ^~~~~~~
|
s477938696 | p03861 | C++ | include <iostream>
using namespace std;
int main() {
long long a,b,x,count=0;
cin>>a>>b>>x;
if(a==0) {
count=(b/x)+1;
}
else {
count=(b/x)-(a-1)/x; } cout<<count; return0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>x;
| ^~~
a.cc:10:24: error: 'cout' was not declared in this scope; did you mean 'count'?
10 | count=(b/x)-(a-1)/x; ... |
s480648353 | p03861 | C | #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int a=0,b=0,x=0,count=0;
scanf("%d%d%d",&a,&b,&x);
for(int i=a;i<=b;i++){
if(i%x==0)
count++;
else
continue;
}
printf("%d",count);
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s528090472 | p03861 | C | #include <bits/stdc++.h>
using namespace std;
int main(){
long long a=0,b=0,x=0,count=0;
scanf("%lld%lld%lld",&a,&b,&x);
for(long long i=a;i<=b;i++){
if(i%x==0)
count++;
else
continue;
}
printf("%lld",count);
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s310073182 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, x, z=0;
scanf("%d%d%d", &a, &b, &x);
if(b>=1000000000000000000 && x>=100000000000000000 ){
if (1<=x){
if(a<b){
for(int i=a;i<=b;i+=x)
z++;
printf("%d",z);
}
else if(a=b){
printf("%d",z);
}
else{
printf("Er... | a.cc: In function 'int main()':
a.cc:27:33: error: expected '}' at end of input
27 | printf("Error");
| ^
a.cc:26:13: note: to match this '{'
26 | else{
| ^
a.cc:27:33: error: expected '}' at end of input
27 | print... |
s580544569 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,x,count=0;
cin>>a>>b>>x;
if(a>=0&&b>=0&&x>0)
{
for(int i=a; I<=b; i++)
{
if(i%x==0){
count ++;
}
}}
count <<count;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: 'I' was not declared in this scope
9 | for(int i=a; I<=b; i++)
| ^
|
s778249650 | p03861 | C | #include <stdio.h>
using namespace std;
int main()
{
unsigned long a,b,x;
int count=0;
scanf("%lu %lu %lu",&a,&b,&x);
for(;a<=b;++a)
if(a%x==0)
count++;
printf("%d",count);
return 0;
}
| main.c:2:1: error: unknown type name 'using'
2 | using namespace std;
| ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
2 | using namespace std;
| ^~~
|
s150856133 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long a, b, x;
scanf("%lld%lld%lld", &a, &b, &x);
printf("%lld", (b/x) + (a==0?1:(a-1)/x);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:40: error: expected ')' before ';' token
8 | printf("%lld", (b/x) + (a==0?1:(a-1)/x);
| ~ ^
| )
|
s118344273 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
long long a,b,x,count=0;
cin>>a>>b>>x;
if(a==0)
{ count=(b/x)+1;
}
else
{
count=(b/x)-(a-1)/x;
}
cout<<count;
return0;
} | a.cc: In function 'int main()':
a.cc:15:1: error: 'return0' was not declared in this scope
15 | return0;
| ^~~~~~~
|
s368859485 | p03861 | C++ | #include <iostream >
using namespace std;
int main() {
int a, b, x,c=0;
cin >> a >> b >> x;
for (int i = a; i <= b; i++) {
if (i % x == 0)
c += 1;
}
cout << c;
} | a.cc:1:10: fatal error: iostream : No such file or directory
1 | #include <iostream >
| ^~~~~~~~~~~
compilation terminated.
|
s725090490 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
double a,b,x;
cin>>a>>b>>x;
int count=0;
for(double i=a;i<=b;i++){
if(i%x==0) count++;
}
cout<<count<<endl;
} | a.cc: In function 'int main()':
a.cc:8:8: error: invalid operands of types 'double' and 'double' to binary 'operator%'
8 | if(i%x==0) count++;
| ~^~
| | |
| | double
| double
|
s833371431 | p03861 | C++ | include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,x;
cin>>a>>b>>x;
int count;
for(int i=a;i<=b;i++){
if(i%x==0) count++;
}
cout<<count<<endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>x;
| ^~~
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'count'?
10 | cout<<count<... |
s121561559 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{int a,b,x,c=0;
cin>>a>>b>>x;int y=a,int v=b;
for(int i=y;i<=v;i++)
{
if(i%x==0)
{
c++;
}
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:22: error: expected unqualified-id before 'int'
5 | cin>>a>>b>>x;int y=a,int v=b;
| ^~~
a.cc:6:16: error: 'v' was not declared in this scope
6 | for(int i=y;i<=v;i++)
| ^
|
s052341970 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{int a,b,x,c=0;
cin>>a>>b>>x;y=a,v=b;
for(int i=y;i<=v;i++)
{
if(i%x==0)
{
c++;
}
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:14: error: 'y' was not declared in this scope
5 | cin>>a>>b>>x;y=a,v=b;
| ^
a.cc:5:18: error: 'v' was not declared in this scope
5 | cin>>a>>b>>x;y=a,v=b;
| ^
|
s916186658 | p03861 | C++ | include<bits/stdc++.h>
using namespace std;
int main()
{int a,b,x,c=0;
cin>>a>>b>>x;
for(int i=a;i<=b;i++)
{
if(i%x==0)
{
C++;
}
}cout<<c;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>x;
| ^~~
a.cc:10:1: error: 'C' was not declared in this scope
10 | C++;
| ^
a.cc:12:2: error: 'cout' was ... |
s038454711 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
int a , b,x,count=1;
cout <<"enter a:";
cin >>a;
cout <<"enter b:";
cin >>b;
cout <<"enter x:";
cin >>x;
while(a<b){
for(int i=a;i<=b;i++)
if (i%x=0){
count++;}
}cout<<count;
}return 0;
}
| a.cc: In function 'int main()':
a.cc:16:18: error: lvalue required as left operand of assignment
16 | if (i%x=0){
| ~^~
a.cc: At global scope:
a.cc:19:2: error: expected unqualified-id before 'return'
19 | }return 0;
| ^~~~~~
a.cc:20:1: error: expected declaration before '... |
s624316681 | p03861 | C++ | #include<bits/stdc++.h> using namespace std; int main(){ long int a,b,x;int count=0; scanf("%d%d%d",&a,&b,&x); for(a;a<=b;a++) { if(a%x==0){ count++; } } printf("%d",count); return 0; } | a.cc:1:1: error: extended character is not valid in an identifier
1 | #include<bits/stdc++.h> using namespace std; int main(){ long int a,b,x;int count=0; scanf("%d%d%d",&a,&b,&x); for(a;a<=b;a++) { if(a%x==0){ count++; } } printf("%d",count);... |
s749265749 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long int a,b,x;int count=0;
scanf("%d%d%d",&a,&b,&x);
for(a;a<=b;a++) {
if(a%x==0){
count++; }
} printf("%d",count);
return 0;
} | a.cc:1:1: error: extended character is not valid in an identifier
1 | #include<bits/stdc++.h>
| ^
a.cc:1:1: error: stray '#' in program
1 | #include<bits/stdc++.h>
| ^
a.cc:11:3: error: extended character is not valid in an identifier
11 | }
| ^
a.cc:1:1: error: '\U0000200f' does ... |
s323537190 | p03861 | C++ | include<bits/stdc++.h> using namespace std; int main(){ long int a,b,x,count=0; scanf("%d%d%d",&a,&b,&x); for(a;a<=b;a++) { if(a%x==0){ count++; } } printf("%d",count); return 0; } | a.cc:1:260: error: extended character is not valid in an identifier
1 | include<bits/stdc++.h> using namespace std; int main(){ long int a,b,x,count=0; scanf("%d%d%d",&a,&b,&x); for(a;a<=b;a++) { if(a%x==0){ count++; } } printf("%d",count)... |
s200318728 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int a,b,x,count=0;
scanf("%d%d%d",&a,&b,&x);
for(a;a<=b;a++) {
if(a%x==0){
count++; }
} printf("%d",count);
return 0; } | a.cc:10:12: error: extended character is not valid in an identifier
10 | return 0; }
| ^
a.cc:10:12: error: '\U0000200f' does not name a type
10 | return 0; }
|
|
s708093688 | p03861 | C++ | #include <stdio.h>
#include <iostream>
using namespace std ;
int main ( )
{
long long a , b ,x ;
scanf("%lld%lld%lld,&a,&b,&x);
if ( a%x ==0 )
cout << ((b/x) - ((a)/x) ) +1 ;
else
cout << (b/x) - ((a)/x) ;
return 0 ;
}
| a.cc:8:15: warning: missing terminating " character
8 | scanf("%lld%lld%lld,&a,&b,&x);
| ^
a.cc:8:15: error: missing terminating " character
8 | scanf("%lld%lld%lld,&a,&b,&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: exp... |
s202934428 | p03861 | C | #include<bits/stdc++.h>
using namespace std;
int main (){
long long a,b,x,c=0;
scanf("%lld%lld%lld",&a,&b,&x);
for( a;a<=b;a++){
if(a%x==0)
c++;
}
printf("%lld",c);
} | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s445071573 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
float a;
float b;
float x;
float count=0;
scanf("%ld%ld%ld",&a,&b,&x);
for( a; a <= b ; a++){
if(a%x==0){
count++;
}
}
printf("%d",count);
}
| a.cc: In function 'int main()':
a.cc:12:14: error: invalid operands of types 'float' and 'float' to binary 'operator%'
12 | if(a%x==0){
| ~^~
| | |
| | float
| float
|
s014700849 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main (){
long long a,b,x,c=0;
scanf("%lld%lld%lld",&a,&b,&x);
for( a;a<=b;a++){
if(a%x==0)
c++;
}
printf("%lld",c); | a.cc: In function 'int main()':
a.cc:10:26: error: expected '}' at end of input
10 | printf("%lld",c);
| ^
a.cc:3:12: note: to match this '{'
3 | int main (){
| ^
|
s089468463 | p03861 | C++ | using namespace std;
int main(){
int a;
int b;
int x;
int count=0;
scanf("%d%d%d",&a,&b,&x);
for(a;a<=b;a++){
if(a%x==0){
count++;
}
}
printf("%d",count);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:1: error: 'scanf' was not declared in this scope
8 | scanf("%d%d%d",&a,&b,&x);
| ^~~~~
a.cc:15:1: error: 'printf' was not declared in this scope
15 | printf("%d",count);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable ... |
s054030085 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
unsigned int a,b;
int x,c=0;
scanf("%u ",&a);
scanf("%u ",&b);
scanf("%u",&x);
for(a;a<=b;a++){
if(a%x==0)
c++;
if (x!=2&&a==0&&x!=1)
c--;
}
/*if (x!=2&&(b-a)==0)
c--;*/
printf("%d",c);
| a.cc: In function 'int main()':
a.cc:21:16: error: expected '}' at end of input
21 | printf("%d",c);
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s651968947 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long a , b ;
long long x ;
scanf("%lld %lld %lld" ,&a,&b,&x);
sum+=(b/x) - ((a)/x);
if(a%x == 0)
++sum;
printf("%lld\n",sum);
}
| a.cc: In function 'int main()':
a.cc:9:9: error: 'sum' was not declared in this scope
9 | sum+=(b/x) - ((a)/x);
| ^~~
|
s342363907 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long a , b ;
long long x ;
scanf("%lld %lld %lld" ,&a,&b,&x);
a--;
sum+=(b/x) - ((a)/x);
if(a%x == 0)
++sum;
printf("%lld\n",sum);
}
| a.cc: In function 'int main()':
a.cc:10:9: error: 'sum' was not declared in this scope
10 | sum+=(b/x) - ((a)/x);
| ^~~
|
s836493486 | p03861 | C++ |
using namespace std;
int main (){
int n,a;
scanf("%d%d",&a,&n);
if(1<=a<=n){
a=a-n;}
if(a%2==0)
cout<<"A";
else
cout<<"M";
| a.cc: In function 'int main()':
a.cc:6:1: error: 'scanf' was not declared in this scope
6 | scanf("%d%d",&a,&n);
| ^~~~~
a.cc:10:1: error: 'cout' was not declared in this scope
10 | cout<<"A";
| ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#i... |
s946812531 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
int sum=0;
long long a,b,x;
cin>>a>>b>>c;
for(int i=a;i<=b;i++){
if(i%x==0){
sum++;
}
}
cout<<sum;
} | a.cc: In function 'int main()':
a.cc:6:12: error: 'c' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s239615280 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
double a,b,x,count=0,y;
cin>>a>>b>>x;
if(a>=0&&b>=0&&x>=0)
for(int i=a;i<=b;i++){
if(i%x==0)
count++;
}
cout<<count<<endl;
} | a.cc: In function 'int main()':
a.cc:8:21: error: invalid operands of types 'int' and 'double' to binary 'operator%'
8 | if(i%x==0)
| ~^~
| | |
| | double
| int
|
s406806391 | p03861 | C++ | #include <bits/stdc++>
using namespace std ;
int main ( )
{
int a , b , x ;
int counter = 0 ;
scanf("%d%d%d" ,&a,&b,&x);
for ( int i = a ; i <= b ; i++)
{
if ( i%x ==0)
counter ++ ;
}
printf ("%d", counter) ;
return 0 ;
}
| a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include <bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s596230517 | p03861 | C | #include <bits/stdc++.h>
using namespace std ;
int main ( )
{
int a , b , x ;
int counter = 0 ;
scanf("%d%d%d" ,&a,&b,&x);
for ( int i = a ; i <= b ; i++)
{
if ( i%x ==0)
counter ++ ;
}
printf ("%d", counter) ;
return 0 ;
}
| main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s695409608 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int a,b,x;
cin>>a>>b>>x;
if(a!=0){
long long int A=(a-1)/x;
}
else{
long long int A=0;
}
long long int B=b/x;
long long int ans=B-A;
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:15:23: error: 'A' was not declared in this scope
15 | long long int ans=B-A;
| ^
|
s942123690 | p03861 | C++ | /*
#include<rabbit>;
using blueHulkStress;
using AceOfSpades;
*/
#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = (1e-9);
typedef long long ll;
typedef unsigned long long ull;
#define flush fflush(stdout), cout.flush()
#define all(v) ((v).begin()),((v).end(... | a.cc: In function 'int main(int, const char**)':
a.cc:42:26: error: no matching function for call to 'max(ull, int)'
42 | cout<<b / x - max((a-1) / x , 0);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-... |
s660861055 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long a,b,x;
cin>>a>>b>>x;
cout<<a%x?b/x-a/x:b/x-a/x+1<<endl;
} | a.cc: In function 'int main()':
a.cc:6:36: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout<<a%x?b/x-a/x:b/x-a/x+1<<endl;
| ~~~~~~~~~^~~~~~
|
s272933828 | p03861 | C++ | #include<cstdio>
def long long ll;
int main(){
ll a, b, x;
scanf("%lld %lld %lld", &a, &b, &x);
ll n = 0;
for(a; a<=b; a++){
if(a%x==0)
n++;
}
printf("%lld", n);
return 0;
}
| a.cc:2:1: error: 'def' does not name a type
2 | def long long ll;
| ^~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
4 | ll a, b, x;
| ^~
a.cc:5:28: error: 'a' was not declared in this scope
5 | scanf("%lld %lld %lld", &a, &b, &x);
| ... |
s315776125 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, x;
cin >> a >> b >> x;
if(a==b)
res =0;
else{
int res = b/x - a/x +1;}
cout << res << endl;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'res' was not declared in this scope
8 | res =0;
| ^~~
a.cc:11:11: error: 'res' was not declared in this scope
11 | cout << res << endl;
| ^~~
|
s584009735 | p03861 | C++ | #include <iostream>
using namespce std;
int main(){
int a, b, x;
cin >> a >> b >> x;
int res = b/x - a/x +1;
cout << res << endl;
}
| a.cc:2:7: error: expected nested-name-specifier before 'namespce'
2 | using namespce std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b >> x;
| ^~~
| std::cin
In file included from a.cc:1... |
s506736664 | p03861 | C++ | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | a.cc: In function 'int main()':
a.cc:134:23: error: 'A' was not declared in this scope
134 | cout << lower_bound(A.begin(), A.end(), K) << endl;
| ^
a.cc:134:43: error: 'K' was not declared in this scope
134 | cout << lower_bound(A.begin(), A.end(), K) << endl;
| ... |
s586723262 | p03861 | C++ | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | a.cc: In function 'int main()':
a.cc:130:26: error: expected ';' before ':' token
130 | cout << b / x << endl:
| ^
| ;
|
s550621111 | p03861 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
int main()
{
ll a, b, x;
cin >> a >> b >> x;
cout << ((b / x + 1) - max((a - 1) / x + 1, 0)) << endl;
} | a.cc: In function 'int main()':
a.cc:14:31: error: no matching function for call to 'max(ll, int)'
14 | cout << ((b / x + 1) - max((a - 1) / x + 1, 0)) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/1... |
s390855944 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a,b,X,x,y,ans,g;
cin>>a>>b>>X;
ans=0;
x=N%2+M%2+X%2;
ans=b/X-(a-1)/X;
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'N' was not declared in this scope
8 | x=N%2+M%2+X%2;
| ^
a.cc:8:9: error: 'M' was not declared in this scope
8 | x=N%2+M%2+X%2;
| ^
|
s361421385 | p03861 | Java |
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
long a = s.nextLong();
long b = s.nextLong();
long x = s.nextLong();
long answer = 0;
if ((b - a) < x) {
if (a == b) {
if (a % x != 0) {
answer = 0;
} else if (a % x == 0) {
answer = 1;
... | Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s493484854 | p03861 | C++ | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int ... | a.cc: In function 'int main()':
a.cc:78:12: error: no matching function for call to 'max(int, long long int)'
78 | print(max(0, n2 - n1));
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candi... |
s233339884 | p03861 | C++ | #include "1_07.txt" | a.cc:1:10: fatal error: 1_07.txt: No such file or directory
1 | #include "1_07.txt"
| ^~~~~~~~~~
compilation terminated.
|
s894218705 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a,b,x,count;
cin >> a >> b >> x;
count =0;
for(,a<=b;a++){
if(a%x==0) count++;
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: expected primary-expression before ',' token
8 | for(,a<=b;a++){
| ^
a.cc:8:16: error: expected ';' before ')' token
8 | for(,a<=b;a++){
| ^
| ;
|
s087511151 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int_64t a,b,x,count;
cin >> a >> b >> x;
count =0;
for(,a<=b;a++){
if(a%x==0) count++;
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:5:2: error: 'int_64t' was not declared in this scope; did you mean 'int64_t'?
5 | int_64t a,b,x,count;
| ^~~~~~~
| int64_t
a.cc:6:10: error: 'a' was not declared in this scope
6 | cin >> a >> b >> x;
| ^
a.cc:6:15: error: 'b' was not declared ... |
s781656668 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
long long int a,b,x;
cin>>a>>b>>x;
long long int c=(b/x)-(a/x);
if(a%x==0&&b%==0)
cout<<c+1<<endl;
else
cout<<c<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '=' token
9 | if(a%x==0&&b%==0)
| ^
|
s757912044 | p03861 | C++ | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) repd(i, ... | a.cc: In function 'int main()':
a.cc:29:14: error: no matching function for call to 'max(ll&, int)'
29 | ans = max(ans, 0);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template... |
s630531446 | p03861 | C++ | #include <bits/stdc++.h>
#define i64 long long
using namespace std;
int main() {
// your code goes here
i64 a,b,x;
cin>>a>>b>>x;
if(b<a) swap(a,b);
printf("%lld\n", b/x - (max(0,a-1))/x);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:36: error: no matching function for call to 'max(int, long long int)'
9 | printf("%lld\n", b/x - (max(0,a-1))/x);
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-... |
s688779007 | p03861 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextInt();
long b = sc.nextInt();
int x = sc.nextInt();
int cnt = 0;
for(int i=a; i <= b; i++) {
if(i % x == 0) {
cnt++;
}
}
System.out.println(cnt);
}
} | Main.java:10: error: incompatible types: possible lossy conversion from long to int
for(int i=a; i <= b; i++) {
^
1 error
|
s682477267 | p03861 | Java | import java.util.Scanner;
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 = 0;
for(int i=a; i <= b; i++) {
if(i % x == 0) {
cnt++;
}
}
System.out.println(cnt);
}
| Main.java:16: error: reached end of file while parsing
}
^
1 error
|
s561334515 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
unsigned long long a,b,x;
cin>>a>>b>>x;
if(a%x=0){cout<<b/x+1-a/x;}
else{cout<<b/x-a/x;}
} | a.cc: In function 'int main()':
a.cc:6:7: error: lvalue required as left operand of assignment
6 | if(a%x=0){cout<<b/x+1-a/x;}
| ~^~
|
s602515178 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x;
cin>>a>>b>>x;
long ans=0;
cout<<b/x-max(0,(a-1)/x);
} | a.cc: In function 'int main()':
a.cc:7:16: error: no matching function for call to 'max(int, long long int)'
7 | cout<<b/x-max(0,(a-1)/x);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s621650629 | p03861 | C++ | #include<bits/stdc++.h>
long long a,b,x;
long long s,e;
int main(){
cin>>a>>b>>x;
if(a%x==0)s=a/x;
else s=a/x+1;
e=b/x;
cout<<e-s+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... |
s727156422 | p03861 | C++ | #include<cstdio>
long long a,b,x;
long long s,e;
int main(){
cin>>a>>b>>x;
if(a%x==0)s=a/x;
else s=a/x+1;
e=b/x;
cout<<e-s+1<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>x;
| ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
9 | cout<<e-s+1<<endl;
| ^~~~
a.cc:9:18: error: 'endl' was not declared in this scope
9 | cout<<e-s+1<<endl;
... |
s472839536 | p03861 | C++ | #include <iostream>
typedef long long int ll;
using namespace std;
int main() {
ll a, b, x;
cin >> a >> b >> x;
ll a_num=0, b_num;
if(a == b) cout << if(a%x == 0) << endl;
else if(x == 1 && a == 1) a_num = 2;
else if(a != 1) {
a--;
a_num = a/x;
}
b_num = b/x;
cout << b_num - a_num << endl;
... | a.cc: In function 'int main()':
a.cc:10:22: error: expected primary-expression before 'if'
10 | if(a == b) cout << if(a%x == 0) << endl;
| ^~
|
s877299277 | p03861 | C++ | #include<iostream>↲
#include<stdio.h>↲
#include<string>↲
#include <math.h>↲
using namespace std;↲
# define maxn 200000-↲
↲
int main(){↲
long long a,b,x,cnt(0);↲
cin>>a>>b>>x;↲
cout<<(b/x)-(a/x);↲
// int n,a[maxn],b[maxn],cnt(0),sum(0);↲
// cin>>n;↲
// for(int i(0);i<n;i++){↲
// cin>>a[i]>>b[i];↲
// }↲... | a.cc:1:9: error: extended character ↲ is not valid in an identifier
1 | #include<iostream>↲
| ^
a.cc:1:9: fatal error: iostream>��: No such file or directory
1 | #include<iostream>↲
| ^~~~~~~~~~~
compilation terminated.
|
s115610646 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, x;
cin >> a >> b >> x;
int count;
if (a !== 0){
count = (b - a + 1 )/ x;
}
else {
count = b / x;
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before '=' token
8 | if (a !== 0){
| ^
|
s439790271 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long int A,B,C;
int D=0;
cin >>A>>B>>C;
for(int i=A;i<=B;i++){
if(i==0) contiune;
if(i%C==0)D++;
}
cout << D;
} | a.cc: In function 'int main()':
a.cc:9:16: error: 'contiune' was not declared in this scope
9 | if(i==0) contiune;
| ^~~~~~~~
|
s605247008 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
unsigned long long int A,B,C,D=0;
cin >>A>>B>>C;
for(int i=A,i<=B;i++){
if(B%A==0)D++;
}
cout << D;
} | a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before '<=' token
7 | for(int i=A,i<=B;i++){
| ^~
| ;
a.cc:7:22: error: expected primary-expression before '<=' token
7 | for(int i=A,i<=B;i++){
| ^~
|
s600096303 | p03861 | C | #include <stdio.h>
int main(){
long long int a,b,x;
scanf("%lld %lld %lld", &a, &b, &x);
long long int ans = (b+x)/x-(a+-1x)/x;
printf("%lld\n", ans);
return 0;
} | main.c: In function 'main':
main.c:6:37: error: invalid suffix "x" on integer constant
6 | long long int ans = (b+x)/x-(a+-1x)/x;
| ^~
|
s286934027 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
cout.tie(0), cin.tie(0), ios::sync_with_stdio(0);
int a, b, x;
cin >> a >> b >> x;
a--;
a = max(0, a);
cout << b / x - a / x;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:16: error: no matching function for call to 'max(int, long long int&)'
14 | a = max(0, a);
| ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s049127091 | p03861 | C++ | #include<iostream>
using namespace std;
#define ll long long
int main()
{
ll a,b,x,y,z;
cin>>a>>b>>x;
y=a/x;
if(a%x!=0)y++;
z=b/x;
cout<<z-y+1;
return 0;
}
long long e=d/n-c/n+1;
if(e<=a||e<=b)
cout<<e;
return 0;
} | a.cc:14:21: error: 'd' was not declared in this scope
14 | long long e=d/n-c/n+1;
| ^
a.cc:14:23: error: 'n' was not declared in this scope
14 | long long e=d/n-c/n+1;
| ^
a.cc:14:25: error: 'c' was not declared in this scope
14 | lo... |
s759776377 | p03861 | C++ | #include<iostream>
using namespace std;
#define ll long long
int main()
{
ll a,b,x,y,z;
cin>>a>>b>>x;
y=a/x;
if(a%x!==0)y++;
z=b/x;
cout<<z-y+1;
return 0;
}
long long e=d/n-c/n+1;
if(e<=a||e<=b)
cout<<e;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '=' token
9 | if(a%x!==0)y++;
| ^
a.cc: At global scope:
a.cc:14:21: error: 'd' was not declared in this scope
14 | long long e=d/n-c/n+1;
| ^
a.cc:14:23: error: 'n... |
s932199341 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
double a,b,x;
cin >> a >> b >> x;
int sum=0;
for(double i=a;i<=b;i++){
if(i%x==0){
sum+=1;
}
}
cout << sum << endl;
} | a.cc: In function 'int main()':
a.cc:8:9: error: invalid operands of types 'double' and 'double' to binary 'operator%'
8 | if(i%x==0){
| ~^~
| | |
| | double
| double
|
s131330694 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,x;
cin >> a >> b >> x;
int sum=0;
for(int i=a;i=<b;i++){
if(i%x==0){
sum++;
}
}
cout << sum << endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '<' token
7 | for(int i=a;i=<b;i++){
| ^
|
s426082980 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,x;
cin >> a >> b >> x;
int sum=0;
for(i=a;i=<b;i++){
if(i%x==0){
sum++;
}
}
cout << sum << endl;
} | a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
7 | for(i=a;i=<b;i++){
| ^
a.cc:7:13: error: expected primary-expression before '<' token
7 | for(i=a;i=<b;i++){
| ^
|
s257309331 | p03861 | Java | package com.javalesson.chapter1.task0;
import java.util.*;
/**
* Создайте программу, которая будет принимать две группы параметров:
* - количество циклов выполнения программы;
* - 3 числа a, b, n
* и выводить на экран последовательность результатов вычисления следующего выражения
* (a + 2^0*b),(a + 2^0*b + 2^1*... | Main.java:31: error: class LoopTask is public, should be declared in a file named LoopTask.java
public class LoopTask {
^
1 error
|
s034357455 | p03861 | C++ | #include <stdio.h>
int main(void){
double a,b,x,c=0;
int i;
scanf("%f %f %f",&a,&b,&x);
for(i=a;i<=b;i++){
if(i%b==0)
c++;
}
printf("%d",c);
}
| a.cc: In function 'int main()':
a.cc:7:13: error: invalid operands of types 'int' and 'double' to binary 'operator%'
7 | if(i%b==0)
| ~^~
| | |
| | double
| int
|
s659755796 | p03861 | C++ | #include <stdio.h>
int main(void){
double a,b,x,c=0;
int i;
scanf("%ld %ld %ld",&a,&b,&x);
for(i=a;i<=b;i++){
if(i%b==0)
c++;
}
printf("%d",c);
} | a.cc: In function 'int main()':
a.cc:7:13: error: invalid operands of types 'int' and 'double' to binary 'operator%'
7 | if(i%b==0)
| ~^~
| | |
| | double
| int
|
s938949176 | p03861 | C++ | #include <iostream>
using namespace std;
const long long MAX_NUM = 999999999999;
int main() {
long long a, b, x;
cin >> a >> b >> x;
long long ans = 0;
if (x <= a) {
for (long long i = 2; i <= MAX_NUM; ++i) {
long long num = x* i;
if (num >= a){
ans += ((b - num) / x + 1);
break;... | a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s576525321 | p03861 | C++ | #include <iostream>
using namespace std;
const int MAX_ITER = 999999999;
int main() {
long long a, b, x;
cin >> a >> b >> x;
long long ans = 0;
for (long long i = a; i <= b; ++i) {
if (!(i % x)) {
flag = true;
++ans;
long long nowNum = i;
for (int j = 0; j < MAX_ITER; ++j) {
... | a.cc: In function 'int main()':
a.cc:11:7: error: 'flag' was not declared in this scope
11 | flag = true;
| ^~~~
|
s079030620 | p03861 | C++ | #include <iostream>
using namespace std;
const int MAX_ITER = 999999999;
int main() {
long long a, b, x;
cin >> a >> b >> x;
bool flag = false;
long long ans = 0;
for (long long i = a; i < b; ++i) {
if (!(i % x)) {
flag = true;
++ans;
long long nowNum = i;
for (int j = 0; j < MAX... | a.cc: In function 'int main()':
a.cc:17:13: error: 'nuwNum' was not declared in this scope; did you mean 'nowNum'?
17 | if (nuwNum < b) {
| ^~~~~~
| nowNum
|
s159013763 | p03861 | C++ | #include <iostream>
using namespace std;
const int MAX_ITER = 999999999;
int main() {
long long a, b, x;
cin >> a >> b >> x;
bool flag = false;
long long ans = 0;
for (long long i = a; i < b; ++i) {
if (!(i % x)) {
flag = true;
++ans;
long long nowNum = i;
for (int j = 0; j < MAX... | a.cc: In function 'int main()':
a.cc:16:20: error: expected ';' before 'if'
16 | nowNum *= i
| ^
| ;
17 | if (nuwNum < b) {
| ~~
a.cc:20:9: error: 'else' without a previous 'if'
20 | else {
| ^~~~
|
s875791095 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
long long a,b,x,ans;
cin >> a >> b >> x;
if(xa==0){
ans = b/x;
}else{
ans = (b/x)-(a-1)/x;
}
cout << ans;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:12: error: 'xa' was not declared in this scope; did you mean 'x'?
7 | if(xa==0){
| ^~
| x
|
s081667965 | p03861 | C++ | #include <cstdio>
using namespace std;
int main() {
long long a, b, x;
scanf("%lld %lld %lld", &a, &b, &x);
if (a == 0)
printf("%lld", b/x+1);
else
printf("%lld", b/x - (a-1))/x);
}
| a.cc: In function 'int main()':
a.cc:12:38: error: expected ';' before ')' token
12 | printf("%lld", b/x - (a-1))/x);
| ^
| ;
|
s514627523 | p03861 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
long long a, b, x;
scanf("%lld %lld %lld", &a, &b, &x);
printf("%lld", b/x - max(0, (a-1))/x);
}
| a.cc: In function 'int main()':
a.cc:10:29: error: no matching function for call to 'max(int, long long int)'
10 | printf("%lld", b/x - max(0, (a-1))/x);
| ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/bits/s... |
s705332507 | p03861 | C++ | #include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
long long a, b, x, res;
scanf("%lld %lld %lld", &a, &b, &x);
res = (b / x) - (max(0, (a - 1)) / x);
cout << res << '\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:10:25: error: no matching function for call to 'max(int, long long int)'
10 | res = (b / x) - (max(0, (a - 1)) / x);
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes... |
s366324623 | p03861 | C++ | #include<stdio.h>
#include<math.h>
using namespace std;
int main()
{
long long a, b, x, res;
scanf("%lld %lld %lld", &a, &b, &x);
res = (b / x) - ((a - 1) / x);
cout << res << '\n';
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:5: error: 'cout' was not declared in this scope
10 | cout << res << '\n';
| ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<math.h>
+++ |+#include <iostream>
3 | u... |
s965267760 | p03861 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long x = sc.nextInt();
long count = 0;
if (a == 0 && b == 0) {
count++;
} (a == 0)... | Main.java:12: error: not a statement
} (a == 0) {
^
Main.java:12: error: ';' expected
} (a == 0) {
^
Main.java:15: error: 'else' without 'if'
} else {
^
3 errors
|
s661930162 | 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 - a/x + 1;
}else{
cout << b/x - a/x;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '{' token
7 | if(a == 0{
| ^
| ;
a.cc:9:6: error: expected primary-expression before 'else'
9 | }else{
| ^~~~
a.cc:9:6: error: expected ')' before 'else'
9 | }else{
| ... |
s298754813 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long a, b, x;
cin >> a >> b >> x;
cout << b/x - max(0, a-1)/x;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: no matching function for call to 'max(int, long long int)'
7 | cout << b/x - max(0, a-1)/x;
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.