submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s835827230
p03861
C++
#include<iostream> using namespace std; int main(){ ll a,b,c; cin >> a >> b >> c; ll count = 0; for(int i = a;i <=b;i++){ if(i%c == 0)count++; } cout << count << endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'll' was not declared in this scope 4 | ll a,b,c; | ^~ a.cc:5:10: error: 'a' was not declared in this scope 5 | cin >> a >> b >> c; | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | cin >> a >> b >> c; | ...
s566035878
p03861
C++
#include <bits/stdc++.h> using namespace std; const long long mod = pow(10, 9) + 7; const long long INF = 1LL << 60; template <class T> bool chmin(T& a, T b){if (a > b) {a = b; return true;} return false;} template <class T> bool chmax(T& a, T b){if (a < b) {a = b; return true;} return false;} int divCeil(int A, int B)...
a.cc: In function 'int main()': a.cc:17:37: error: no matching function for call to 'max(long long int, int)' 17 | long long ans = (b / x + 1) - (max(a - 1, 0) / x + 1); | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include...
s863364121
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a, b; cin >> a >> b >> x; long long ans= b / x - (a - 1) / x; if (a == 0) ans++ cout << ans << "\n"; }
a.cc: In function 'int main()': a.cc:5:36: error: 'x' was not declared in this scope 5 | long long a, b; cin >> a >> b >> x; | ^ a.cc:7:20: error: expected ';' before 'cout' 7 | if (a == 0) ans++ | ^ | ; 8 | cou...
s622057528
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, x; cin >> a >> b >> x; long long minx = (a - 1) / x + 1, maxx = b / x; cout << max(0,maxx - minx + 1) << "\n"; }
a.cc: In function 'int main()': a.cc:7:14: error: no matching function for call to 'max(int, long long int)' 7 | cout << max(0,maxx - minx + 1) << "\n"; | ~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/...
s985696593
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, x; cin >> a >> b >> x; long long minx = (a - 1) / x + 1, maxx = b / x; cout << max(0,maxx - minx + 1) << "\n"; }
a.cc: In function 'int main()': a.cc:7:14: error: no matching function for call to 'max(int, long long int)' 7 | cout << max(0,maxx - minx + 1) << "\n"; | ~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/...
s284825685
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, x; cin >> a >> b >> x; minx = (a - 1) / x + 1; maxx = b / x; cout << maxx - minx + 1 << "\n"; }
a.cc: In function 'int main()': a.cc:6:3: error: 'minx' was not declared in this scope 6 | minx = (a - 1) / x + 1; maxx = b / x; | ^~~~ a.cc:6:27: error: 'maxx' was not declared in this scope 6 | minx = (a - 1) / x + 1; maxx = b / x; | ^~~~
s022995920
p03861
C++
#include <iostream> using namespace std; typedef long long int ll; int main(){ ll a,b,x; cin >> a >> b >> x; ll count = 0; if(a == 0){ cout << b/x << endl; return 0; } #include <iostream> using namespace std; typedef long long int ll; int main(){ ll a,b,x; cin >> a ...
a.cc: In function 'int main()': a.cc:20:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 20 | int main(){ | ^~ a.cc:20:9: note: remove parentheses to default-initialize a variable 20 | int main(){ | ^~ | -- a.cc:20:9: note: or re...
s068635209
p03861
C++
#include<iostream> using namespace std; int main() { unsigned long long int A,B,N; cin >> A >> B >> N; if(A = 0 || A % N = 0) { cout << B / N - A / N + 1<< endl; } else{ cout << B / N - A / N << endl; } }
a.cc: In function 'int main()': a.cc:7:12: error: lvalue required as left operand of assignment 7 | if(A = 0 || A % N = 0) { | ~~^~~~~~~~
s939293831
p03861
C++
#include<iostream> using namespace std; int main() { unsigned long long intA,B,N; cin >> A >> B >> N; if(A = 0) { cout << B / N - A / N + 1<< endl; } else{ cout << B / N - A / N << endl; } }
a.cc: In function 'int main()': a.cc:6:11: error: 'A' was not declared in this scope 6 | cin >> A >> B >> N; | ^
s703404112
p03861
C++
#include<iostream> using namespace std; int main() { int A B N; cin >> A >> B >> N; if(A = 0) { cout << B / N - A / N + 1<< endl; } else{ cout << B / N - A / N << endl; } }
a.cc: In function 'int main()': a.cc:5:10: error: expected initializer before 'B' 5 | int A B N; | ^ a.cc:6:11: error: 'A' was not declared in this scope 6 | cin >> A >> B >> N; | ^ a.cc:6:16: error: 'B' was not declared in this scope 6 | cin >> A >> B >> N; | ...
s658013975
p03861
C++
#include<iostream> #include<string> using namespace std; int main() { int a; int b; int x; cin>>a>>b>>x cout<< (b-a+1)/x <<endl; }
a.cc: In function 'int main()': a.cc:10:15: error: expected ';' before 'cout' 10 | cin>>a>>b>>x | ^ | ; 11 | cout<< (b-a+1)/x <<endl; | ~~~~
s241297777
p03861
C++
#include<iostream> #include<string> #define int longlong using namespace std; int main() { int a; int b; int x; cin>>a>>b>>x cout<< (b-a+1)/x <<endl; }
a.cc:3:13: error: 'longlong' does not name a type 3 | #define int longlong | ^~~~~~~~ a.cc:6:1: note: in expansion of macro 'int' 6 | int main() | ^~~
s457525780
p03861
C++
#include<iostream> #include<cmath> #include<vector> #include<set> #include<algorithm> #include<tuple> #include<utility> #include<cctype> #include<climits> #include<map> #include<queue> #include<functional> using namespace std; #define REP(i,a,n) for(int i=a;i<n;++i) #define RUP(a,b) ((a+b-1)/(b)) #define ENT "\n" #de...
a.cc:31:6: error: 'n' was not declared in this scope; did you mean 'yn'? 31 | ll f(n,x){if(n<0) return 0; | ^ | yn a.cc:31:8: error: 'x' was not declared in this scope 31 | ll f(n,x){if(n<0) return 0; | ^ a.cc:31:9: error: expression list treated as compound expression in initia...
s699471686
p03861
C++
#include<bits/stdc++.h> using namespace std; long long main(){ long long a,b,x,v=0; cin>>a>>b; cin>>x; for(long long i=a;i<=b;i++){ if(i%x==0){ v++; } } cout<<v; return 0; }
cc1plus: error: '::main' must return 'int'
s661907944
p03861
C++
#include <cmath> #include <iostream> #include <stdio.h> #include <string> #include <sstream> #include <iomanip> #include <algorithm> #include <vector> #include <set> #include <limits.h> #include <map> #include <numeric> namespace test { std::string to_string (char val) { return std::string (1, val); // return std...
a.cc: In function 'llint f(llint, llint)': a.cc:29:23: error: expected ';' before '}' token 29 | return n/x + 1 | ^ | ; 30 | } | ~
s403986111
p03861
C++
#include<iostream> using namespace std; int main(){ int a,b,x,count=0; cin>>a>>b>>x; for(int i=a;i<=b;++i){ if((double)i%(double)x==0)++count; } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:19: error: invalid operands of types 'double' and 'double' to binary 'operator%' 8 | if((double)i%(double)x==0)++count; | ~~~~~~~~~^~~~~~~~~~ | | | | double double
s127342675
p03861
C++
#include<iostream> using namespace std; int main(){ int a,b,x,count=0; cin>>a>>b>>x; for(int i=a;i<=b;++i){ if((double)i%x==0)++count; } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:19: error: invalid operands of types 'double' and 'int' to binary 'operator%' 8 | if((double)i%x==0)++count; | ~~~~~~~~~^~ | | | | double int
s429264230
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,x; cin << a << b << x; int count = 0; int N; a <= N <= b; for (int i = 0; i < b-a; i++) { if (N % x == 0) { count++; } cout << count << endl; } }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin << a << b << x; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:7: note: candidat...
s093650218
p03861
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { unsigned long long a, b, x; unsigned long long answ = 0; cin >> a >> b >> x; if(a%x==0){ answ=(b-a)/x+1; }else{ answ=(b-(a+x-a%x))/x+1; cout << answ << endl; }
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:7:12: note: to match this '{' 7 | int main() { | ^
s757177024
p03861
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<algorithm> #include<vector> #include<limits> #include<numeric> #include<type_traits> #include<math.h> using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define repi(i,a,b) for(int i = (int)(a...
a.cc: In function 'int main()': a.cc:26:16: error: no matching function for call to 'max(ll, int)' 26 | out(b/x-max(a-1,0)/x); | ~~~^~~~~~~ a.cc:17:26: note: in definition of macro 'out' 17 | #define out(str) cout << str << endl | ^~~ In file included from /usr...
s220132428
p03861
C++
#include<bits/stdc++.h> using namespace std; int main() { long long a,b,n; long long p,r; cin>>a>>b>>n; if(a%x==0) p=a/x; else p=a/n+1; r=b/n; cout<<r-p+1<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: 'x' was not declared in this scope 8 | if(a%x==0) | ^
s368161100
p03861
C++
#include<bits/stdc++.h> int main() { long long a,b,n; long long p,r; cin>>a>>b>>n; if(a%x==0) p=a/x; else p=a/n+1; r=b/n; cout<<r-p+1<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>n; | ^~~ | 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...
s507366095
p03861
C++
#include<bits/stdc++.h> using namespace std; int main() { long long a,b,x; long long s,t; cin>>a>>b>>c; if(a%x==0) s=a/x; else s=a/x+1; t=b/x; cout<<t-s+1<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: 'c' was not declared in this scope 7 | cin>>a>>b>>c; | ^
s281346854
p03861
Java
import java.util.*; 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(); long count = 0; for(int i = a;i <= b;i++){ if(i%x == 0){ count++; } } System.out....
Main.java:10: error: incompatible types: possible lossy conversion from long to int for(int i = a;i <= b;i++){ ^ 1 error
s696935947
p03861
C++
#include<iostream> using namespace std; int main(void){ long long A, B, N; cin >> A >> B >> C; cout << (B + N) / N - (A + N - 1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:20: error: 'C' was not declared in this scope 6 | cin >> A >> B >> C; | ^
s419326954
p03861
C++
#include<bits/stdc++.h> using namespace std; #define int long long singed main(){ int a, b, x; cin >> a >> b >> x; cout << b / x - a / x << endl; return 0; }
a.cc:6:1: error: 'singed' does not name a type; did you mean 'signed'? 6 | singed main(){ | ^~~~~~ | signed
s196656523
p03861
C++
#include<bits/stdc++.h> int main() { long long a,b,x; long long s,t; cin>>a>>b>>c; if(a%x==0) s=a/x; else s=a/x+1; t=b/x; cout<<t-s+1<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | 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...
s129530986
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 + 1; } else { ans = (b / x + 1) - ((a - 1) / x + 1); } cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:13: error: 'res' was not declared in this scope 13 | cout << res << endl; | ^~~
s606106560
p03861
C
#include<stdio.h> int main(){ int num=0,i,j,n,N,a,b,x; scanf("%d%d%d",&a,&b,&x); for(i=a;i<=b;i++){ if(i%x==0) num+=; } printf("%d",num); return 0; }
main.c: In function 'main': main.c:7:22: error: expected expression before ';' token 7 | num+=; | ^
s174535736
p03861
C
int main(void){ double a,b,c,d=0,count; scanf("%lf",&a); scanf("%lf",&b); scanf("%lf",&c); for(count=a;count==b;count++){ if(count%c==0){d++;} } printf("%f",d); return 0; }
main.c: In function 'main': main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%lf",&a); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:3:3: warning: incompati...
s998278496
p03861
C
int main(void){ double a,b,c,d=0,count; scanf("%lf %lf %lf",&a,&b,&c); for(count=a;count==b;count++){ if(count%c==0){d++;} } printf("%f",&d); return 0; }
main.c: In function 'main': main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%lf %lf %lf",&a,&b,&c); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:3:3: warn...
s144559710
p03861
C++
#include<iostream> using namespace std; int main(){ ll a, b, x; cin>>a>>b>>x; ll res = (b-a)/x; if(a%x==0)res++; return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'll' was not declared in this scope 4 | ll a, b, x; cin>>a>>b>>x; | ^~ a.cc:4:20: error: 'a' was not declared in this scope 4 | ll a, b, x; cin>>a>>b>>x; | ^ a.cc:4:23: error: 'b' was not declared in this scope 4 | ll a,...
s636582567
p03861
C++
#include <iostream> using namespace std; int main(){ unsigned long a,b,x; cin >> a >> b >> x; if (a % x == 0) cout << ( b / x - a / x + 1 ); else cout << ( b / x - a / x );
a.cc: In function 'int main()': a.cc:11:34: error: expected '}' at end of input 11 | else cout << ( b / x - a / x ); | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s937145459
p03861
C++
#include <iostream> using namespace std; int main(){ unsigned long a,b,x; cin >> a >> b >> x; if (a % x = 0) cout << ( b / x - a / x + 1 ); else cout << ( b / x - a / x );
a.cc: In function 'int main()': a.cc:9:9: error: lvalue required as left operand of assignment 9 | if (a % x = 0) | ~~^~~ a.cc:11:34: error: expected '}' at end of input 11 | else cout << ( b / x - a / x ); | ^ a.cc:5:11: note: to match this '{' 5 | int ...
s927752064
p03861
C
#include<stdio.h> int main(){ int num=0,i,j,n,N,a,b,x; scanf("%d%d%d",&a,&b,&x); for(i=a;i<=b;i++){ if(i%x==0) num+=; } printf("%d",num); return 0; }
main.c: In function 'main': main.c:7:22: error: expected expression before ';' token 7 | num+=; | ^
s585813226
p03861
C++
#include<bits/stdc++.h> #include<vector> #include<string> #include<iomanip> #include<algorithm> using namespace std; int main() { unsigned long long a,b,x,n,m; cin >> a >> b >> x; ans = 0; n = b/x+1; m = (a-1)/x+1; cout << n-m << endl; }
a.cc: In function 'int main()': a.cc:11:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | ans = 0; | ^~~ | abs
s862870051
p03861
C
#include<stdio.h> int main(){ int num=0,i,j,n,N,a,b,x; scanf("%d%d%d",&a,&b,&x); for(i=a;i<=b;i++){ if(i%x==0) num+=; } printf("%d",num); return 0; }
main.c: In function 'main': main.c:7:22: error: expected expression before ';' token 7 | num+=; | ^
s311871978
p03861
C
#include<stdio.h> int main(){ int num=0,i,j,n,N,a,b,x,num=0; scanf("%d%d%d",&a,&b,&x); for(i=a;i<=b;i++){ if(i%x==0) num+=; } printf("%d",num); return 0; }
main.c: In function 'main': main.c:3:33: error: redefinition of 'num' 3 | int num=0,i,j,n,N,a,b,x,num=0; | ^~~ main.c:3:13: note: previous definition of 'num' with type 'int' 3 | int num=0,i,j,n,N,a,b,x,num=0; | ^~~ main.c:7:22: error: expe...
s012933022
p03861
C++
#include<iostream> using namespace std; int main(){ unsigned __int64 a,b,x; cin>>a>>b>>x; int count=0; for(;a<=b;a++){ if(a%x==0){ count++; } } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:4:26: error: expected initializer before 'a' 4 | unsigned __int64 a,b,x; | ^ a.cc:5:14: error: 'a' was not declared in this scope 5 | cin>>a>>b>>x; | ^ a.cc:5:17: error: 'b' was not declared in this scope ...
s086167761
p03861
C
#include<stdio.h> int main(){ int a, b, x, i, count = 0; scanf("%d %d %d", &a, &b, &x) for(i = a; i <= b; i++){ if(i%x == 0){ count++; } } printf("%d\n", count); return 0; }
main.c: In function 'main': main.c:6:32: error: expected ';' before 'for' 6 | scanf("%d %d %d", &a, &b, &x) | ^ | ; 7 | 8 | for(i = a; i <= b; i++){ | ~~~
s124699778
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,x; cin >> a >> b >>x; int count = 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:19: error: expected primary-expression before '<' token 8 | for(int i = a ;i =< b;i++){ | ^
s001237423
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,x; cin >> a >> b >>x; int count = 0; for(int i = a ;i < b;i++){ if(i / x=0){ count++; } } cout << count <<endl; }
a.cc: In function 'int main()': a.cc:9:11: error: lvalue required as left operand of assignment 9 | if(i / x=0){ | ~~^~~
s433951521
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,x; cin >> a >> b >>x; int count = 0; for(i = a ;i < b;i++){ if(i / x=0){ count++; } } cout << count <<endl; }
a.cc: In function 'int main()': a.cc:8:5: error: 'i' was not declared in this scope 8 | for(i = a ;i < b;i++){ | ^
s545401310
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(); int geta = (a==0) ? 1 : 0: System.out.println(b/x-a/x +geta); } }
Main.java:8: error: ';' expected int geta = (a==0) ? 1 : 0: ^ 1 error
s366599690
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, x; cin >> a >> b >>x; int p, q; p = x*(a/x+1); q = x*(b/x-1): cout << (q-p)/x << endl; }
a.cc: In function 'int main()': a.cc:10:16: error: expected ';' before ':' token 10 | q = x*(b/x-1): | ^ | ;
s854254988
p03861
C++
#include <stdio.h> int main() { long long a,b,x,ans=0; scanf("%lld%lld%lld",&a,&b,&x); for(long long i=a,i<=b;i++) { if(i%x==0) { ans++; } } printf("%lld",ans); return 0; }
a.cc: In function 'int main()': a.cc:6:24: error: expected ';' before '<=' token 6 | for(long long i=a,i<=b;i++) | ^~ | ; a.cc:6:24: error: expected primary-expression before '<=' token 6 | for(long long i=a,i<=b;i++) | ...
s029276393
p03861
C++
#include<iostream> #include<algorithm> using namespace std; int main{ int a,b,x; cin>>a>>b>>x; int c=b/x; int d=a/x; cout<<c-d<<endl; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:5:3: error: expected primary-expression before 'int' 5 | int a,b,x; | ^~~ a.cc:5:3: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc:6:3: erro...
s463843106
p03861
C++
#include<iostream> #include<algorithm> using namespace std; int main{ int a,b,x; cin>>a>>b>>x; cout<<b/x-a/x<<endl; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:5:3: error: expected primary-expression before 'int' 5 | int a,b,x; | ^~~ a.cc:5:3: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc:6:3: erro...
s232180283
p03861
Java
import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); long a = sc.nextInt(); long b = sc.nextInt(); long x = sc.nextInt(); long count = 0; f...
Main.java:18: error: reached end of file while parsing } ^ 1 error
s414886856
p03861
C++
#include<iostream> using namespace std; int main(){ float a,b,x; float ans =0; cin>>a>>b>>x; for(int i =a;i<=b;i++){ if(!(i%x))ans++; } cout<<ans; }
a.cc: In function 'int main()': a.cc:8:11: error: invalid operands of types 'int' and 'float' to binary 'operator%' 8 | if(!(i%x))ans++; | ~^~ | | | | | float | int
s785793224
p03861
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; inline ll cnt(ll x, ll y) { return max(0, x / y + 1); } int main() { cin.tie(0); ios::sync_with_stdio(false); ll a, b, x; cin >> a >> b >> x; cout << cnt(b, x) - cnt(a - 1, x) << endl; return 0; }
a.cc: In function 'll cnt(ll, ll)': a.cc:7:39: error: no matching function for call to 'max(int, ll)' 7 | inline ll cnt(ll x, ll y) { return max(0, x / y + 1); } | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x8...
s467815781
p03861
C
#include <stdio.h> int main(void){ long long int a,b,x,d; scanf("%lld %lld %lld\n",&a,&b,&x); e=a/x-b/x; if(a%x==0){ e++; } printf("%lld\n",d); }
main.c: In function 'main': main.c:6:5: error: 'e' undeclared (first use in this function) 6 | e=a/x-b/x; | ^ main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
s203951400
p03861
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<cmath> using namespace std; int main() { long long int a, b, c; cin >> a >> b >>c; int ans = 0; if (a == 0) { cout << (b/c)+1 << endl; } else { cout << (b - (a - a % c)) / x << endl; } }
a.cc: In function 'int main()': a.cc:18:45: error: 'x' was not declared in this scope 18 | cout << (b - (a - a % c)) / x << endl; | ^
s972273196
p03861
C++
#include <iostream> using namespace std; long long a,b,x; int main(){ cin >> a >> b >> x; if(a==0) cout << b/x << endl; else cout << max(b/x - (a-1)/x,0) << endl; }
a.cc: In function 'int main()': a.cc:8:19: error: no matching function for call to 'max(long long int, int)' 8 | else cout << max(b/x - (a-1)/x,0) << endl; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes...
s459325771
p03861
C
#include<stdio.h> int fn(int n,int x) { if(n < 0){return 0;} else{return n/(x+1)} } int main(void) { int a,b,x; scanf("%d%d%d",&a,&b,&x); printf("%d",fn(b,x) - fn(a-1,x)); return 0; }
main.c: In function 'fn': main.c:6:22: error: expected ';' before '}' token 6 | else{return n/(x+1)} | ^ | ;
s733296275
p03861
C++
#include <iostream> using namespace std; int main(){ long a, b, x; cin >> a >> b >> x; if(a % x == 0){ cout << ( b - a ) / x + 1 << endl; }else{ cout << ( b - ( a - a % x ) / x << endl; } }
a.cc: In function 'int main()': a.cc:10:37: error: invalid operands of types 'long int' and '<unresolved overloaded function type>' to binary 'operator<<' 10 | cout << ( b - ( a - a % x ) / x << endl; | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ a.cc:10:44: error: expected ')' before ';' token 10 | ...
s472772997
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 ans = b/x + 1; if(l != 0){ ans += a/x + 1; } System.out.println(ans); } }
Main.java:11: error: cannot find symbol if(l != 0){ ^ symbol: variable l location: class Main 1 error
s815029079
p03861
C++
#include <iostream> #include <string> #include <math.h> #define MOD 1000000007 using namespace std; string replace_with_str(string str, string str_from, string str_to) { string::size_type pos = 0; while (pos = str.find(str_from, pos), pos != string::npos) { str.replace(pos, str_from.length(), str_to)...
a.cc: In function 'int main(int, const char**)': a.cc:21:29: error: expected ';' before '<=' token 21 | for(unsigned long i=a, i<=b; i++){ | ^~ | ; a.cc:21:29: error: expected primary-expression before '<=' token 21 | for(unsigned long i=...
s292088595
p03861
C++
#include <iostream> #include <string> #include <math.h> #define MOD 1000000007 using namespace std; string replace_with_str(string str, string str_from, string str_to) { string::size_type pos = 0; while (pos = str.find(str_from, pos), pos != string::npos) { str.replace(pos, str_from.length(), str_to)...
a.cc: In function 'int main(int, const char**)': a.cc:21:19: error: expected ';' before '<=' token 21 | for(int i=a, i<=b; i++){ | ^~ | ; a.cc:21:19: error: expected primary-expression before '<=' token 21 | for(int i=a, i<=b; i++){ | ...
s204468750
p03861
C++
#include <iostream> #include <string> #include <math.h> #define MOD 1000000007 using namespace std; string replace_with_str(string str, string str_from, string str_to) { string::size_type pos = 0; while (pos = str.find(str_from, pos), pos != string::npos) { str.replace(pos, str_from.length(), str_to)...
a.cc: In function 'int main(int, const char**)': a.cc:21:19: error: expected ';' before '<=' token 21 | for(int i=a, i<=b; i++){ | ^~ | ; a.cc:21:19: error: expected primary-expression before '<=' token 21 | for(int i=a, i<=b; i++){ | ...
s621603506
p03861
C++
#include <iostream> using namespace std; int main(){ long long a,b,c; long long cc=0; cin>>a>>b>>c; for(long long i=a;i<=b;i++){ if(i%x==0){ cc++; } } cout<<cc; return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: 'x' was not declared in this scope 10 | if(i%x==0){ | ^
s736204542
p03861
C++
#include<bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); ll a, b, x; cin >> a >> b >> x; cout << b/x+1-(a>0?(a-1)/x+1:0) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'll' was not declared in this scope 7 | ll a, b, x; | ^~ a.cc:8:16: error: 'a' was not declared in this scope 8 | cin >> a >> b >> x; | ^ a.cc:8:21: error: 'b' was not declared in this scope 8 | cin >...
s192227955
p03861
C++
#include <iostream> using namespace std; int main() { long long a, b, x, i, total; cin >> a >> b >> x; total = 0; for (i = a; i <= b; i++) { if (i%x == 0) toatal += 1; } cout << total << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: 'toatal' was not declared in this scope; did you mean 'total'? 10 | if (i%x == 0) toatal += 1; | ^~~~~~ | total
s121569957
p03861
C++
#include <iostream> using namespace std; int main() { long long a, b, x, i, toatal; cin >> a >> b >> x; total = 0; for (i = a; i <= b; i++) { if (i%x == 0) toatal += 1; } cout << total << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'total' was not declared in this scope; did you mean 'toatal'? 7 | total = 0; | ^~~~~ | toatal
s614336188
p03861
C++
#include <iostream> using namespace std; int main() { long long a, b, x, i, toatal; cin >> a >> b >> x; total = 0 for (i = a; i <= b; i++) { if (i%x == 0) toatal += 1; } cout << total << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'total' was not declared in this scope; did you mean 'toatal'? 7 | total = 0 | ^~~~~ | toatal a.cc:9:26: error: expected ';' before ')' token 9 | for (i = a; i <= b; i++) { | ^ | ;
s186350669
p03861
C++
#include <iostream> using namespace std; int main() { long long a, b, x, i toatal; cin >> a >> b >> x; total = 0 for (i = a; i <= b; i++) { if (i%x == 0) toatal += 1; } cout << total << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:24: error: expected initializer before 'toatal' 5 | long long a, b, x, i toatal; | ^~~~~~ a.cc:7:3: error: 'total' was not declared in this scope 7 | total = 0 | ^~~~~ a.cc:9:15: error: 'i' was not declared in this scope 9 | f...
s385950253
p03861
C
#include<bits/stdc++.h> using namespace std; int main(){ long long int s,a,b,n=0,x,c,d; scanf("%lld%lld%lld",&a,&b,&x); c=a/x; if(a>c*x){ n++; } d=b/x; s=d-c-n+1; printf("%lld\n",s); return 0; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s338245383
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int a,b,x; cin >> a >> b >> x; cout << b/x-max(0,(a-1))/x << endl; }
a.cc: In function 'int main()': a.cc:6:18: error: no matching function for call to 'max(int, long long int)' 6 | 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:5...
s411814083
p03861
C++
#include <iostream> #include <string> #define FOR(i, n) for(int i = 0;i <n;i++) #define RFOR(i, n) for(int i = n;i >= 0;i--) #define REP(i, m, n) for(int i = m;i < n;i++) #define RREP(i, m, n) for(int i = m;i >= n;i--) #define INF 999999999 using namespace std; int main(int argc, char const *argv[]) { int a,b,c; d...
a.cc: In function 'int main(int, const char**)': a.cc:18:9: error: invalid operands of types 'int' and 'double' to binary 'operator%' 18 | if(i%x == 0 ) | ~^~ | | | | | double | int
s204517027
p03861
C++
#include<string> using namespace std; int main(){ long int a,b,x; cin >> a >> b >> x; long int aa, bb; aa = a /x; bb = b / x; if (a%x==0){ aa--; } cout << bb - aa << endl; }
a.cc: In function 'int main()': a.cc:6:2: error: 'cin' was not declared in this scope 6 | cin >> a >> b >> x; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<string> +++ |+#include <iostream> 3 | using namesp...
s969328872
p03861
C++
#include<string> using namespace std; int main(){ long int a,b,x; cin >> a >> b >> x; long int aa, bb; aa = a /x; bb = b / x; if (a%x==0){ aa--; } cout << bb - aa << endl; }
a.cc: In function 'int main()': a.cc:6:2: error: 'cin' was not declared in this scope 6 | cin >> a >> b >> x; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<string> +++ |+#include <iostream> 3 | using namesp...
s347450739
p03861
C++
/// Containers Start #include <iostream> #include <string> #include <sstream> #include <set> #include <map> #include <unordered_map> #include <stack> #include <queue> #include <vector> #include <utility> #include <iomanip> #include <sstream> #include <bitset> #include <cstdlib> #include <iterator> #include <algorithm> ...
a.cc: In function 'int main()': a.cc:184:21: error: no matching function for call to 'max(ll, int)' 184 | cout << b/x -max((a-1),0)/x << nn; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s203245827
p03861
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; #define f(i,a,b,1) for(int i=a;i<=b;i++) #define f(i,a,b,-1) for(int i=a;i>=b;i--) int main() { int a,b,x,ans=0; cin>>a>>b>>x; f(i,a,b,1) { if(i%x==0) ans++;} cout<<ans<<endl;return 0; }
a.cc:6:17: error: expected parameter name, found "1" 6 | #define f(i,a,b,1) for(int i=a;i<=b;i++) | ^ a.cc:7:17: error: expected parameter name, found "-" 7 | #define f(i,a,b,-1) for(int i=a;i>=b;i--) | ^ a.cc: In function 'int main()': a.cc:12:11: error: 'i' was not ...
s500008053
p03861
C++
#include <cstdio> int main() { long long int a,b,x,s=0,i; scanf("%lld %lld %lld",&a,&b,&x); i=b; while(i<=b&&i>=a) { if(i%x!=0){i--;} else{ s=(i/d);} } printf("%lld",s); return 0;}
a.cc: In function 'int main()': a.cc:11:22: error: 'd' was not declared in this scope 11 | s=(i/d);} | ^
s422142922
p03861
C++
#include <cstdio> int main() { long long int a,b,x,s=0,i; scanf("%lld %lld %lld",&a,&b,&x); i=(a+b)/2; while(i<=b&&i>=a) { if(i%x!=0){i--;} else{ s=(i/d);} } printf("%lld",s); return 0;}
a.cc: In function 'int main()': a.cc:11:22: error: 'd' was not declared in this scope 11 | s=(i/d);} | ^
s219574812
p03861
C++
#include <cstdio> int main() { int a=0,b=0,x=0,i=0,s=0; scanf("%d %d %d",&a,&b,&x); if(i%x!=0) {i++;} for(i=a&&s=o;a<=i&&i<=b&&i%x==0;i++,s++) printf("%d",s); return 0;}
a.cc: In function 'int main()': a.cc:9:20: error: 'o' was not declared in this scope 9 | for(i=a&&s=o;a<=i&&i<=b&&i%x==0;i++,s++) | ^
s309532087
p03861
C++
#include<bits/stdc++.h> int main() { int a, b, x; cin >> a >> b >> x; int A, B, ans; A = a / x; B = b / x; ans = B - A; if (a%x == 0) { ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | 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...
s839433928
p03861
C++
#include <stdio.h> int main() { long long a,b,x,m,n; scanf ("%lld %lld %lld",&a,&b,&x); m = (a-1)/x; n = b/x; printf ("%lld\n",n-m);*/ return 0; }
a.cc: In function 'int main()': a.cc:8:29: error: expected primary-expression before '/' token 8 | printf ("%lld\n",n-m);*/ | ^ a.cc:9:9: error: expected primary-expression before 'return' 9 | return 0; | ^~~~~~
s576134397
p03861
C++
#include <cstdio> int main() { int a=0,b=0,x=0,i=0,s=0; scanf("%d %d %d",&a,&b,&x); i=a; s=0; while(a<=i&&i<=b){ if(i%x==0) {i++; s++;} else {i++;} } printf("%d",s); r
a.cc: In function 'int main()': a.cc:16:9: error: 'r' was not declared in this scope 16 | r | ^ a.cc:16:10: error: expected '}' at end of input 16 | r | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s568241935
p03861
C++
#include <cstdio> int main() { int a,b,x,i,s=0; scanf("%d %d %d",&a,&b,&x); i=a; s=0; while(a<=i&&i<=b){ if(i%x==0) {i++; s++;} else {i++;} } printf("%d",s); r
a.cc: In function 'int main()': a.cc:16:9: error: 'r' was not declared in this scope 16 | r | ^ a.cc:16:10: error: expected '}' at end of input 16 | r | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s425647330
p03861
C++
#include <bits/stdc++.h> using namespace std; long long a, b, x, cnt = 0; int main() { cin >> a >> b >> x; cout << b / x - max(0, (a - 1)) / x << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: no matching function for call to 'max(int, long long int)' 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...
s436289281
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){  long long int a,b,x; cin >>a>>b>>x; cout <<b/x-(a-1)/x <<endl; }
a.cc:4:12: error: extended character   is not valid in an identifier 4 | int main(){  | ^ a.cc: In function 'int main()': a.cc:4:12: error: '\U00003000' was not declared in this scope 4 | int main(){  | ^~ a.cc:6:9: error: 'a' was not declared in this scope 6 | cin >>a>>b...
s006986796
p03861
C++
#include <iostream> using namespace std; typedef long long ll; inline ll f(ll n) { if(-1==n) { return 0; } else { return n/x+1; } } int main() { ll a,b,x; cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc: In function 'll f(ll)': a.cc:13:26: error: 'x' was not declared in this scope 13 | return n/x+1; | ^
s681399543
p03861
C++
#include <iostream> using namespace std; typedef long long ll; inline f(ll n) { if(-1==n) { return 0; } else { return n/x+1; } } int main() { ll a,b,x; cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc:5:8: error: ISO C++ forbids declaration of 'f' with no type [-fpermissive] 5 | inline f(ll n) | ^ a.cc: In function 'int f(ll)': a.cc:13:26: error: 'x' was not declared in this scope 13 | return n/x+1; | ^
s778193062
p03861
C++
#include <iostream> using namespace std; typedef long long ll; ll a,b,x; inline f(ll n) { if(-1==n) { return 0; } else { return n/x+1; } } int main() { cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc:5:8: error: ISO C++ forbids declaration of 'f' with no type [-fpermissive] 5 | inline f(ll n) | ^
s303928050
p03861
C++
#include <iostream> using namespace std; typedef long long ll; ll a,b,x; inline f(ll n) { if(-1==n) { return 0; } else { return n/x+1; } } int main() { cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc:5:8: error: ISO C++ forbids declaration of 'f' with no type [-fpermissive] 5 | inline f(ll n) | ^
s283779712
p03861
C++
#include<bits/stdc++.h> using namespace std; long long a,b,x; inline long long f(long long n) { if(-1==n){ return 0; }else{ return n/x+1; } } int main(){ cin>>a>>b>>c; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:20: error: 'c' was not declared in this scope 13 | cin>>a>>b>>c; | ^
s092335143
p03861
C++
#include <iostream> using namespace std; typedef long long ll; ll f(ll n) { if(-1==n) { return 0; } else { return n/x+1; } } int main() { int a,b,x; cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc: In function 'll f(ll)': a.cc:12:26: error: 'x' was not declared in this scope 12 | return n/x+1; | ^
s286351808
p03861
C++
#include <iostream> using namespace std; typedef long long ll; ll f(ll n) { if(-1==n){ return 0; }else{ return n/x+1; } } int main() { cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc: In function 'll f(ll)': a.cc:9:26: error: 'x' was not declared in this scope 9 | return n/x+1; | ^ a.cc: In function 'int main()': a.cc:14:14: error: 'a' was not declared in this scope 14 | cin>>a>>b>>x; | ^ a.cc:14:17: error: 'b' wa...
s760998456
p03861
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; inline ll f(ll n){ if(-1==n){ return 0; }else{ return n/x+1 } } int main(){ ull a,b,x; cin>>a>>b>>x; cout<<f(b)-f(a-1)<<endl; return 0; }
a.cc: In function 'll f(ll)': a.cc:10:26: error: 'x' was not declared in this scope 10 | return n/x+1 | ^ a.cc:10:29: error: expected ';' before '}' token 10 | return n/x+1 | ^ | ; ...
s521319957
p03861
C++
#include<bits/stdc++.h> using namespace std; int a[101] int main(){ int n,i,j,x,sum=0; cin>>n>>x; for(i=1;i<=n;i++) cin>>a[i]; for(i=1;i<n;i++) for(j=2;j<=n;j++) if(a[j]-a[i]>xa[i]-a[j]>x) sum++; cout<<sum; return 0; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main(){ | ^~~
s821457504
p03861
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; int main(){ ull a,b,x; if(b%x==0&&a%x==0) cout<<(b-a)/x+1; return 0; } cout<<(b-a)/x+(a-b)/x; return 0; }
a.cc:12:5: error: 'cout' does not name a type 12 | cout<<(b-a)/x+(a-b)/x; | ^~~~ a.cc:13:9: error: expected unqualified-id before 'return' 13 | return 0; | ^~~~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s421423333
p03861
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; int main(){ ull a,b,x; if((b-a)%x==0){ cout<<(b-a)/c+1; return 0; } cout<<(b-a)/x; return 0; }
a.cc: In function 'int main()': a.cc:9:29: error: 'c' was not declared in this scope 9 | cout<<(b-a)/c+1; | ^
s589621369
p03861
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; int main(){ ull a,b,x; cout<<(a-b)/x; return 0;
a.cc: In function 'int main()': a.cc:9:18: error: expected '}' at end of input 9 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s336872637
p03861
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; int main(){ ull a,b,x; if((a-b)%x==0){ cout<<(a-b)/x; return 0; } else cout<<(a-b)/x; return 0;
a.cc: In function 'int main()': a.cc:13:18: error: expected '}' at end of input 13 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s307446287
p03861
C++
#include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; int main(void){ long long a,b,x; cin>>a>>b>>x; long long ans=0; if(b-a>=x) { if(a%x==0) {ans=b/x-a/x+1;} else {ans=b/x-a/x;} } else { if(a/x==b/x&&a%x!=0&&b%x!=0) ans=0; else ans=1; } } cout<<ans; return 0...
a.cc:19:1: error: 'cout' does not name a type 19 | cout<<ans; | ^~~~ a.cc:20:1: error: expected unqualified-id before 'return' 20 | return 0; | ^~~~~~ a.cc:21:1: error: expected declaration before '}' token 21 | } | ^
s431696499
p03861
C++
#include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; int main(void){ long long a,b,x; cin>>a>>b>>x; long long ans=0; if(b-a>=x) { if(a%x==0) {ans=b/x-a/x+1;} else {ans=b/x-a/x;} } else { if(a/x==b/x&&a%x!=0&&b%x!=0) ans=0; else ans=1; } } cout<<ans; return 0...
a.cc:19:1: error: 'cout' does not name a type 19 | cout<<ans; | ^~~~ a.cc:20:1: error: expected unqualified-id before 'return' 20 | return 0; | ^~~~~~ a.cc:21:1: error: expected declaration before '}' token 21 | } | ^
s054508823
p03861
C++
#include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; int main(void){ long long a,b,x; cin>>a>>b>>x; long long ans=0; if(b-a>=x) { if(a%x==0) {ans=b/x-a/x+1;} else {ans=b/x-a/x;} } else {for(int i=a;i<=b;i++){ if(i%x==0) ans++; } cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:6:15: note: to match this '{' 6 | int main(void){ | ^
s999665502
p03861
C++
#include<bits/stdc++.h> using ll = long long; #define int ll #define rep(i,n) for(int i=0;i<n;i++) #define loop(i,s,n) for(int i=s;i<n;i++) #define erep(e,v) for(auto && e :v) #define all(in) in.begin(), in.end() #define MP make_pair #define INF (sizeof(int) == 4 ? (int)1e9:(int)1e18) #define EPS 0.0000000001 using na...
a.cc: In function 'int main()': a.cc:25:35: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<' 25 | cout << (b/x-a/x+(a%x?0LL:1LL)<<endl; | ~~~~~~~~~~~~~~~~~~~~~^~~~~~ a.cc:25:41: error: expected ')' before ';' token ...
s331738037
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:18: error: expected ';' before '<=' token 6 | for(int i=a,i<=b,i++); | ^~ | ; a.cc:6:18: error: expected primary-expression before '<=' token 6 | for(int i=a,i<=b,i++); | ^~ a.cc:6:25: error: expe...