submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s738172238
p03861
C++
#include <iostream> using namespace std; int main(void){ long int a, b, x, count; cin >> a >> b >> c; for(int i = a; i <= b; i++){ if(i % x == 0){ count++; } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:5:20: error: 'c' was not declared in this scope 5 | cin >> a >> b >> c; | ^
s675042695
p03861
C++
#include <iostream> using namespace std; int main(void){ long int a, b, x, count; cin >> a >> b >> c; for(int i = a; i <= b; i++){ if(i % x == 0){ count++; } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:5:20: error: 'c' was not declared in this scope 5 | cin >> a >> b >> c; | ^
s329188430
p03861
C++
a.cc:1:1: error: '\U00003042' does not name a type 1 | あ | ^~
s640028966
p03861
C++
a.cc:1:1: error: '\U00003042' does not name a type 1 | あ | ^~
s050076924
p03861
C++
/* ID: rchalam1 LANG: C++14 TASK: */ // For train.usaco.org, fill the template above. // Competitive Coding Template // GCC OPTIMIAZTION FLAGS #ifdef ONLINE_JUDGE #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #endif #include <bits/stdc++.h> /* #include <fstrea...
a.cc: In function 'int main(int, char**)': a.cc:114:44: error: expected primary-expression before ')' token 114 | cout << (a ? b / x - (a - 1) / x : ) << '\n'; | ^
s891922382
p03861
C++
#include <iostream> using namespace std; #define int long long int main(){ int a , b , x ; cin >> a >> b >> x ; x = max(1LL, x) ; int ans = b / x - (a - 1) / x ; cout << ans << endl; return 0 ; }
cc1plus: error: '::main' must return 'int'
s700757104
p03861
C++
#include <iostream> using namespace std; int main() { long long x, y, d; cin >> x >> y >> d; long long a = y / d; long long b = (x == 0 ? -1 : (x - 1) / d); cout << a - b << endl; return 0;
a.cc: In function 'int main()': a.cc:10:18: error: expected '}' at end of input 10 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s978515561
p03861
C++
#include <iostream> #include <string> using namespace std; int main() { string a, b, c, d; cin >> a >> b >> c; d = toupper(b[0]); cout << a[0] << hen << c[0] << endl; }
a.cc: In function 'int main()': a.cc:9:21: error: 'hen' was not declared in this scope 9 | cout << a[0] << hen << c[0] << endl; | ^~~
s597910688
p03861
C++
#include<bits/stdc++.h> using namespace std; long long a,b,x; long long f(n){ if(n>=0)return n/x+1; else return 0; } int main(){ std::cin>>a>>b>>x; std::cout<<f(b)-f(a-1); return 0; }
a.cc:4:13: error: 'n' was not declared in this scope; did you mean 'yn'? 4 | long long f(n){ | ^ | yn a.cc: In function 'int main()': a.cc:10:15: error: 'f' cannot be used as a function 10 | std::cout<<f(b)-f(a-1); | ~^~~ a.cc:10:20: error: 'f' cannot be u...
s653830365
p03861
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; using M = map<int, int> int main() { ll a, b, x; cin >> a >> b >> x; b = b / x; a = a - 1 / x; if(a < ...
a.cc:7:11: error: two or more data types in declaration of 'type name' 7 | using M = map<int, int> | ^~~~~~~~~~~~~
s091755961
p03861
Java
package com.company; import java.io.*; //import java.util.*; public class Main { //public class Betweenaandb { public static void main(String[] args) { out = new PrintWriter(new BufferedOutputStream(System.out)); MyScanner sc = new MyScanner();//start long a=sc.nextLong(); long b...
Main.java:34: error: cannot find symbol StringTokenizer st; ^ symbol: class StringTokenizer location: class MyScanner Main.java:43: error: cannot find symbol st = new StringTokenizer(br.readLine()); ^ symbol: class StringTokenizer location: cl...
s582233554
p03861
C
#include <iostream> using namespace std; int main() { long long int a, b, x,div,r,res; cin >> a >> b >> x; if(a == 0) { div = b / x; res = div + 1; cout << div; } else { div = b / x; r= (a - 1) / x; res = div - r; cout << res; } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s085460872
p03861
C++
#include<bits/stdc++.h> using namespace std; int main() { ll a, b, x, p, q, cnt=0; cin >> a >> b >> x; if(a%x==0) p = (a/x) - 1 ; else p=(a/x); q = b/x; cout<<q-p<<"\n" ; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'll' was not declared in this scope 6 | ll a, b, x, p, q, cnt=0; | ^~ a.cc:7:12: error: 'a' was not declared in this scope 7 | cin >> a >> b >> x; | ^ a.cc:7:17: error: 'b' was not declared in this scope 7 | cin >> a >> ...
s857724026
p03861
C
#include <bits/stdc++.h> using namespace std; int main () { long long a,b,c; cin>>a>>b>>c; long long r= b/c - a/c; if(a%c==0){ r++; } cout<<r; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s739862951
p03861
C++
# include<string> #include <iostream> using namespace std; int main(){ int n,a,x,c=0; cin>>n>>a>>x; if(n>a){ for(int i=0;i<=n;i++){ if(n<=a){ if((n)%x==0){ n+=1; c++; } else{ ...
a.cc: In function 'int main()': a.cc:28:3: error: expected '}' at end of input 28 | }} | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s598293522
p03861
C++
#include <iostream> int main(){ long int a, b, x, n=0; cin >> a >> b >> x; for(int i = a; i <= b; i++){ if(i%x == 0){ n = n + 1; } } cout << n << endl; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> a >> b >> x; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Lin...
s397113390
p03861
C++
#include <iostream> int main(){ int a, b, x, n=0; cin >> a >> b >> x; for(int i = a; i <= b; i++){ if(i%x == 0){ n = n + 1; } } cout << n << endl; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> a >> b >> x; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Lin...
s188354018
p03861
C++
#include <bits/stdc++.h> using namespace std; #define vit vector<int>::iterator #define pb push_back #define ppb pop_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define forn(i, n) for(int i = 0; i < int(n); i++) #define fr first #define sc second #define skip continue #define PI 3.14159265 typede...
a.cc: In function 'void solve()': a.cc:45:22: error: 'c' was not declared in this scope 45 | cin >> a >> b >> c; | ^
s274570802
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long A,B,X; cin >> A >> B >> X; if (!(A==B)){ cout << B/X-(A-1)/X << endl; } else { cout << 0 << endl; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s248124510
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { int64_t=a,b,x; cin >> a >> b >> x; if(a!=0) cout << b/x-(a-1)/x << endl; else cout << b/x+1 << endl; }
a.cc: In function 'int main()': a.cc:5:10: error: expected unqualified-id before '=' token 5 | int64_t=a,b,x; | ^ 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 in this scope 6 | cin >> a >> b >> x; ...
s905870800
p03861
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define ALL(x) (x).begin(),(x).end() const int IINF = 1e9; const LL LINF = 1e18; const LL MOD = 1e9+7; int main() { LL a, b, x; cin >> a >> b >> ...
a.cc: In function 'int main()': a.cc:16:22: error: no matching function for call to 'max(int, LL)' 16 | 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...
s909270240
p03861
C++
# include <bits/stdc++.h> typedef long long lint; using namespace std; lint gcd(lint x, lint y) { if(x == 0) { return y; } else { return gcd(y%x,x); } } lint lcm(lint x, lint y) { return x/gcd(x,y)*y; } lint C(lint n, lint k) { if(n == k) { return 1; } else if(n < k) { return 0; } else if(k == 0) { return ...
a.cc:35:3: error: expected unqualified-id before 'if' 35 | if(x == 1) { | ^~ a.cc:40:3: error: expected unqualified-id before 'if' 40 | if(b%x == 0 && a%x == 0) { cout << (b-a+1)/x+1 << endl; } | ^~ a.cc:41:3: error: expected unqualified-id before 'else' 41 | else { cout << (b-a+1)/x << e...
s080658875
p03861
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll a, b, x; cin >> a >> b >> x; ll ans; if (a != 0) { a--; ans = (b/x) - (a / x); cout << ans << endl; } else { ans = (b/x) - (a / x); cout << ans + 1 << 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; cin >> a >> b >> x; | ^~ a.cc:7:28: error: 'a' was not declared in this scope 7 | ll a, b, x; cin >> a >> b >> x; | ^ a.cc:7:33: error: 'b' was not ...
s229644898
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ int64_t a,b,x; cin >>a>>b>>x; int64_t count=0; for(int i=a;i<=b;i++){ if(i<x) continue; if(i % x==0)count++; }
a.cc: In function 'int main()': a.cc:13:4: error: expected '}' at end of input 13 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s501693649
p03861
C++
1 1000000000000000000 3
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 1000000000000000000 3 | ^
s227234780
p03861
C++
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int count(long long int a, long long int b,long long int x) { long long int c = b - a; long long int t = c / x; int p = 0; if (a % x == 0) { p ++; } if (b % x == 0) { p++; } if (c % x == 0 && p...
a.cc: In function 'int main()': a.cc:26:13: error: 't' was not declared in this scope 26 | cout << t << endl; | ^
s133880871
p03861
C++
#include<iostream> #include<cstring> #include<string> #include<algorithm> #include<cmath> #define debug(x) cout<<x<<"\n"; #define Max(a,b) ((a)>(b)?(a):(b)) typedef long long ll; const ll inf=0x3f3f3f3f3f3f; using namespace std; int main() { __int128_t x,a,b,cnt=0; cin>>a>>b>>x; for(__int128_t i=(a/x+1)*x;i<=b;) ...
a.cc: In function 'int main()': a.cc:14:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 14 | cin>>a>>b>>x; | ~~~^~~ | | | | | __int128 | std::istream {aka std::basic_istream<c...
s893345361
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ int64_t a,b,x; cin>>a>>b>>c; if(a%x==0) cout<<b/x-a/x+1<<endl; else cout<<b/x-a/x<<endl; }
a.cc: In function 'int main()': a.cc:6:14: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c; | ^
s776061971
p03861
C++
#include <iostream> using namespace std; int main() { long long a , b , c; cin>>a>>b>>c; if(c == 1){ cout<<(b - a + 1)<<"\n"; return; } long long f = b / c, s = (a - 1) / c; long long ans = f - s; if(a == 0)ans++; cout<<ans<<"\n"; }
a.cc: In function 'int main()': a.cc:8:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 8 | return; | ^~~~~~
s357482492
p03861
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) int main(){ ll a,b,x; cin>>a>>b>>x; ll p=a/x; ll q=b/x; if(a%==0)cout<<q-p+1<<endl; else cout<<q-p<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:11: error: expected primary-expression before '=' token 11 | if(a%==0)cout<<q-p+1<<endl; | ^
s290852807
p03861
C
#include <stdio.h> int main(void) { long long a,b,x,y=0; scanf("%lld%lld%lld",&a,&b,&x); if(a%x==0) f++; printf("%lld\n",b/x-a/x+f); return 0; }
main.c: In function 'main': main.c:8:20: error: 'f' undeclared (first use in this function) 8 | if(a%x==0) f++; | ^ main.c:8:20: note: each undeclared identifier is reported only once for each function it appears in
s435911803
p03861
C
#include <stdio.h> int main(void) { int i; float a,b,x,y; scanf("%f%f%f",&a,&b,&x); y=0; for(i=a;i<=b;i++){ if(((float)i%x)==0) y++; } printf("%f",y); return 0; }
main.c: In function 'main': main.c:12:22: error: invalid operands to binary % (have 'float' and 'float') 12 | if(((float)i%x)==0) y++; | ~~~~~~~~^ | | | float
s730514188
p03861
C
#include <stdio.h> int main(void) { int i; float a,b,x,y; scanf("%f%f%f",&a,&b,&x); y=0; for(i=a;i<=b;i++){ if((i%x)==0) y++; } printf("%f",y); return 0; }
main.c: In function 'main': main.c:12:15: error: invalid operands to binary % (have 'int' and 'float') 12 | if((i%x)==0) y++; | ^
s132885158
p03861
C
#include <stdui.h> int main(void) { int i; float a,b,x,y; scanf("%f%f%f",&a,&b,&x); y=0; for(i=a;i<=b;i++){ if((i%x)==0) y++; } printf("%f",y); return 0; }
main.c:1:10: fatal error: stdui.h: No such file or directory 1 | #include <stdui.h> | ^~~~~~~~~ compilation terminated.
s398731070
p03861
C
#include <stdio.h> int main(void) { float a,b,x,y; scanf("%f%f%f",&a,&b,&x); y=0; for(i=a;i<=b;i++){ if((i%x)==0) y++ } printf("%f",y); return 0; }
main.c: In function 'main': main.c:10:10: error: 'i' undeclared (first use in this function) 10 | for(i=a;i<=b;i++){ | ^ main.c:10:10: note: each undeclared identifier is reported only once for each function it appears in main.c:11:27: error: expected ';' before '}' token 11 | if((i%x...
s142218481
p03861
C
#include <stdui.h> int main(void) { float a,b,x,y; scanf("%f%f%f",&a,&b,&x); y=0; for(i=a;i<=b;i++){ if((i%x)==0) y++ } printf("%f",y); return 0; }
main.c:1:10: fatal error: stdui.h: No such file or directory 1 | #include <stdui.h> | ^~~~~~~~~ compilation terminated.
s853588511
p03861
C++
#include <bits/stdc++.h> using namespace std; signed main() { int64_t a, b, x; cin >> a >> b >> x; cout << b / x - max(a - 1, 0) / x << '\n'; }
a.cc: In function 'int main()': a.cc:7:22: error: no matching function for call to 'max(int64_t, int)' 7 | cout << b / x - max(a - 1, 0) / x << '\n'; | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc...
s285541477
p03861
C++
int main(){ int64_t a, b, x; cin >> a >> b >> x; int64_t num = 0; num = (b/x+1)-a/x; if (b%x!=0 && a!=0 && b!=0){num-=1;} // for (int i = a; i <= b; i++){ // if (i%x==0){num++;} // } cout << num << endl; }
a.cc: In function 'int main()': a.cc:2:3: error: 'int64_t' was not declared in this scope 2 | int64_t a, b, x; | ^~~~~~~ a.cc:1:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' +++ |+#include <cstdint> 1 | int main(){ a.cc:3:3: error: 'cin'...
s189121056
p03861
C++
#include <bits/stdc++.h> using namespace std; //long long using ll = long long; // pair<int, int> using PII = pair<int, int>; //最大値、mod const int MOD = 1000000007; const int mod = 1000000007; const int INF = 1000000000; const long long LINF = 1e18; const int MAX = 510000; //出力系 #define print(x) cout << x <<...
a.cc: In function 'int main()': a.cc:191:25: error: no matching function for call to 'max(ll, int)' 191 | ll ans = b / x - max((a - 1), 0) / x; | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s433613485
p03861
Java
package atcoder; import java.util.Scanner; /** https://atcoder.jp/contests/abc048/tasks/abc048_b */ public class B048 { /** 入力値A */ private static int a; /** 入力値B */ private static int b; /** 入力値X */ private static int X; /** * メインメソッド * * @param args 実行時引数 */ public static void main(S...
Main.java:6: error: class B048 is public, should be declared in a file named B048.java public class B048 { ^ 1 error
s852443987
p03861
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,x; cin>>a>>b>>x; if(a>=1){ cout<<b/x-(a-1)/x<<endl; } else{ cout<<b/x<<endl; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s260971703
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)/x<<endl; }
a.cc: In function 'int main()': a.cc:6:16: error: no matching function for call to 'max(int, long long int&)' 6 | cout<<b/x-max(0,a)/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, ...
s050192952
p03861
C++
#include<bits/stdc++.h> #define ll long long #define ld long double #define X first #define Y second #define pb push_back #define max_el(x) max_element(x.begin(),x.end())-x.begin() #define min_el(x) min_element(x.begin(),x.end())-x.begin() #define mp make_pair #define endl '\n' #define fastread ios_base::sync_with_std...
a.cc: In function 'void solve()': a.cc:19:9: error: expected ',' or ';' before 'if' 19 | if(a > 1){ | ^~
s488086273
p03861
C++
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() using ll = long long; #define vl vector<long long> #define vvl vector<vector<long long>> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using pll = pair<long long,long long...
a.cc: In function 'int main()': a.cc:84:11: error: 'Ans' was not declared in this scope 84 | cout<<Ans<<endl; | ^~~
s934310596
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a,b,x; cin >> a >> b >> x; long long amari=(b-a)/x; if (a%x>b%x || (a%x==0 && b%x==0) amari++; cout << amari << endl; }
a.cc: In function 'int main()': a.cc:8:36: error: expected ';' before 'amari' 8 | if (a%x>b%x || (a%x==0 && b%x==0) amari++; | ^~~~~~ | ; a.cc:9:24: error: expected ')' before ';' token 9 | cout << amari << endl; | ...
s328976939
p03861
C++
#include<bits/stdc++.h> using namespace std; int main(){ int64_t a,b,x; cin>>a>>b>>x; if(a!=0){ int64_t ans=(b/x)-((a-1)/x); cout<<ans<<endl; }else{ int64_t asn=1+(b/x); cout<<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'asn'? 11 | cout<<ans<<endl; | ^~~ | asn
s627081197
p03861
C++
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include<set> #include<map> using namespace std; const double PI = 3.141592653589793238463; int main() { long long a, b, x; cin >> a >> b >> x; while(a%x != 0){ a++; } while(b%x != 0){ b-...
a.cc: In function 'int main()': a.cc:21:16: error: no matching function for call to 'max(long long int, int)' 21 | cout << max((b-a)/x +1,0); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, f...
s531871497
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: In function 'int main()': a.cc:11:14: error: expected ';' before '}' token 11 | count++ | ^ | ; 12 | } | ~
s223167550
p03861
C++
#include<bits/stdc++.h> using namespace std; int main(){ ll a,b,x; cin>>a>>b>>x; ll ans= (b/x)-(a/x)+1; cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:4:2: error: 'll' was not declared in this scope 4 | ll a,b,x; | ^~ a.cc:5:8: error: 'a' was not declared in this scope 5 | cin>>a>>b>>x; | ^ a.cc:5:11: error: 'b' was not declared in this scope 5 | cin>>a>>b>>x; | ^ a.cc:5:14: err...
s148958192
p03861
C++
#include <iostream> using namespace std; int main() { long long int a; long long int b; long long int x; //while(cin>>a>>b>>x){ if(a==0 and b==0){ cout<<"1"<<endl; break; }else{ if(a==b or abs(a-b)<x){ cout<<"0"<<endl; break; }else{ if(a%x==0){ cout<<abs(b-a)/x+1<<endl; }else{...
a.cc: In function 'int main()': a.cc:11:25: error: break statement not within loop or switch 11 | break; | ^~~~~ a.cc:15:33: error: break statement not within loop or switch 15 | break; | ^~...
s367191780
p03861
C++
#include <iostream> using namespace std; int main() { long long int a; long long int b; long long int x; //while(cin>>a>>b>>x){ if(a==0 and b==0){ cout<<"1"<<endl; break; }else{ if(a==b or abs(a-b)<x){ cout<<"0"<<endl; break; }else{ if(a%x!=0 or b%x!=0){ cout<<abs(b-a)/x<<endl; ...
a.cc: In function 'int main()': a.cc:11:25: error: break statement not within loop or switch 11 | break; | ^~~~~ a.cc:15:33: error: break statement not within loop or switch 15 | break; | ^~...
s097406904
p03861
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define all(vec) vec.begin(), vec.end() #define END return 0 typedef int64_t ll; const int mod7 = 1e9 + 7; const int mod9 = 1e9 + 9; const int inf = 1 << 30; const ll INF = 1LL << 60; template<typename T> T gcd(T a, T b) {r...
a.cc: In function 'int main()': a.cc:20:24: error: no matching function for call to 'max(long long int, ll)' 20 | cout << b / x - max(0LL, a - 1) / x + (a == 0 ? 1 : 0) << endl; | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/...
s591444765
p03861
C++
#include <iostream> using namespace std; int main() { long long int a, b, c; cin >> a >> b >> c; long long int count = 0; if (a==b){ if (a%c==0){ cout << 1 << endl; } else{ cout << 0 << endl; } } else{ count = b/c-a/c; if (b%c==0 or a%c==0) cout ++; cout << count << endl; } }
a.cc: In function 'int main()': a.cc:17:52: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 17 | if (b%c==0 or a%c==0) cout ++; | ~~~~~^~
s518014303
p03861
C++
#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> #include <ctime> #include <algorithm> #include <bitset> #in...
a.cc: In function 'int main()': a.cc:70:19: error: 'k' was not declared in this scope 70 | cout << solve(b,k) - solve(a-1,k) << endl; | ^
s059922896
p03861
C++
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); long long int n,m,x,c=0, temp; cin>>n>>m>>x; temp= m/x - n/x; temp+= (n%x==0) cout<<temp; return 0; }
a.cc: In function 'int main()': a.cc:10:20: error: expected ';' before 'cout' 10 | temp+= (n%x==0) | ^ | ; 11 | cout<<temp; | ~~~~
s272017423
p03861
C++
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
a.cc: In function 'int main()': a.cc:18:17: error: 'ra1' was not declared in this scope 18 | {if(g%x==0){ra1=0;break;}} | ^~~ a.cc:20:16: error: 'ra2' was not declared in this scope 20 | if(w%x==0){ra2=0;break;}} | ^~~ a.cc:21:8: error: 'ra1' was not declared in ...
s024901374
p03861
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair <int, int> P; #define rep( i, n, m ) for(int i = ( n ); i < ( m ); i++) #define rep_d( i, n, m ) for(int i = ( n ) - 1; i >= ( m ); i--) #define sort_asc( X ) sort(( X ).begin(), ( X ).end()) #define sort_desc( X ) sort(( X ).begin(), ...
a.cc: In function 'int main()': a.cc:25:16: error: no matching function for call to 'max(int, ll&)' 25 | A = max(1, A); | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc...
s762657693
p03861
C++
#include<bits/stdc++.h> #define rep(i,N) for(int i=0;i<(N);i++) #define FOR(i,a,b) for(int i=(a);i<(b);i++) using namespace std; const long long MOD = 1e9 + 7; const long long INF = 1e12; const int inf = 1e9; typedef long long ll; typedef pair<ll,int> P; typedef set<int> S; ll a,b,x; int main(){ cin >> a >> b >> x;...
a.cc: In function 'int main()': a.cc:27:31: error: invalid operands of types 'const char [2]' and '<unresolved overloaded function type>' to binary 'operator<<' 27 | if(max1<min1) cout<"0"<<endl; | ~~~^~~~~~ a.cc:28:37: error: expected primary-expression before ')' token 2...
s250863831
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 ';' before '<=' token 8 | for(int i = a, i <= b; i++){ | ^~~ | ; a.cc:8:20: error: expected primary-expression before '<=' token 8 | for(int i = a, i <= b; i++){ | ^~
s503689999
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; b++){ if(i % x == 0)count++; } cout << count << endl; }
a.cc: In function 'int main()': a.cc:8:19: error: expected ';' before '<=' token 8 | for(int i = a, i <= b; b++){ | ^~~ | ; a.cc:8:20: error: expected primary-expression before '<=' token 8 | for(int i = a, i <= b; b++){ | ^~
s983585872
p03861
C++
#include<bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; #define REP(i, l, n) for(int i=(l), i##_len=(n); i<i##_len; ++i) #define ALL(x) (x).begin(),(x).end() #define pb push_back ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;} ll lcm(ll a,ll b){return a/gcd(a,b)*b;} char alpha[26] = ...
a.cc: In function 'int main()': a.cc:30:19: error: no matching function for call to 'max(ll, int)' 30 | ll d = max(a/c, 1), e = b/c; | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s360800972
p03861
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, x; cin >> a >> b >> x; cout << (b/x + 1) - max(0,((a-1)/x + 1)) << endl; }
a.cc: In function 'int main()': a.cc:7:26: error: no matching function for call to 'max(int, long long int)' 7 | cout << (b/x + 1) - max(0,((a-1)/x + 1)) << endl; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-li...
s164116268
p03861
C++
/** * author: qodjf * created: 04.17.2020 01:37:18 */ #include <bits/stdc++.h> using namespace std; int main() { ll a, b, x; cin >> a >> b >> x; a = (a + x - 1) / x * x; b = b / x * x; ll ans = (b - a) / x + 1; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:3: error: 'll' was not declared in this scope 9 | ll a, b, x; | ^~ a.cc:10:10: error: 'a' was not declared in this scope 10 | cin >> a >> b >> x; | ^ a.cc:10:15: error: 'b' was not declared in this scope 10 | cin >> a >> b >> x; | ...
s977193253
p03861
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define zero_pad(num) setfill('0') << std::right << setw(num) using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; int main() { ll a, b, x; cin >> a >> b >> x; cout << b / x - max(0, a - 1) / x ...
a.cc: In function 'int main()': a.cc:12:24: error: no matching function for call to 'max(int, ll)' 12 | 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...
s686645595
p03861
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll a,b,x;cin>>a>>b>>x; ll ans = b/x - max(0L, a-1)/x; cout<<ans; }
a.cc: In function 'int main()': a.cc:8:21: error: no matching function for call to 'max(long int, ll)' 8 | ll ans = b/x - max(0L, 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, ...
s194106829
p03861
C++
((input: string): void => { const [D, L] = [24, 3]; const new64 = (n) => [n % (1<<D), (n / (1<<D)) | 0, 0] const mul64s = (a, b) => { let r = []; let x = 0; for (let i = 0; i < L; i++) { x = a[i] * b + x; r[i] = x % (1<<D); x = Math.floor(x / (1<...
a.cc:129:29: error: empty character constant 129 | console.log(s.split('').reverse().join('')); | ^~ a.cc:129:48: error: empty character constant 129 | console.log(s.split('').reverse().join('')); | ^~ a.cc:142:12...
s447217412
p03861
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); long a=s.nextLong(); long b=s.nextLong(); long c=s.nextLong(); long count=0; for(int i=a;i<=b;i++){ if((i%c)==0){ count++; } } System.out.println(count); } }
Main.java:9: error: incompatible types: possible lossy conversion from long to int for(int i=a;i<=b;i++){ ^ 1 error
s884404550
p03861
C++
V#include<iostream> #include<stdio.h> #include<vector> #include<algorithm> #include<set> #include<string> #include<map> #include<string.h> #include<complex> #include<math.h> #include<queue> #include <functional> #include<time.h> #include <stack> #include<iomanip> using namespace std; #define rep(i,a,n) for(int i=(a);i<...
a.cc:1:2: error: stray '#' in program 1 | V#include<iostream> | ^ a.cc:1:1: error: 'V' does not name a type 1 | V#include<iostream> | ^ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/bits/stl_algo.h:71, from /usr/include/c++/14/algor...
s667435806
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:11:27: error: expected '}' at end of input 11 | cout << count << endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s104370924
p03861
C++
#include <bits/stdc++.h> using namespace std; int64_t divide(int64_t &n, int64_t &x){ if(n == 0) return 0; return n/x + 1; } int main() { int64_t a, b, x; cin >> a >> b >> x; cout << divide(b, x) - divide(a - 1, x) <<endl; }
a.cc: In function 'int main()': a.cc:12:35: error: cannot bind non-const lvalue reference of type 'int64_t&' {aka 'long int&'} to an rvalue of type 'int64_t' {aka 'long int'} 12 | cout << divide(b, x) - divide(a - 1, x) <<endl; | ~~^~~ a.cc:4:25: note: initializing argument ...
s290798255
p03861
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define INF 1e9 #define PI 3.14159265359 #define MOD 1000000007 #define ALL(v) v.begin(),v.end() typedef long long ll; //isPrime //modpow mod inv int main() { cout << fixed << setprecision(10); long long a,b,x; cin ...
a.cc: In function 'int main()': a.cc:15:26: error: no matching function for call to 'min(long long int, int)' 15 | long long ans = b/x-min(a-1,0)/x; | ~~~^~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s109541511
p03861
C++
#define rep(i, n) for(ll i = 0; i < n; i++) #include "bits/stdc++.h" using namespace std; using ll = long long; using P = pair<int, int>; int main() { ll a,b,x; cin >> a >> b >> x; cout << b / x - max(a - 1, 0) / x << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:28: error: no matching function for call to 'max(ll, int)' 11 | cout << b / x - max(a - 1, 0) / x << endl; | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/b...
s353513342
p03861
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define ll long long #define _GLIBCXX_DEBUG const ll MOD = 1000000007; ll f(ll n, llx) { if (n==1) return 0LL; else return n/x+1; } int main() { ll a, b, x; cin >> a >> b >> x; cout << f(b)-f(a-1) << endl; }
a.cc:8:12: error: 'llx' has not been declared 8 | ll f(ll n, llx) { | ^~~ a.cc: In function 'long long int f(long long int, int)': a.cc:10:17: error: 'x' was not declared in this scope 10 | else return n/x+1; | ^ a.cc: In function 'int main()': a.cc:16:12: error: too few ...
s281507778
p03861
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int a,b,x; cin >> a >> b >> x; if(a==b){ if(a%x==0) cout << 0 << endl; }else{ cout << 1 << endl; } }else if(a==0){ cout << 1 + b/x << endl; }else if(a%x==0 && b%x==0){ ...
a.cc:14:6: error: expected unqualified-id before 'else' 14 | }else if(a==0){ | ^~~~ a.cc:16:6: error: expected unqualified-id before 'else' 16 | }else if(a%x==0 && b%x==0){ | ^~~~ a.cc:18:6: error: expected unqualified-id before 'else' 18 | }else{ | ^~~~ a.cc:21:1: ...
s015937320
p03861
C++
#include <bits/stdc++.h> using namespace std; // define #Asukaminato is cute #define ll long long #define rep(i, m) for (int i = 0; i < (int)(m); i++) const int inf = 1000000000; // 10^9 Ten to the power of nine. int main(){ int main (){ ll a,b,x; cin >> a >> b >> x; ll left = (a-1)/x+1; if(a==0) lef...
a.cc: In function 'int main()': a.cc:10:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 10 | int main (){ | ^~ a.cc:10:18: note: remove parentheses to default-initialize a variable 10 | int main (){ | ^~ ...
s575175769
p03861
C++
#include<stdio.h> int a; int main() { int b,c,sum=0; scanf("%d%d%d",&a,&b,&c); for(int i=a;i<=b;i++) { if(i%c==0) sum++;n } printf("%d\n",sum); }
a.cc: In function 'int main()': a.cc:10:15: error: 'n' was not declared in this scope 10 | sum++;n | ^
s515245142
p03861
C++
a, b, x = map(int, input().split()) mind = (a // x + 1 if a % x != 0 else a // x) maxd = (b // x if b % x != 0 else b // x) if mind > maxd: print(0) else: print(maxd - mind + 1)
a.cc:1:1: error: 'a' does not name a type 1 | a, b, x = map(int, input().split()) | ^
s111742542
p03861
C++
#include<bits/stdc++.h> #define ll long long using namespace std; int main(){ ll a, b, x; cin >> a >> b >> x; cout << (b/x) - max((a-1)/x, 0) << "\n"; }
a.cc: In function 'int main()': a.cc:8:22: error: no matching function for call to 'max(long long int, int)' 8 | cout << (b/x) - max((a-1)/x, 0) << "\n"; | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bit...
s893107521
p03861
C++
import java.util.Scanner; public 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(); if (a % x == 0) System.out.println( (b / x) - (a / x) + 1); else...
a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 | public class Main { | ^~~~~~
s199453568
p03861
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,x; cin >> a >> b >> x; if(a == 0) cout << b/x+1; else cout << (b/x) - ((a-1)/x); << endl; }
a.cc: In function 'int main()': a.cc:8:35: error: expected primary-expression before '<<' token 8 | else cout << (b/x) - ((a-1)/x); << endl; | ^~
s426955046
p03861
C++
#include<iostream> int main(){ long a,b,x; std::cin>>a>>b>>x; std::cout<<(b/x - a/x +(a%x==0))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | std::cout<<(b/x - a/x +(a%x==0))<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:4...
s324061916
p03861
C++
#include <bits/stdc++.h> using namespace std; int check(int a,int x){ if (a == -1) return 0; else return (n + x) / x; } int main() { int a,b,x; cin >> a >> b >> x; cout << check(b,x) - check(a - 1,x) << endl; return 0; }
a.cc: In function 'int check(int, int)': a.cc:6:16: error: 'n' was not declared in this scope 6 | else return (n + x) / x; | ^
s270654772
p03861
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) #define rep2(i,n) for(int i=0;i<=n;i++) #define repr(i,a,n) for(int i=a;i<n;i++) #define all(a) a.begin(),a.end() #define P pair<long long,long long> #define double long doub...
a.cc: In function 'int main()': a.cc:19:8: error: 'a' was not declared in this scope 19 | cin>>a>>b>>c; | ^ a.cc:19:11: error: 'b' was not declared in this scope 19 | cin>>a>>b>>c; | ^ a.cc:19:14: error: 'c' was not declared in this scope 19 | cin>>a>>b>>c; | ...
s409352547
p03861
C++
#include <bits/stdc++.h> using namespace std; int f(int a,int x){ if (a == -1)return 0; else return((a/x) + 1); } int main() { long long a,b,x; cin >> a >> b >> x; cout << f(b,x) - f(a - 1,x) return 0; }
a.cc: In function 'int main()': a.cc:11:30: error: expected ';' before 'return' 11 | cout << f(b,x) - f(a - 1,x) | ^ | ; 12 | return 0; | ~~~~~~
s118019454
p03861
C
#include<stdio.h> int main(void){ double a,b,n; int cnt=0; scanf("%lf %lf %lf",&a,&b,&n); while(a<=b){ if((int(a%n))==0){ cnt++; } a+=1.0; } printf("%d",cnt); return 0; }
main.c: In function 'main': main.c:7:13: error: expected ')' before 'a' 7 | if((int(a%n))==0){ | ^ | )
s520817019
p03861
C
#include<stdio.h> int main(void){ double a,b,n; int cnt=0; scanf("%lf %lf %lf",&a,&b,&n); while(a<=b){ if(int(a%n)==0){ cnt++; } a+=1.0; } printf("%d",cnt); return 0; }
main.c: In function 'main': main.c:7:8: error: expected expression before 'int' 7 | if(int(a%n)==0){ | ^~~
s292096594
p03861
C
#include<stdio.h> int main(void){ double a,b,n; int cnt=0; scanf("%lf %lf %lf",&a,&b,&n); while(a<=b){ if((int(a%n))==0){ cnt++; } a+=1.0; } printf("%d",cnt); return 0; }
main.c: In function 'main': main.c:7:13: error: expected ')' before 'a' 7 | if((int(a%n))==0){ | ^ | )
s536126478
p03861
C
#include<stdio.h> int main(void){ double a,b,n; int cnt=0; scanf("%lf %lf %lf",&a,&b,&n); while(a<=b){ if(a%n==0){ cnt++; } a+=1.0; } printf("%d",cnt); return 0; }
main.c: In function 'main': main.c:7:9: error: invalid operands to binary % (have 'double' and 'double') 7 | if(a%n==0){ | ^
s961459751
p03861
C
#include<stdio.h> int main(void){ double a,b,n; int cnt=0; scanf("%lf %lf %lf",&a,&b,&n); while(a<=b){ if((a%n)==0){ cnt++; } a+=1.0; } printf("%d",cnt); return 0; }
main.c: In function 'main': main.c:7:10: error: invalid operands to binary % (have 'double' and 'double') 7 | if((a%n)==0){ | ^
s396624613
p03861
C
#include<stdio.h> int main(void){ double a,b,n; int cnt=0; scanf("%f %f %f",&a,&b,&n); while(a<=b){ if((a%n)==0){ cnt++; } a++; } printf("%d",cnt); return 0; }
main.c: In function 'main': main.c:7:10: error: invalid operands to binary % (have 'double' and 'double') 7 | if((a%n)==0){ | ^
s244018095
p03861
C++
#include<iostream> using namespace std; int main(){ int a,b,n,co = 0; cin >> a >> b >> n; for(i=a; a<=b; ++i){ if(i%n == 0){ co += 1; } } cout << co << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | for(i=a; a<=b; ++i){ | ^
s110993142
p03861
C
#include<iostream> using namespace std; int main(){ int a,b,n,co = 0; cin >> a >> b >> n; for(i=a; a<=b; ++i){ if(i%n == 0){ co += 1; } } cout << co << endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s535457330
p03861
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <numeric> #include <string> #include <complex> #include <algorithm> #include <iostream> #include <vector> #include <bitset> #include <deque> #include <queue> #include <map> #include <utility> #include <functional> #include <iomanip> #inc...
a.cc: In function 'int main()': a.cc:210:22: error: no matching function for call to 'max(int, ll)' 210 | cout << k/m - max(0,(n-1))/m << "\n"; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, ...
s616423211
p03861
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (int)(n); i++) using namespace std; typedef long long int ll; typedef pair<int, int> P; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } retur...
a.cc: In function 'int main()': a.cc:15:13: error: no matching function for call to 'max(long long int, int)' 15 | res -= max(a - 1, 0) / x; | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s553254924
p03861
C++
//失敗するからこそそこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから // ぜったいあきらめない #include<bits/stdc++.h> using namespace std; #if !defined(ONLINE_JUDGE) #include "/home/ichigo/debug.hpp" #define deb(x...) cerr << "[" << #x << "] = ["; _print(x) #else #define deb(x...) #endif #define FIO {ios::sync_with_stdio(0);cin.tie(nullptr);cout.ti...
a.cc:7:10: fatal error: /home/ichigo/debug.hpp: No such file or directory 7 | #include "/home/ichigo/debug.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s899736736
p03861
C
#include<stdio.h> int main() { long long int a,b,x; long long int con; scanf("%lld %lld %lld",&a,&b,&x); con=b/x-(a-1)/x; if() con++; printf("%lld",con); return 0; }
main.c: In function 'main': main.c:10:6: error: expected expression before ')' token 10 | if() con++; | ^
s260416240
p03861
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> using namespace std; int f(int n,int x); int main(){ long a,b,x; cin >> a >> b >> x; long count; count = f(b,x)-f(a-1,x); cout << count << endl; } long f(long n,long x){ if(n==-1){ return 0; ...
/usr/bin/ld: /tmp/ccF9NNrl.o: in function `main': a.cc:(.text+0x52): undefined reference to `f(int, int)' /usr/bin/ld: a.cc:(.text+0x6a): undefined reference to `f(int, int)' collect2: error: ld returned 1 exit status
s341240314
p03861
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) #define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++) #define memi cout << endl #define kono(n) cout << fixed << setprecision(n) #define all(c) (c).begin(), (c).end() #define pb push_back #define hina c...
a.cc: In function 'int main()': a.cc:20:18: error: no matching function for call to 'max(int, ll)' 20 | out(b / c - max(0, a - 1) / c); | ~~~^~~~~~~~~~ a.cc:14:24: note: in definition of macro 'out' 14 | #define out(n) cout << n | ^ In file included from /usr/inc...
s800304307
p03861
C++
import sys # import math # import decimal # import queue # import bisect # import heapq # import time # import itertools # from fractions import Fraction mod = int(1e9+7) INF = 1<<29 def main(): a,b,x = map(int,input().split()) l = (a + x - 1) // x r = (b + x - 1) // x ans = r - l if b%x==0: ...
a.cc:2:3: warning: #import is a deprecated GCC extension [-Wdeprecated] 2 | # import math | ^~~~~~ a.cc:2:10: error: #import expects "FILENAME" or <FILENAME> 2 | # import math | ^~~~ a.cc:3:3: warning: #import is a deprecated GCC extension [-Wdeprecated] 3 | # import decimal | ...
s972702065
p03861
C++
#include <iostream> #include <string> using namespace std; int main() { unsigned long long a, b, x; cin >> a >> b >> x; unsigned long long answer = (b - a) / x; if (a % x == 0 || b % x == 0) answer++; cout << answer; return 0
a.cc: In function 'int main()': a.cc:18:13: error: expected ';' at end of input 18 | return 0 | ^ | ; a.cc:18:13: error: expected '}' at end of input a.cc:7:1: note: to match this '{' 7 | { | ^