submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s671827852 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,x,z=0;
cin>>a>>b>>x;
for(int i=a,i<=b;i++)
if(i%x==0)
z++;
cout<<z<<endl;
return 0;
} | 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++)
| ^~
|
s246896540 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,x,z=0;
cin>>a>>b>>x;
for(int i=a,i<=b;i++)
if(i%x==0)
z++;
cout<<z<<endl;
return 0;
} | 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++)
| ^~
|
s450233571 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep2(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
ll a,b,x;cin>>a>>b>>x;b+=x;a+=x;
cout<<b/x-(a-1)/x<<endl;
... | a.cc: In function 'int main()':
a.cc:15:14: error: expected '}' at end of input
15 | return 0;
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s970503792 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
constexpr int64_t mod=1e9+7;
int main()
{
int64_t a,b,x;
cin>>a>>b>>x;
int64_t ans=b/x-a/x;
if(a%x==0s) ans++;
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:10:9: error: no match for 'operator==' (operand types are 'int64_t' {aka 'long int'} and 'std::chrono::seconds' {aka 'std::chrono::duration<long int>'})
10 | if(a%x==0s) ans++;
| ~~~^~~~
| | |
| | std::chrono::seconds {aka std::chrono::dur... |
s810557221 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a,b,x;
cin>>a>>b>>x;
cout<<b/x-max(0,a-1)/x<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'max(int, ll)'
8 | cout<<b/x-max(0,a-1)/x<<endl;
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s840395430 | p03861 | C++ | #include<bits/stdc++.h>
#define int long long
using namespace std;
int a,b,x,y,n=0;
int main()
{
cin>>a>>b>>x;
for(int i=a;i<=b;i++)
{
y=i;
if(y%x==0)n++;
}
cout<<n<<endl;
} | cc1plus: error: '::main' must return 'int'
|
s583169797 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
unsigned long long
int main () {
unsigned long long a, b, x, count = 0;
cin >> a >> b >> x;
for (unsigned long long i = a; i <= b; i++){
if ((i%x) == 0){
count++;
}
}
cout << count << endl;
} | a.cc:6:1: error: '::main' must return 'int'
6 | int main () {
| ^~~
|
s663786193 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
unsigned long long a, b, x, count = 0;
int main () {
cin >> a >> b >> x;
for (unsigned long long i = a; i <= b; i++){
if ((i%x) == 0){
count++;
}
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:10:7: error: reference to 'count' is ambiguous
10 | count++;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_... |
s028594936 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
unsigned long long a, b, x, count = 0;
int main () {
cin >> a >> b >> x;
for (unsigned long long i = a; i <= b; i++){
if (i%x == 0)
count++;
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:10:7: error: reference to 'count' is ambiguous
10 | count++;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_... |
s611787858 | p03861 | C++ | #include<bits/stdc++.h>
unsigned long long a, b, x, count = 0;
int main () {
cin >> a >> b >> x;
for (unsigned long long i = a; i <= b; i++){
if (i%x == 0)
count++;
}
cout << count << endl;
} | 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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: n... |
s613177089 | p03861 | C++ | #include<bits/stdc++.h>
unsigned long long a, b, x, count = 0;
int main () {
cin >> a >> b >> x;
for (unsigned long long i = a; i <= b; i++){
if (i%x == 0)
count++
}
cout << count << endl;
} | 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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: n... |
s908806154 | p03861 | C++ | #include<bits/stdc++.h>
unsigned long long a, b, count = 0;
int main () {
cin >> a >> b;
for (unsigned long long i = a; i <= b; i++){
if (i%x == 0)
count++
}
cout << count << endl;
} | 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;
| ^~~
| 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: note: ... |
s517155619 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void) {
long long a, b, x;
cin >> a >> b >> x;
if (a == 0) {
ans = b / x + 1;
cout << ans << endl;
}
else {
ans = b / x - (a - 1) / 2;
cout << ans << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | ans = b / x + 1;
| ^~~
| abs
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
14 | ans = b / x - (a - 1) / 2;
| ^~~
| abs
|
s533052446 | p03861 | C++ | include<bits/stdc++.h>
using namespace std;
int main(void) {
long long a, b, x;
cin >> a >> b >> x;
if (a == 0) {
ans = b / x + 1;
cout << ans << endl;
}
else {
ans = b / x - (a - 1) / 2;
cout << ans << 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:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> b >> x;
| ^~~
a.cc:9:5: error: 'ans' was not declared in this scope
9 | ans = b / x + 1;
| ... |
s352019043 | p03861 | C++ | #include <bits/stdc++.h>
#define SORT(x) sort((x).begin(),(x).end())
#define ALL(x) x.begin(),x.end()
#define db(x) cout<<#x<<"="<<x<<endl
#define rep(i, n) for(int i = 0; i < n; i++)
#define reps(i, m, n) for(int i = m; i < n; i++)
#define repr(i, m, n) for(int i = m; i >= n; i--)
#define INF (1e9)
#define PI (acos(-1... | a.cc: In function 'void Main()':
a.cc:20:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'})
20 | cin>>a>b>>x;
| ~~~~~~^~~~~
| | |
| | ll {aka long long int}
| ... |
s787352825 | p03861 | C++ | include <bits/stdc++.h>
using namespace std;
int main(void){
long long int a,b,x,c=0;
cin >> a >> b >> x;
if(a==0) c=1;
cout << b/x-(a-1)/x+c << 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:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> b >> x;
| ^~~
a.cc:8:3: error: 'cout' was not declared in this scope
8 | cout << b/x-(a-1)/x+c << endl... |
s679296358 | p03861 | C | #include<stdio.h>
int main()
{
int a,b,m,i,count=0;
scanf("%d %d %d",&a,&b,&m);
for(i=a;i<=b;i++)
{
if((i%m)==0)
{
count++;
i;
}}
printf("%d\n",count);
printf("There are %d integers between %d and %d, inclusive, that are divisible by %d:",count,a,b,m);
for(i=a;i<=b;... | main.c: In function 'main':
main.c:25:5: error: expected declaration or statement at end of input
25 | }
| ^
|
s772839732 | p03861 | C | #include<stdio.h>
int main()
{
long long int a,x,b,d;
int count=0
scanf("%lld%lld%lld",&a,&b,&x);
c=b/x-a/x;
if(a%x==0)
count++;
printf("%lld",c+count);
return 0;
}
| main.c: In function 'main':
main.c:6:5: error: expected ',' or ';' before 'scanf'
6 | scanf("%lld%lld%lld",&a,&b,&x);
| ^~~~~
main.c:7:5: error: 'c' undeclared (first use in this function)
7 | c=b/x-a/x;
| ^
main.c:7:5: note: each undeclared identifier is reported only once for each ... |
s222095044 | p03861 | C |
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ll a,b,x,result;
cin>>a>>b>>x;
while(a%x!=0 && a<=b)
{
a++;
}
result=(b-a)/x;
if(result!=0)
cout<<result+1<<endl;
else cout<<result<<endl;
}
| main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
2 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s577901137 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a,b,x;
cin>>a>>b>>x;
if(b-a>0&&(b-a)/x>=1){
cout<<(b-a)/x<<endl;
}
if(b-a>0&&(b-a)/x==0){
if((b/x-a/x)==1){
cout<<1<<endl;
}
else{
cout<<0<<endl;
}
if(a==b){
if(a%x==0){
cout<<1<<endl;
}
else{
... | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s951237662 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a,b;
cin>>a>>b;
if(b-a>0){
cout<<(b-a)/x)<<endl;
}
else{
cout<<0<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'x' was not declared in this scope
8 | cout<<(b-a)/x)<<endl;
| ^
|
s830999015 | p03861 | C | #include<stdio.h>
int main(){
int a,b,x;
scanf("%d %d %d",&a,&b,&c);
int i,j=0;
for(i=a;i<=b;i++){
if(i%x==0)j++;
}
printf("%d",j);
return 0;
} | main.c: In function 'main':
main.c:4:27: error: 'c' undeclared (first use in this function)
4 | scanf("%d %d %d",&a,&b,&c);
| ^
main.c:4:27: note: each undeclared identifier is reported only once for each function it appears in
|
s271399866 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int _main() {
long int a, b, x;
cin >> a >> b >> x;
long int n_a = a / x;
if(a % x == 0) --n_a;
long int n_b = b / x;
long int answer = n_b - n_a;
cout << answer << endl;
} | a.cc: In function 'int _main()':
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
13 | }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 ex... |
s313740905 | p03861 | C++ | #include "stdafx.h"
#include<math.h>
#include<map>
#include<iostream>
#include <algorithm>
#include <string>
#include<vector>
#include<array>
#include<tuple>
#include<queue>
#include<stack>
#include<iomanip>
#include<bitset>
#include <list>
#include<numeric>
//AtCoderC++.cpp
using namespace std;
inline int ceiling(in... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s145184455 | p03861 | C++ | #include "stdafx.h"
#include<math.h>
#include<map>
#include<iostream>
#include <algorithm>
#include <string>
#include<vector>
#include<array>
#include<tuple>
#include<queue>
#include<stack>
#include<iomanip>
#include<bitset>
#include <list>
#include<numeric>
//AtCoderC++.cpp
using namespace std;
inline int ceiling(in... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s871431969 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long a,b,x,s,e;
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:6:17: error: expected ';' before ')' token
6 | cin>>a>>b>>x);
| ^
| ;
|
s377222609 | p03861 | C++ | #include<cstdio>
long long a,b,x,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:11:5: error: 'cout' was not declared in this scope
11 | cout<<e-s+1<<endl;
| ^~~~
a.cc:11:18: error: 'endl' was not declared in this scope
11 | cout<<e-s+1<<endl;... |
s806477681 | p03861 | C++ | x,y,z = int(map(input().split))
print(y//z-(x-1)//z) | a.cc:1:1: error: 'x' does not name a type
1 | x,y,z = int(map(input().split))
| ^
|
s714778708 | p03861 | C++ | nclude<bits/stdc++.h>
using namespace std;
int main(){
long a,b,x;
cin>>a>>b>>x;
long ans;
if(a>0){
ans=(b/x)-(a-1)/x;
cout<<ans;
}
else{
ans=(b/x)+1;
cout<<ans;
}
} | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<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:9:1: error: 'cout' was not declared in this scope
9 | cout<<ans;
| ^~~~
a.cc:13:1: error: 'co... |
s988485819 | p03861 | C++ | nclude<bits/stdc++.h>
using namespace std;
int main(){
long a,b,x;
cin>>a>>b>>x;
long ans;
if(a>0){
ans=(b/x)-(a-1)/x;
cout<<ans;
}
else{
ans=(b/x)+1;
cout<<ans;
}
} | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<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:9:1: error: 'cout' was not declared in this scope
9 | cout<<ans;
| ^~~~
a.cc:13:1: error: 'co... |
s435912241 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long a,b,x;
cin>>a>>b>>x;
long ans;
if(a>0){
ans=(b/x)-(a-1)/2;
cout<<ans;
}
else{
ans=(b/2)+1
cout<<ans;
}
} | a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before 'cout'
12 | ans=(b/2)+1
| ^
| ;
13 | cout<<ans;
| ~~~~
|
s438824887 | p03861 | C++ | #include<bits/std c++.h>
using namespace std;
int main()
{
long long a,b,x;
scan f("%lld %lld %lld",&a,&b,&x);
long long ans;
if(a==0){
ans=(b/x)+1;
}
else{
ans=b/x-(a-1)/x;
}
printf("%lld",ans);
return 0;
} | a.cc:1:9: fatal error: bits/std c++.h: No such file or directory
1 | #include<bits/std c++.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
|
s444203586 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
long double a,b,c,ans,m=1;
int main(){
while(m){
cin>>a>>b>>c;
ans=(b-a)/c;;;;;;;
if(a%c==0)
ans++;
cout<<ans;
}
}
| a.cc: In function 'int main()':
a.cc:12:13: error: invalid operands of types 'long double' and 'long double' to binary 'operator%'
12 | if(a%c==0)
| ~^~
| | |
| | long double
| long double
|
s970897629 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a , x , c = 0 ;
long long y;
scanf("%ll %ll %ll", &a , &y , &x);
//cin>>a>>y>>x;
if((0<=a && c <= 10^18) && (1<=x<=10^18))
{
for(long long i = a ; i <= y ; i++)
{
if(i % x == 0)
{
c++;
}
}
}
printf("%d" , c);a
return 0;
} | a.cc: In function 'int main()':
a.cc:22:27: error: expected ';' before 'return'
22 | printf("%d" , c);a
| ^
| ;
23 |
24 | return 0;
| ~~~~~~
|
s205448579 | p03861 | C++ | #include<iostream>
using namespace std;
int main()
{
long long a,b,x,sum=0;
cin>>a>>b>>x;
if(a==b)
{cout<<"0";}
if(a!=b)
{
if((a%x!)=0)
{
if((b%x)==0)
{sum=((b-a)/x)+1;}
if((b%x)!=0)
{sum=(b-a)/x;}}
if(a%x==0)
{sum=((b-a)/x)+1;}
cout<<sum;}
return 0;} | a.cc: In function 'int main()':
a.cc:11:8: error: expected ')' before '!' token
11 | if((a%x!)=0)
| ~ ^
| )
a.cc:16:16: error: expected ')' before 'if'
16 | {sum=(b-a)/x;}}
| ^
| )
17 | if(a%x==0)
| ~~
a.cc:11:3: note: to mat... |
s920377914 | p03861 | C++ | #include<iostream>
using namespace std;
int main()
{
long long a,b,x,sum=0;
cin>>a>>b>>x;
if(a==b)
{cout<<"0";}
else
{
if(a%x!=0)
{
if(b%x==0)
{sum=((b-a)/x)+1;
else
sum=(b-a)/x;}
if(a%x==0)
sum=((b-a)/x)+1;
cout<<sum;}
return 0;} | a.cc: In function 'int main()':
a.cc:15:1: error: expected '}' before 'else'
15 | else
| ^~~~
a.cc:14:1: note: to match this '{'
14 | {sum=((b-a)/x)+1;
| ^
|
s545519018 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a, b, x;
cin >> a >> b >> x;
long long c = b / x;
long long d = a / x;
long long ans = c - d + 1; | a.cc: In function 'int main()':
a.cc:9:35: error: expected '}' at end of input
9 | long long ans = c - d + 1;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s154257934 | p03861 | C++ | #include <iostream>
#include <stdio.h>namespace std;
int main(){
long long a,b,x;
scanf("%lld%lld%lld",&a,&b,&x);
cout<<(b/x-(a-1)/x);
}
| a.cc:2:29: warning: extra tokens at end of #include directive
2 | #include <stdio.h>namespace std;
| ^~~
a.cc:2:10: fatal error: stdio.h>namespac: No such file or directory
2 | #include <stdio.h>namespace std;
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
|
s029443496 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,x;
cin>>a,b,x;
cout<<(b/x-(a-1)/x);
return0;}
| a.cc: In function 'int main()':
a.cc:8:1: error: 'return0' was not declared in this scope
8 | return0;}
| ^~~~~~~
|
s859121608 | p03861 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
long long a,b,x;
scanf("%lld%lld%lld",&a,&b,&x);
cout<<(b/x-(a-1)/x);
return0;}
| a.cc: In function 'int main()':
a.cc:8:1: error: 'return0' was not declared in this scope
8 | return0;}
| ^~~~~~~
|
s238275817 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,x;
scanf("%lld%lld%lld",&a,&b,&x);
cout<<( b/x-(a-1)/x);
return0;
| a.cc: In function 'int main()':
a.cc:7:1: error: 'return0' was not declared in this scope
7 | return0;
| ^~~~~~~
a.cc:7:9: error: expected '}' at end of input
7 | return0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s967564195 | p03861 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
long long a,b,x;
scanf("%lld%lld%lld",&a,&b,&x);
printf(b/x-(a-1)/x);
return0;
| a.cc: In function 'int main()':
a.cc:7:11: error: invalid conversion from 'long long int' to 'const char*' [-fpermissive]
7 | printf(b/x-(a-1)/x);
| ~~~^~~~~~~~
| |
| long long int
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c+... |
s791414607 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,x;
scanf("%lld%lld%lld",&a,&b,&x);
printf(b/x-(a-1)/x);
return0; | a.cc: In function 'int main()':
a.cc:6:11: error: invalid conversion from 'long long int' to 'const char*' [-fpermissive]
6 | printf(b/x-(a-1)/x);
| ~~~^~~~~~~~
| |
| long long int
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c+... |
s153067524 | p03861 | C++ | #include <iostream>
using namespace std;
int main (){
long long a,b,x;
scanf("%lld%lld%lld",&a,&b,&x);
printf(b/x-(a-1)/x);
return 0;
| a.cc: In function 'int main()':
a.cc:6:11: error: invalid conversion from 'long long int' to 'const char*' [-fpermissive]
6 | printf(b/x-(a-1)/x);
| ~~~^~~~~~~~
| |
| long long int
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c+... |
s192393912 | p03861 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
long a = in.nextLong();
long b = in.nextLong();
long x = in.nextLong();
long count=0;
for(int i=a;i<b;i++){
if(i%x==0){
count++;... | Main.java:9: error: incompatible types: possible lossy conversion from long to int
for(int i=a;i<b;i++){
^
1 error
|
s144371846 | p03861 | C++ | #include<iostream>
using namespace std;
int main()
{
long long a,b,x;
int cnt;
printf("Enter a value for a , b and x\n");
scanf("%lld%lld%lld",&a,&b,&x);
if(a==0){
ans=(b/x)+1;}
else
{
ans=((b/x)-(a-1)/x);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans=(b/x)+1;}
| ^~~
| abs
a.cc:13:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | ans=((b/x)-(a-1)... |
s915533450 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
long long a,b,x;
int cnt;
printf("Enter a value for a , b and x\n");
scanf("%lld%lld%lld",&a,&b,&x);
if(a==0){
ans=(b/x)+1;}
else
{
ans=((b/x)-(a-1)/x);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans=(b/x)+1;}
| ^~~
| abs
a.cc:13:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | ans=((b/x)-(a-1)... |
s794910705 | p03861 | Java | package vjudge;
import java.math.BigInteger;
import java.util.Scanner;
class Vjudge.java {
public static void main(String[] args) {
int one = 1;
BigInteger a;
BigInteger b;
BigInteger r;
int d;
Scanner input;
input = new Scanner(System.in);
a ... | Main.java:6: error: '{' expected
class Vjudge.java {
^
1 error
|
s226834547 | p03861 | Java | package vjudge;
import java.math.BigInteger;
import java.util.Scanner;
public class Vjudge {
public static void main(String[] args) {
// TODO code application logic here
int one = 1;
BigInteger a;
BigInteger b;
BigInteger r;
int d;
Scanner input;
... | Main.java:6: error: class Vjudge is public, should be declared in a file named Vjudge.java
public class Vjudge {
^
1 error
|
s330890296 | p03861 | Java | import java.math.BigInteger;
import java.util.Scanner;
public class Vjudge {
public static void main(String[] args) {
// TODO code application logic here
int one = 1;
BigInteger a;
BigInteger b;
BigInteger r;
int d;
Scanner input;
input = new S... | Main.java:4: error: class Vjudge is public, should be declared in a file named Vjudge.java
public class Vjudge {
^
1 error
|
s513204889 | p03861 | C++ | #include<iostream>
using namespace std;
int main()
{
long long a,b,x;
int ans;
cout<<"enter a:";
cin>>a;
cout<<"enter b:";
cin>>b;
cout<<"enter x:";
cin>>x;
if (a==0)
cout<<"wrong answer";
else
ans=b/x-(a-1)/x;
cout<<ans; | a.cc: In function 'int main()':
a.cc:17:11: error: expected '}' at end of input
17 | cout<<ans;
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s920586824 | 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(a!=0){
if(a%x==0)
sum=((b-a)/x)+1;
else
sum=(b-a)/x;
}
cout<<sum;
if(a==0)
{if(a%x==0)
sum=((b-a)/x);
else
sum=((b-a)/x)-1;
}
cout<<sum;
} | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s477052827 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int y=0;
long long a,b;
int x;
scanf("%lld%lld%d",&a &b &x);
for (int i =a;i<=b;i++)
{
if(a<=b&&a>=0){
if(a%x==0){
y++;
}
}
a++;
}
printf("%d",y);
}
| a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
7 | scanf("%lld%lld%d",&a &b &x);
| ~~ ^~
| | |
| | long long int
| long long... |
s599576659 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long A, B, X; //ここをlongにしないせいでずっとエラー吐いてた
long CC = 0;
cin >> A >> B >> X;
if (A > 0){
A -=;
CC = (B - A) / X;
}
else{
CC = B / X;
CC ++;
}
cout << CC << endl;
/* int i = 0;
int count = 0;
if (B < X){
cout << 0 <... | a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before ';' token
9 | A -=;
| ^
|
s809457686 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define REP(i, n) for(int i = 0; i < (n); i++)
#define SREP(i, s) for(int i = 0; i < (s.size()); i++)
#define SORT(v, n) sort(v, v+n);
#define GSORT(v, n) sort(v, v+n, greater<int>());
#define VSORT(v) sort(v.begin(),v.end());
#define VGSORT(v... | a.cc: In function 'int main()':
a.cc:23:22: error: no matching function for call to 'max(int, long long int)'
23 | cout << (b/c)-max(0,((a-1)/c))+ans << endl;
| ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++... |
s242756122 | p03861 | C++ | #include <iostream>using namespace std;int main(){ long long a,b,x; int N=0; cin>>a,b;
if(b>=a&&a>0&&b>0&&x>0){
cin>>x;}
for(long long i=x;i<=b;i++){
if(i%x==0)
N=N+1;}
cout<<N;
return 0;
} | a.cc:1:26: warning: extra tokens at end of #include directive
1 | #include <iostream>using namespace std;int main(){ long long a,b,x; int N=0; cin>>a,b;
| ^~~~~~~~~
a.cc:1:10: fatal error: iostream>usin: No such file or directory
1 | #include <iostream>using namespace std;int mai... |
s771500348 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
lon}g long a,b,x;
int n=0;
cin>>a,b,x;
for(long ongi=x; i<=b;i++){
if(b>=a&&i%x==0 )
n=n+1;}
cout<<n;
return 0;}
| a.cc: In function 'int main()':
a.cc:4:1: error: 'lon' was not declared in this scope; did you mean 'long'?
4 | lon}g long a,b,x;
| ^~~
| long
a.cc: At global scope:
a.cc:4:5: error: 'g' does not name a type
4 | lon}g long a,b,x;
| ^
a.cc:6:1: error: 'cin' does not name a type
6 | cin>... |
s995703696 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,x;
int n=0;
cin>>a,b,x;
for(long long i=x; i<=y;i++){
if(b>=a&&i%x==0 )
n=n+1;}
cout<<n;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:23: error: 'y' was not declared in this scope
7 | for(long long i=x; i<=y;i++){
| ^
|
s407763404 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,x;
int n=0;
cin>>a,b,x;
for(int i=x; i<=y;i++){
if(b>=a&&i%x==0 )
n++;}
cout<<n;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: 'y' was not declared in this scope
7 | for(int i=x; i<=y;i++){
| ^
|
s868174585 | p03861 | C++ | #include <stdio.h>
#include <iostream>
using namespace std ;
int main ( )
{
long long a,b;
int x ;
cin>>a>>b>>c;
int y =(b/x) - ((a-1)/x) ;
cout <<y ;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:9:20: error: 'c' was not declared in this scope
9 | cin>>a>>b>>c;
| ^
|
s789182581 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
double a,b,c;
long int r,o=0 ,s;
cin>>a>>b;
if((a>=0&&b>0))
if( (a<=b)&&(b<=(10^18)))
cin>>c;
if((c>=1)&&(c<=(10^18)))
if(a==b)
cout<<"0";
else
for(double h=a;h<=b;h++){
s=h;
r=c;
if(s%r==0)
o++;}
cout<<o;
return 0 ; | a.cc: In function 'int main()':
a.cc:8:24: warning: result of '10^18' is 24; did you mean '1e18'? [-Wxor-used-as-pow]
8 | if( (a<=b)&&(b<=(10^18)))
| ^
| ---
| 1e
a.cc:8:22: note: you can silence this warning by using a hexadecim... |
s238547226 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
double a,b,c;
int r,o=0 ,s;
cin>>a>>b;
if((a>=0&&b>0))
if( (a<=b)&&(b<=(10^18)))
cin>>c;
if((c>=1)&&(c<=(10^18)))
if(a==b)
cout<<"0";
else
for(double h=a;h<=b;h++){
s=h;
r=c;
if(s%r==0)
o++;}
cout<<o;
return 0 ; | a.cc: In function 'int main()':
a.cc:8:24: warning: result of '10^18' is 24; did you mean '1e18'? [-Wxor-used-as-pow]
8 | if( (a<=b)&&(b<=(10^18)))
| ^
| ---
| 1e
a.cc:8:22: note: you can silence this warning by using a hexadecim... |
s761509245 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
double a,b,c;
int s;
cin>>a>>b>>c;
if((a>=0&&b>=0)
if( (a<=b)&&(b<=(10^18))
if((c>=1)&&(c<=(10^18)))
if(a==b)
cout<<"0";
else
s=(a+b)/c;
cout<<s;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:7:24: error: expected ')' before 'if'
7 | if((a>=0&&b>=0)
| ~ ^
| )
8 | if( (a<=b)&&(b<=(10^18))
| ~~
|
s133738232 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int y=0;
long long a,b;
int x;
scanf("%lld%lld%d",&a &b &x);
for (int i =a;i<=b;i++)
{
if(a<=b&&a>=0){
if(a%x==0){
y++;
}
}
a++;
}
printf("%d",y);
} | a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
7 | scanf("%lld%lld%d",&a &b &x);
| ~~ ^~
| | |
| | long long int
| long long... |
s258927315 | p03861 | C++ | #include<bits\stdc++.h>
using namespace std;
int main()
{
long long a=0,b=0,x=0,c=0;
cin>>a>>b>>x;
if(a>0) {
a-=1;
c=(b/x)-(a/x);
}
else{
c=b/x;
c++;
}
cout<<c;
return 0;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s592029614 | 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++;
cout<<c;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s165379843 | 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++;
cout<<c;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s235062814 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int y=0;
long long a,b;
int x;
scanf("%lld%lld%d",&a &b &x);
for (int i =a;i<=b;i++)
{
if(a<=b&&a>=0){
if(a%x==0){
y++;
}
}
a++;
}
printf("%d",y);
} | a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
7 | scanf("%lld%lld%d",&a &b &x);
| ~~ ^~
| | |
| | long long int
| long long... |
s682929099 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int y=0;
long long a,b;
int x;
scanf("%lld%lld%d",&a &b &x);
for (int i =a;i<=b;i++)
{
if(a<=b&&a>=0){
if(a%x==0){
y++;
}
}
a++;
}
printf("%d",y);
} | a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
7 | scanf("%lld%lld%d",&a &b &x);
| ~~ ^~
| | |
| | long long int
| long long... |
s209381116 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
int y=0;
long long a,b;
int x;
scanf("%lld%lld%d",&a &b &x);
for (int i =a;i<=b;i++)
{
if(a<=b&&a>=0){
if(a%x==0){
y++;
}
}
a++;
}
printf("%d",y);
} | a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
7 | scanf("%lld%lld%d",&a &b &x);
| ~~ ^~
| | |
| | long long int
| long long... |
s980013236 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
int y=0;
long long a,b;
int x;
scanf("%lld%lld%d",&a &b &x);
for (int i =a;i<=b;i++)
{
if(a<=b&&a>=0){
if(a%x==0){
y++;
}
}
a++;
}
printf("%d",y);
}
| a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'long long int*' and 'long long int' to binary 'operator&'
7 | scanf("%lld%lld%d",&a &b &x);
| ~~ ^~
| | |
| | long long int
| long long... |
s764644234 | p03861 | C | #include <bits/stdc++.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);
return 0;
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s942181730 | p03861 | C | #include <bits/stdc++.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);
return 0;
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s580171944 | p03861 | C++ | #include <stdio.h>
#include <iostream>
using namespace std ;
int main ( )
{
long long a,b;
int x ;
cin>>a>>b>>c;
int y =(b/x) - ((a-1)/x) ;
cout <<y ;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:9:20: error: 'c' was not declared in this scope
9 | cin>>a>>b>>c;
| ^
|
s366569241 | p03861 | C++ | #include <string.h>
#include <iostream>
#include <bits/stdc++.h>
#include<conio.h>
using namespace std;
long long fun(long long a ,long long b ,long long x )
{
int count=0;
int i=a;
while(i<=b ){
if(i%x==0)
count++;
i++;
}
return count;
}
int main()
{
long long a,b,x;
cin>>a>>b>>x;
cout<<fun(a,b,x);
} | a.cc:4:9: fatal error: conio.h: No such file or directory
4 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s524358180 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
double a,b,x=0,c=0,k=0;
cin>>a>>b>>x;
if(((a>=0)&&(a<=b) &&(b<=10^18))&&((x>=1)&&(x<=10^18)))
for(c=a;c<=b;c++)
if(c%x==0)
++k;
cout<<k;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:21: error: invalid operands of types 'double' and 'double' to binary 'operator%'
8 | if(c%x==0)
| ~^~
| | |
| | double
| double
|
s571597917 | 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;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s266601527 | 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;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s910447189 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{long long a,b;cin>>a>>b>>x;int c,x;
if(a>0&&b>a)
{
for(int i=a;i<=b;i++)
{
if(i%x==0)
{c++;}
}
cout<<c;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:27: error: 'x' was not declared in this scope
4 | {long long a,b;cin>>a>>b>>x;int c,x;
| ^
|
s082329262 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
int x;
double long a;
double long b;
double long c=0 ;
cin>>a;
cin>>b;
cin>>x;
for(double long i=a;i<=b;i++){
if(i%x==0)
c++;
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:21: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
12 | if(i%x==0)
| ~^~
| | |
| | int
| long double
|
s956936774 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{long long a,b,x;cin>>a>>b>>x;
if(a>0&&b>a)
{for(int i=a;i<=b;i++)
{if(i%x==0)
{c++;}
}
cout<<c;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:2: error: 'c' was not declared in this scope
8 | {c++;}
| ^
a.cc:11:7: error: 'c' was not declared in this scope
11 | cout<<c;
| ^
|
s737201286 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x, r;
scanf("%lld%lld%lld",&a,&b,&x);
if(a==0){
r=(b/x)+1;
else
r=(b/x)-(a-1)/x;
printf("%lld",r);
} | a.cc: In function 'int main()':
a.cc:10:26: error: expected '}' before 'else'
10 | else
| ^~~~
a.cc:8:33: note: to match this '{'
8 | if(a==0){
| ^
|
s022542324 | p03861 | C | #include <stido.h>
using namespace std;
int countDivisibles(int A, int B, int M)
{
int counter = 0;
for (int i = A; i <= B; i++)
if (i % M == 0)
counter++;
return counter;
}
int main()
{
int A , B , M ;
scanf("%d %d %d ", &A , &B , &M );
printf(" %d ", countDivisib... | main.c:1:10: fatal error: stido.h: No such file or directory
1 | #include <stido.h>
| ^~~~~~~~~
compilation terminated.
|
s671624816 | p03861 | C | #include <bits/stdc++.h>
using namespace std;
int countDivisibles(int A, int B, int M)
{
int counter = 0;
for (int i = A; i <= B; i++)
if (i % M == 0)
counter++;
return counter;
}
int main()
{
int A , B , M ;
scanf("%d %d %d ", &A , &B , &M );
printf(" %d ", countD... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s273596923 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x;
int n=0;
scanf("%lld%lld%lld",&a,&b,&x);
for(int i=a ;i<=b ; i++){
if(i%x==0){
n++;}
printf("%d",n);
} | a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s628903590 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x;
int n=0;
scanf("%dl%dl%dl",&a,&b,&x);
for(int i=a ;i<=b ; i++){
if(i%x==0){
n++;}
printf("%d",n);
} | a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s939389165 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x;
int n=0;
scanf("%ll%ll%ll",&a,&b,&x);
for(int i=a ;i<=b ; i++){
if(i%x==0){
n++;}
printf("%d",n);
} | a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s980579928 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x;
int n=0;
scanf("%dll%dll%dll",&a,&b,&x);
for(int i=a ;i<=b ; i++){
if(i%x==0){
n++;}
printf("%d",n);
} | a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s967516839 | p03861 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
using namespace std;
int main(){
long long int a,b,x;
cin>>a>>b>>x;
long long int count=0;
long long int k=b/x+1;
long long int j=(a-1)/x+1;
if(a==0){
j=0;
}
count = x-y;
cout<<count<<endl;
/*for(int i=b;... | a.cc: In function 'int main()':
a.cc:21:19: error: 'y' was not declared in this scope
21 | count = x-y;
| ^
|
s397431011 | p03861 | C++ | long long z=0;
cin>>a>>b>>x;
if(a>=0 && a<=b)
{
if(b>=a && b<=pow(10,18))
{
if (1<=x){
if(a<b){
for(int i=a;i<=b;i++)
z=(b/x)-(a/x);
if(a%x==0){
z++;
cout<<z;
}
}
else if(a=b){
cout<<z;
}
}
}
}
return 0;
} | a.cc:2:9: error: 'cin' does not name a type
2 | cin>>a>>b>>x;
| ^~~
a.cc:3:9: error: expected unqualified-id before 'if'
3 | if(a>=0 && a<=b)
| ^~
a.cc:24:9: error: expected unqualified-id before 'return'
24 | return 0;
| ^~~~~~
a.cc:25:1: err... |
s682987246 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long a, b, x;
long long z=0;
cin>>a>>b>>x;
if(a>=0 && a<=b)
{
if(b>=a && b<=pow(10,18))
{
if (1<=x){
if(a<b){
for(int i=a;i<=b;i++)
z=(b/x)-(a/x);
if(a%x==0){
z++;
cout<<z;
}
}
else if(a=b){
... | a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:9:9: note: to match this '{'
9 | {
| ^
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s448800875 | p03861 | C | #include<bits\stdc++.h>
using namespace std;
int main(){
int a;
int b;
char x;
cin>>a>>x>>b;
// scanf("%d%c%d",&a,&x,&b);
switch(x){
case '-':
cout<<a-b;
break;
case '+':
cout<<a+b;
break;
}
return 0;
} | main.c:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s650646368 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long int a,b,x,n;
scanf("%lld %lld %lld" ,&a,&b,&x);
n=(b/x) - (a/x);
if(a%x == 0)
++n;
printf("%lld\n",n);
return 0;
} | a.cc:11:10: error: extended character is not valid in an identifier
11 | }
| ^
a.cc:11:10: error: '\U0000200f' does not name a type
11 | }
|
|
s123685919 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a,b,x,n;
scanf("%lld %lld %lld" ,&a,&b,&x);
n=(b/x) - (a/x);
if(a%x == 0)
++n;
printf("%lld\n",n);
return 0;
} | a.cc:11:10: error: extended character is not valid in an identifier
11 | }
| ^
a.cc:11:10: error: '\U0000200f' does not name a type
11 | }
|
|
s673910156 | p03861 | C | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,x ,n=0;
scanf("%lld%lld%lld",&a,&b,&x);
for(int i=a ;i<=b ; i++){
if(i%x==0){
n++;}
}
printf("%lld",n);
} | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s225668233 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long a,b,x,n;
scanf("%lld %lld %lld" ,&a,&b,&x);
n=(b/x) - (a/x);
if(a%x == 0)
++n;
printf("%lld\n",n);
return 0;
} | a.cc:11:10: error: extended character is not valid in an identifier
11 | }
| ^
a.cc:11:10: error: '\U0000200f' does not name a type
11 | }
|
|
s763540602 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long a,b,x,n;
scanf("%lld %lld %lld" ,&a,&b,&x);
n=(b/x) - (a/x);
if(a%x == 0)
++n;
printf("%lld\n",n);
return 0;
} | a.cc:11:10: error: extended character is not valid in an identifier
11 | }
| ^
a.cc:11:10: error: '\U0000200f' does not name a type
11 | }
|
|
s617206929 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
long long a,b,x,n;
scanf("%lld %lld %lld" ,&a,&b,&x);
n=(b/x) - (a/x);
if(a%x == 0)
++n;
printf("%lld\n",n);
}
| a.cc:10:10: error: extended character is not valid in an identifier
10 | }
| ^
a.cc:10:10: error: '\U0000200f' does not name a type
10 | }
|
|
s971519815 | p03861 | C++ | #include<bits/stdc++.h>
using 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: 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);
| ~~^~
| | |
| | long long int
... |
s827555772 | 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);
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.