submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s794280338
p04011
C
#include<stdio.h> int main(void) { int n,k,x,y; printf(""); scanf("%d", &n); printf(""); scanf("%d", &k); printf(""); scanf("%d", &x); printf(""); scanf("%d", &y); printf("%d", k * x - (n - k) * y)); return 0; }
main.c: In function 'main': main.c:9:36: error: expected ';' before ')' token 9 | printf("%d", k * x - (n - k) * y)); | ^ | ; main.c:9:36: error: expected statement before ')' token
s292429297
p04011
C
#include<stdio.h> int main(void) { int n,k,x,y; printf(""); scanf("%d", &n); printf(""); scanf("%d", &k); printf(""); scanf("%d", &x); printf(""); scanf("%d", &y); printf("%d", (n * k) + (k + 1) * y); return 0: }
main.c: In function 'main': main.c:11:10: error: expected ';' before ':' token 11 | return 0: | ^ | ;
s958210909
p04011
C
#include<stdio.h> int main(void) { int n,k,x,y; printf(""); scanf("%d", &n); printf(""); scanf("%d", &k); printf(""); scanf("%d", &x); printf(""); scanf("%d", &y); printf("%d", (n * k) + (k + 1) * y) return 0: }
main.c: In function 'main': main.c:9:38: error: expected ';' before 'return' 9 | printf("%d", (n * k) + (k + 1) * y) | ^ | ; 10 | 11 | return 0: | ~~~~~~
s909099650
p04011
C
#include<stdio.h> int main(void) { int n,k,x,y; printf(""); scanf("%d", &n); printf(""); scanf("%d", &k); printf(""); scanf("%d", &x); printf(""); scanf("%d", &y); printf("%d", (n * k) + (k + 1) * y); return 0:
main.c: In function 'main': main.c:11:10: error: expected ';' before ':' token 11 | return 0: | ^ | ; main.c:11:2: error: expected declaration or statement at end of input 11 | return 0: | ^~~~~~
s080459379
p04011
C
#include<stdio.h> int main(void) { int n,k,x,y; printf(""); scanf("%d", &n); printf(""); scanf("%d", &k); printf(""); scanf("%d", &x); printf(""); scanf("%d", &y); printf("%d", (n * k) + (k + 1) * y) return 0: }
main.c: In function 'main': main.c:9:38: error: expected ';' before 'return' 9 | printf("%d", (n * k) + (k + 1) * y) | ^ | ; 10 | 11 | return 0: | ~~~~~~
s475289757
p04011
C++
cout<<ans;
a.cc:1:5: error: 'cout' does not name a type 1 | cout<<ans; | ^~~~
s631427721
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, k, x, y; cin >> n; cin >> k; cin >> x; cin >> y; int price = 0; if(n <= k){ price = n * x; } else { price = (n - k)*y + k * x } cout << price << endl; }
a.cc: In function 'int main()': a.cc:14:34: error: expected ';' before '}' token 14 | price = (n - k)*y + k * x | ^ | ; 15 | } | ~
s314560042
p04011
Java
import java.util.Scanner; public class Problem2 { public static void main(String[] args) { int n, k, x, y, total1 = 0, total2 = 0, total; Scanner input = new Scanner(System.in); System.out.print("Total Night: "); n = input.nextInt(); System.out.print("First Night: "); ...
Main.java:3: error: class Problem2 is public, should be declared in a file named Problem2.java public class Problem2 { ^ 1 error
s362713556
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >> N >> K >> X >> Y; if(N >= K)cout << K*X+Y*(N-K) <<endl; else{cout << N*X <<endl;} }
a.cc: In function 'int main()': a.cc:5:10: error: 'N' was not declared in this scope 5 | cin >> N >> K >> X >> Y; | ^ a.cc:5:15: error: 'K' was not declared in this scope 5 | cin >> N >> K >> X >> Y; | ^ a.cc:5:20: error: 'X' was not declared in this scope 5 | cin >>...
s901253847
p04011
C++
#include<bits/stdc++.h> using namespace std; int main(){ ...
a.cc:1:121: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h> using namespace std; int main(...
s520682436
p04011
C
#include<stdio.h> int main(){ int N, K, X, Y; scanf("%d", N); scanf("%d", K); scanf("%d", X); scanf("%d", Y); if(N < K){ printf("%d", N * X); }else{ printf("%d", (N - K) * X + K * Y); return 0; }
main.c: In function 'main': main.c:13:5: error: expected declaration or statement at end of input 13 | } | ^
s138683495
p04011
C
#include<stdio.h> int main(){ int N, K, X, Y; scanf("%d", N); scanf("%d", K); scanf("%d", X); scanf("%d", Y); if(N <= K){ printf("%d", N * X); }else{ printf("%d", (N - K) * X + K * Y); return 0; }
main.c: In function 'main': main.c:13:5: error: expected declaration or statement at end of input 13 | } | ^
s383488906
p04011
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,K,X,Y; cin>>N; cin>>K; cin>>X; cin>>Y; int fst_p,sec_d,sec_p,sum; fst_p = K * X//最初金額 sec_d = N - (K+1);//金額が変化する日数 sec_p = sec_d * Y;//変化した後の金額 sum = fst_p + sec_p; cout>>sum>>endl; return 0; }
a.cc: In function 'int main()': a.cc:13:22: error: expected ';' before 'sec_d' 13 | fst_p = K * X//最初金額 | ^ | ; 14 | 15 | sec_d = N - (K+1);//金額が変化する日数 | ~~~~~ a.cc:20:13: error: no match for 'operator>>' (operand typ...
s437352505
p04011
C++
#include<iostream> using namespace std; int main(){ int N,K,X,Y; cin>>N; cin>>K; cin>>X; cin>>Y; int fst_p,sec_d,sec_p,sum; fst_p = K * X//最初金額 sec_d = N - (K+1);//金額が変化する日数 sec_p = sec_d * Y;//変化した後の金額 sum = fst_p + sec_p; cout>>sum>>endl; return 0; }
a.cc: In function 'int main()': a.cc:13:22: error: expected ';' before 'sec_d' 13 | fst_p = K * X//最初金額 | ^ | ; 14 | 15 | sec_d = N - (K+1);//金額が変化する日数 | ~~~~~ a.cc:20:13: error: no match for 'operator>>' (operand typ...
s210338427
p04011
C++
#include<iostream> using namespace std; int main(){ int N,K,X,Y; cin>>N; cin>>K; cin>>X; cin>>Y; int fst_p,sec_d,sec_p,sum; fst_p = K * X//最初金額 sec_d = N - (K+1);//金額が変化する日数 sec_p = sec_d * Y;//変化した後の金額 sum = fst_p + sec_p; cout>>sum>>endl; return 0; }
a.cc: In function 'int main()': a.cc:13:22: error: expected ';' before 'sec_d' 13 | fst_p = K * X//最初金額 | ^ | ; 14 | 15 | sec_d = N - (K+1);//金額が変化する日数 | ~~~~~ a.cc:20:13: error: no match for 'operator>>' (operand typ...
s484469761
p04011
C++
#include <iostream> using namespace std; int main(){ int n; int k; int x; int y; cin >> n; cin >> k; cin >> x; cin >> y; cout << k * x +(n - k) * y endl; }
a.cc: In function 'int main()': a.cc:14:31: error: expected ';' before 'endl' 14 | cout << k * x +(n - k) * y endl; | ^~~~~ | ;
s528402659
p04011
C++
nclude<iostream> #include<string> #include<vector> #include<algorithm> #include<set> using namespace std; // cin>>n>>k; // cout<<n<<k<<endl; //string S[100]; int main(){ int N,K,X,Y;cin>>N>>K>>X>>Y; int ans; for(int i=1;i<N+1;i++){ if(K<i){ ans+=Y; }else{ ans+=X; } } cout<<ans<<endl; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type ...
s638390315
p04011
C
#include<stdio.h> int main(void) { int a,b,c,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); if(a<=b){ printf("%d",a*c); } else if{ printf("%d",a*c + (a-b+1)*d); } return 0; }
main.c: In function 'main': main.c:12:10: error: expected '(' before '{' token 12 | else if{ | ^ | (
s503445744
p04011
C++
n=int(input()) k=int(input()) x=int(input()) y=int(input()) if n<=k: print(x*n) elif n>k: print(k*x+(n-k)*y)
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s613482895
p04011
C++
#include <stdio.h> int main(void){ int N,K,X,Y; scanf("%d %d %d %d",&N,&K,&X,&Y); Z = |X-Y|; printf("%d\n",N*X -(N-K)*Z); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'Z' was not declared in this scope 5 | Z = |X-Y|; | ^ a.cc:5:13: error: expected primary-expression before '|' token 5 | Z = |X-Y|; | ^ a.cc:5:18: error: expected primary-expression before ';' token 5 | ...
s235003229
p04011
C++
#include <stdio.h> int main(void){ int N,K,X,Y; scanf("%d %d %d %d",&N,&K,&X,&Y); printf("%d\n",N*X -(N-K)*|X-Y|); return 0; }
a.cc: In function 'int main()': a.cc:5:34: error: expected primary-expression before '|' token 5 | printf("%d\n",N*X -(N-K)*|X-Y|); | ^ a.cc:5:39: error: expected primary-expression before ')' token 5 | printf("%d\n",N*X -(N-K)*|X-Y|); | ...
s741157622
p04011
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <bitset> #include <algorithm> #include <complex> #include <array> using namespace std; #define REP(i,n) for(int i=0; i<...
a.cc: In function 'int main()': a.cc:40:3: error: 'i' was not declared in this scope 40 | i N,K; | ^ a.cc:41:8: error: 'N' was not declared in this scope 41 | cin>>N>>K; | ^ a.cc:41:11: error: 'K' was not declared in this scope 41 | cin>>N>>K; | ^
s334665291
p04011
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <bitset> #include <algorithm> #include <complex> #include <array> using namespace std; #define REP(i,n) for(int i=0; i<...
a.cc: In function 'int main()': a.cc:40:3: error: 'i' was not declared in this scope 40 | i N,K; | ^ a.cc:41:8: error: 'N' was not declared in this scope 41 | cin>>N>>K; | ^ a.cc:41:11: error: 'K' was not declared in this scope 41 | cin>>N>>K; | ^
s578937799
p04011
C++
#include<iostream> using namespace std; main(){ int n , k, x , y; cin >> n >> k >> x >> y; if(n => k) {cout << (k * x) + ((n - k) * y);}else{ cout << n * x;} }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:7:11: error: expected primary-expression before '>' token 7 | if(n => k) {cout << (k * x) + ((n - k) * y);}else{ | ^
s708860468
p04011
C++
#include<iostream> using namespace std; main(){ int n , k, x , y; cin >> n >> k >> x >> y; if(n => k) cout << (k * x) + ((n - k) * y);else{ cout << n * x;} }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:7:11: error: expected primary-expression before '>' token 7 | if(n => k) | ^
s212045599
p04011
C
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <vector> #include <cstdlib> #include <iomanip> #include <cmath> #include <ctime> #include <map> #include <set> #include <queue> #include <stack> using namespace std; #define lowbit(x) (x&(-x)) #define max(x,y) (x...
main.c:1:11: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s138565718
p04011
C
#include<stdio.h> int main() { int X, Y, N, K, sum=0; scanf("%d%d%d%d", &N&K&X&Y); if (N < (K + 1)) { sum = N * X; printf("%d", sum); } else { sum = X * K + (N - K) * Y; printf("%d", sum); } return 0; }
main.c: In function 'main': main.c:5:29: error: invalid operands to binary & (have 'int *' and 'int') 5 | scanf("%d%d%d%d", &N&K&X&Y); | ~~^ | | | int *
s014269103
p04011
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { int[] num = new int[4]; int money = 0; for (int i = 0; i < 4; i++) { num[i] = new java.util.Scanner(System.in).nextInt(); } if(num[0]>num[1]) { money = num[1]*num[2]+ num[3]*(num[0]-num[1]); } if(num[0]<=num[1...
Main.java:18: error: reached end of file while parsing } ^ 1 error
s032414888
p04011
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { int[] num = new int[4]; int money = 0; for (int i = 0; i < 4; i++) { num[i] = new java.util.Scanner(System.in).nextInt(); } if(num[0]>num[1]) { money = num[1]*num[2]+ num[3]*(num[0]-num[1]); } if(num[0]<=num[1]...
Main.java:17: error: reached end of file while parsing } ^ 1 error
s027693831
p04011
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, k, x, y; cin n >> k >> x >> y; if(n <= k) cout << n*x << endl; else cout << k*x+(n-k)*y << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'n' 6 | cin n >> k >> x >> y; | ^~ | ;
s902393904
p04011
C++
//#define _GLIBCXX_DEBUG #include "bits/stdc++.h" using namespace std; //------------------------------- Libraries --------------------------------// //------------------------------- Type Names -------------------------------// using i64 = int_fast64_t; using seika = string; //akari : 1D, yukari : 2D, maki : 3D v...
a.cc: In function 'void solve()': a.cc:43:32: error: no matching function for call to 'max(int, i64)' 43 | cout << min(n, k) * x + max(0, n - k) * y << endl; | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-g...
s881797926
p04011
C++
int main() { int a,b,c,d,e,n,k; scanf("%d %d %d %d",&n,&k,&d,&e); if(n>k) { a=(n-k)*e; b=k*d; c=a+b; printf("%d",c);} else { printf("%d",n*d); } return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'scanf' was not declared in this scope 4 | scanf("%d %d %d %d",&n,&k,&d,&e); | ^~~~~ a.cc:11:9: error: 'printf' was not declared in this scope 11 | printf("%d",c);} | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header ...
s350432149
p04011
C++
#include<stdio.h> int main() { int a,b,c,d,e,n,k; scanf("%d %d %d %d",&n,&k,&d,&e); if(n>k) { a=(n-k)*e; b=k*d; c=a+b; printf("%d",c);} else { printf("%d",n*d); } return 0;
a.cc: In function 'int main()': a.cc:18:18: error: expected '}' at end of input 18 | return 0; | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s513789183
p04011
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ int n, k, x, y; cin >> n >> k >> x >> y; int ans = 0; rep(i, n){ if(i<k){ans += x;} else{ans += y} } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: expected ';' before '}' token 11 | else{ans += y} | ^ | ;
s779468988
p04011
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ int n, k, x, y; cin >> n >> k >> x >> y; int ans = 0; rep(i, n){ if(i<k){ans += x;} else{ans += y} } return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: expected ';' before '}' token 11 | else{ans += y} | ^ | ;
s546795433
p04011
C++
#include<bits/stdc++.h> using namespace std; #define ll long long // long long省略 #define pb push_back // push_back省略 #define mp make_pair // make_pair省略 #define fi first // fir...
a.cc: In function 'int main()': a.cc:30:15: error: found ':' in nested-name-specifier, expected '::' 30 | ll n,k,x,y:cin>>n>>k>>x>>y; | ^ | :: a.cc:30:14: error: 'y' has not been declared 30 | ll n,k,x,y:cin>>n>>k>>x>>y; | ^ a.cc:30:19: error: qua...
s451057238
p04011
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define len(v) ll(v.size()) #define fi first #define se second template <class T> void cout_vec(const vector<T> &vec){ for(auto itr:v...
a.cc: In function 'int main()': a.cc:39:15: error: expected ';' before '}' token 39 | else now+=y | ^ | ; 40 | } | ~
s127100232
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,k,x,y; cin >> n >> k >> x >> y; if(n > k){ cout << x*k + (n-k)*y << endl; }else{ cout << x*k << endl; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s773463234
p04011
C++
#include<bits/stdc++> using namespace std; int main(){int n,k,x,y;cin>>n>>k>>x>>y;if(n<k)cout<<n*x;else cout<<n*x+(n-k)*y;return 0;}
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s838787442
p04011
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <numeric> typedef long long Int; #define rep(i,a,b) for(Int i=a;i<b;++i) #define rrep(i,a,b) for(Int i=a;i>=b;--i) using namespace std; int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); int N, K, X, Y; cin >> N >> K >> X >> Y; ...
a.cc: In function 'int main()': a.cc:14:49: error: expected '}' at end of input 14 | cout << min(N, K)*X + max(N-K, 0)*Y << endl; | ^ a.cc:9:12: note: to match this '{' 9 | int main() { | ^
s283092824
p04011
C++
#include <cstdio> #include <algorithm> #define INF 0x3f3f3f3f3f3fLL typedef long long ll; ll n, s; ll f(ll b, ll n) { return n < b ? n : f(b, n / b) + n % b ; } int main() { scanf("%lld%lld", &n, &s) ; if(s > n) return puts("-1"), 0; if(s == n) return printf("%lld\n", n + 1), 0; ll bl = sqrt(n) + 1;...
a.cc: In function 'int main()': a.cc:15:13: error: 'sqrt' was not declared in this scope 15 | ll bl = sqrt(n) + 1; | ^~~~
s951514038
p04011
Java
import java.util.*; public class MMain{ public static void main(String[]args){ Scanner sc=new Scanner(System.in); int n=Integer.parseInt(sc.next()); int k=Integer.parseInt(sc.next()); int x=Integer.parseInt(sc.next()); int y=Integer.parseInt(sc.next()); sc.close(); ...
Main.java:3: error: class MMain is public, should be declared in a file named MMain.java public class MMain{ ^ 1 error
s451831285
p04011
C
#include <stdio.h> int main(void){ int i, N, K, X, Y, sum = 0; for(i = 1; i <= N; i++){ if(i <= K){ sum = sum + X; }else(K < i){ sum = sum + Y; } } printf("%d", sum); return 0; }
main.c: In function 'main': main.c:9:17: error: expected ';' before '{' token 9 | }else(K < i){ | ^ | ;
s965308258
p04011
C
#include <stdio.h> int main(void){ int N,K,X,Y,K; scanf("%d¥n",&N); scanf("%d¥n",&K); scanf("%d¥n",&X); scanf("%d¥n",&Y); K = K*X + (N-K)*Y; printf("%d",K); return 0; }
main.c: In function 'main': main.c:4:15: error: redeclaration of 'K' with no linkage 4 | int N,K,X,Y,K; | ^ main.c:4:9: note: previous declaration of 'K' with type 'int' 4 | int N,K,X,Y,K; | ^
s425924781
p04011
C++
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int x = sc.nextInt(); int y = sc.nextInt(); int count = 0; System.out.println(x*k + (n - k)*y); } ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String args[]){ | ^~~~~~~ | : a.cc:4:29: error: '...
s188209896
p04011
C++
#include <stdio.h> int printf(int n, int k, int x, int y); { int sum = 0; if (n <= k) { sum = x * n; } else { sum = x * k + y * (n - k); } return sum; } int main() { // Input the basic information of the fare counting. int n, k, x, y; n = k = x = y = -1; while ((n < 1 || n>10000) || (k < 1 || k>10000) ...
a.cc:18:10: error: extended character “ is not valid in an identifier 18 | scanf (“%d%d%d%d”,&n,&k,&x,&y); | ^ a.cc:18:18: error: extended character ” is not valid in an identifier 18 | scanf (“%d%d%d%d”,&n,&k,&x,&y); | ^ a.cc:20:9: error: extended character “ is not vali...
s183889650
p04011
C++
#include <stdio.h> int printf(int n, int k, int x, int y) { int sum = 0; if (n <= k) { sum = x * n; } else { sum = x * k + y * (n - k); } return sum; } int main() { // Input the basic information of the fare counting. int n, k, x, y; n = k = x = y = -1; while ((n < 1 || n>10000) || (k < 1 || k>10000) |...
a.cc:18:9: error: extended character “ is not valid in an identifier 18 | scanf (“%d%d%d%d”,&n,&k,&x,&y); | ^ a.cc:18:19: error: extended character ” is not valid in an identifier 18 | scanf (“%d%d%d%d”,&n,&k,&x,&y); | ^ a.cc:20:2: error: extended character “ is not valid...
s795381015
p04011
C++
#include <stdio.h> int printf(int n, int k, int x, int y) { int sum = 0; if (n <= k) { sum = x * n; } else { sum = x * k + y * (n - k); } return sum; } int main() { // Input the basic information of the fare counting. int n, k, x, y; n = k = x = y = -1; while ((n < 1 || n>10000) || (k < 1 || k>10000) |...
a.cc:20:9: error: extended character “ is not valid in an identifier 20 | printf(“%d”,count(n, k, x, y); | ^ a.cc:20:11: error: extended character ” is not valid in an identifier 20 | printf(“%d”,count(n, k, x, y); | ^ a.cc: In function 'int main()': a.cc:18:8: error: expected ';' ...
s499455799
p04011
C++
#include <stdio.h> int printf(int n, int k, int x, int y) { int sum = 0; if (n <= k) { sum = x * n; } else { sum = x * k + y * (n - k); } return sum; } int main() { // Input the basic information of the fare counting. int n, k, x, y; n = k = x = y = -1; while ((n < 1 || n>10000) || (k < 1 || k>10000) |...
a.cc: In function 'int main()': a.cc:18:9: error: invalid operands of types 'int(const char*, ...)' and 'int' to binary 'operator>>' 18 | scanf >> n >> k >> x >> y; | ~~~~~ ^~ ~ | | | | | int | int(const char*, ...) a.cc:20:12: error: 'count' was not declared in this s...
s547455568
p04011
C++
#include <stdio.h> using namespace std; int count(int n, int k, int x, int y) { int sum = 0; if (n <= k) { sum = x * n; } else { sum = x * k + y * (n - k); } return sum; } int main() { // Input the basic information of the fare counting. int n, k, x, y; n = k = x = y = -1; while ((n < 1 || n>10000) || ...
a.cc: In function 'int main()': a.cc:19:3: error: 'cin' was not declared in this scope 19 | cin >> n >> k >> x >> y; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | us...
s282791155
p04011
C++
#include<stdio.h> int main() { int a,b,c,d,e,f; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); if(a<=b){ e=a*c; printf("%d\n",e); } else{ f=b*c+(a-b)*d; printf("%d\n",f); } return 0 }
a.cc: In function 'int main()': a.cc:6:23: error: expected ';' before '\U0000ff1b' 6 | scanf("%d",&b); | ^~ | ; a.cc:17:17: error: expected ';' before '}' token 17 | return 0 | ^ | ; 18 | 19...
s393378197
p04011
C++
#include<stdio.h> int main() { int a,b,c,d,e,f; scanf("%d",&a); printf("\n"); scanf("%d",&b); printf("\n"); scanf("%d",&c); printf("\n"); scanf("%d",&d); printf("\n"); if(a<=b){ e=a*c; printf("%d\n",e); } else{ f=b*c+(a-b)*d; printf("%d\n",f); } return 0; }
a.cc: In function 'int main()': a.cc:7:23: error: expected ';' before '\U0000ff1b' 7 | scanf("%d",&b); | ^~ | ;
s148822078
p04011
C++
#include<stdio.h> int main() { int a,b,c,d,e,f; scanf("%d",&a); printf("\n"); scanf("%d",&b); print("\n"); scanf("%d",&c); print("\n"); scanf("%d",&d); print("\n"); if(a<=b){ e=a*c; printf("%d\n",e); } else{ f=b*c+(a-b)*d; printf("%d\n",f); } return 0; }
a.cc: In function 'int main()': a.cc:7:23: error: expected ';' before '\U0000ff1b' 7 | scanf("%d",&b); | ^~ | ; a.cc:10:9: error: 'print' was not declared in this scope; did you mean 'printf'? 10 | print("\n"); | ^~~~~ | ...
s158536450
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { int n=2,k=3,x=10000,y=9000; int sum=0; sum=k*x+(n-k)y; cout << sum << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: expected ';' before 'y' 7 | sum=k*x+(n-k)y; | ^ | ;
s148159811
p04011
C
#include<stdio.h> int main() { int N, K, X, Y; scanf("%d%d%d%d",&N, &k, &X, &Y); if(N<=K){ printf("%d\n",X*N);} else{printf("%d\n",X*K+N*Y-K*Y);} return 0; }
main.c: In function 'main': main.c:5:31: error: 'k' undeclared (first use in this function) 5 | scanf("%d%d%d%d",&N, &k, &X, &Y); | ^ main.c:5:31: note: each undeclared identifier is reported only once for each function it appears in
s195957747
p04011
C
#include<stdio.h> int main() { int N,K,X,Y,sum; scanf("%d%d%d%d",&N,&K,&X,&Y); if(N > K) { sum = X * N + (N - K) * Y; } else { sum = X * k; } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:15:22: error: 'k' undeclared (first use in this function) 15 | sum = X * k; | ^ main.c:15:22: note: each undeclared identifier is reported only once for each function it appears in
s945373932
p04011
C++
#include<stdio.h> int main() { int N,X,Y,K; scanf("%d",&N); if(N<=K) { printf("X*N"); } else (N>K) { printf("K*X+(N-K)*Y"); } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: expected ';' before '{' token 10 | else (N>K) | ^ | ; 11 | { | ~
s731959380
p04011
C++
#include<stdio.h> int main() { int N,X,Y,K; scanf("%d",&N); if(N<=K) { printf("X*N"); } else (N>K) { printf("K*X+(N-K)*Y"); return 0;} }
a.cc: In function 'int main()': a.cc:10:19: error: expected ';' before '{' token 10 | else (N>K) | ^ | ; 11 | { | ~
s438663642
p04011
C++
#include<stdio.h> int main() { int N,X,Y,K; scanf("%d",&N); if(N<=K) { printf("X*N"); } else (N>K) { printf("K*X+(N-K)*Y"); return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: expected ';' before '{' token 10 | else (N>K) | ^ | ; 11 | { | ~ a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:3:1: note: to match this '{' 3 | ...
s170242530
p04011
C++
#include<stdio.h> int main() { int N,X,Y,K; scanf("%d",&N); if(N<=K) { printf("X*N"); } else (N>K) { printf("K*X+(N-K)*Y); return 0; }
a.cc:12:24: warning: missing terminating " character 12 | printf("K*X+(N-K)*Y); | ^ a.cc:12:24: error: missing terminating " character 12 | printf("K*X+(N-K)*Y); | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:10:19: e...
s837143947
p04011
C++
#include<stdio.h> int main() { int N,X,Y,K; scanf("%d",&N); if(N<=K) { printf("X*N"); } else (N>K) { printf("K*X+(N-K)*Y) return 0; }
a.cc:12:24: warning: missing terminating " character 12 | printf("K*X+(N-K)*Y) | ^ a.cc:12:24: error: missing terminating " character 12 | printf("K*X+(N-K)*Y) | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:10:19: erro...
s566703301
p04011
C++
#include<stdio.h> int main() { int n,k,x,y,; scanf("%d %d %d %d",&n, &k, &x, &y); if(n<=k) printf("%d\n",x*k); else printf("%d\n",x*k+y*(n-k)); return 0; }
a.cc: In function 'int main()': a.cc:4:13: error: expected unqualified-id before ';' token 4 | int n,k,x,y,; | ^
s478579310
p04011
C++
#include<iostream> using namespace std; int main(void){ int a,b,c,d; cin >> a >> b >> c >> d; if(a <= b){ cout << a * c << endl; } else { cout << b * c + (a - b) * d <<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s831048016
p04011
C++
#include<stdio.h> int main(){ int N,K,X,Y; scanf("%d%d%d%d",&N,&K,&X,&Y); if(N<= K){ printf("N*X\n"); } else{ printf("K*X+(N-K)*Y\n"); { return 0; }
a.cc: In function 'int main()': a.cc:13:2: error: expected '}' at end of input 13 | } | ^ a.cc:9:9: note: to match this '{' 9 | else{ | ^ a.cc:13:2: error: expected '}' at end of input 13 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s846591744
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, k, x, y; cin >> n >> k >> x >> y; int price=0; (int i=0; i<n; i++){ if(i<k){ price += x; }else{ price += y; } } cout << price << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:4: error: expected primary-expression before 'int' 9 | (int i=0; i<n; i++){ | ^~~ a.cc:9:4: error: expected ')' before 'int' 9 | (int i=0; i<n; i++){ | ~^~~ | ) a.cc:9:13: error: 'i' was not declared in this scope 9 | (int i=0; i<n; i++)...
s931831732
p04011
C++
#include <iostream> int main() { int n, k, x, y; cin >> n >> k >> x >> y; if (n <= k) cout << x * k; else cout << x*k + y*(n - k); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> n >> k >> x >> y; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream ...
s903452205
p04011
C++
#include <bits/stdc++.h> using namespace std; const int mod = 1000000007; #define ll long long #define rep(i,n) for(int i=0 ; (n) >i; i++) int main() { int n,k,x,y cin >> n >> k >> x >> y; ll ans = 0; rep(i,n){ if(i>=k) ans += y; else ans += x; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: expected initializer before 'cin' 9 | int n,k,x,y cin >> n >> k >> x >> y; | ^~~ a.cc:13:25: error: 'y' was not declared in this scope 13 | if(i>=k) ans += y; | ^
s162106438
p04011
C
#include<stdio.h> int main(){ int n,k,x,y; scantf("%d\n%d\n%d\n%y",&n,&K,&x,&y); if(k<n){ printf("%d",k*x+(n-k)*y); }else{ printf("%d",k*x); } return 0; }
main.c: In function 'main': main.c:4:3: error: implicit declaration of function 'scantf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 4 | scantf("%d\n%d\n%d\n%y",&n,&K,&x,&y); | ^~~~~~ | scanf main.c:4:31: error: 'K' undeclared (first use in this function) 4 | scantf("%d\n%d\n%d\...
s535028556
p04011
C
#include<stdio.h> int main(){ int n,k,x,y; scantf("%d\n%d\n%d\n%y",&n,&K,&x,&y); if(k<n){ printf("%d",k*x+(n-k)*y); }else{ printf("%d",k*x); return 0; }
main.c: In function 'main': main.c:4:3: error: implicit declaration of function 'scantf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 4 | scantf("%d\n%d\n%d\n%y",&n,&K,&x,&y); | ^~~~~~ | scanf main.c:4:31: error: 'K' undeclared (first use in this function) 4 | scantf("%d\n%d\n%d\...
s791892723
p04011
C++
#include <iostream> #include <algorithm> using namespace std; int main() { string w; cin >> w; sort(w.begin(), w.end()); for (int i = 0; i < w.length; ++i) { if (w[i] != w[i + 1]) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }
a.cc: In function 'int main()': a.cc:10:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s670047671
p04011
C++
#include <iostream> #include <bits/stdc++.h> #define ll long long #define rp(i,n) for(int i=0;i< n;i++) #define rpd(i,n) for(int i=n-1;i >= 0;i--) using namespace std; int main() { ll n,k,x,y; cin >> n >> k >> x >> y; cout << x*min(k,n)+y*min(0,n-k); cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:33: error: no matching function for call to 'min(int, long long int)' 15 | cout << x*min(k,n)+y*min(0,n-k); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classe...
s709914081
p04011
C++
#include <bits/stdc++.h> using namespace std; int main { int n,k,x,y; cin >> n >> k >> x >> y ; (n - k) >= 0 ? cout << (n-k)*y + k*x : cout << k*x ; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main { | ^~~~ a.cc:6:3: error: expected primary-expression before 'int' 6 | int n,k,x,y; | ^~~ a.cc:6:3: error: expected '}' before 'int' a.cc:4:10: note: to match this '{' 4 | int main { | ^ a.cc:8:3...
s292062936
p04011
C++
#include<iostream> using namespace std; int main(){ int N, K, X, Y; cin << N; cin << K; cin << X; cin << Y; cout << X*K + Y*(N-K); }
a.cc: In function 'int main()': a.cc:4:25: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 4 | int N, K, X, Y; cin << N; cin << K; cin << X; cin << Y; | ~~~ ^~ ~ | | | | ...
s990689328
p04011
C++
#include <iostream> using namespace std; int main(){ int n, k, x, y; sum = 0; cin >> n >> k >> x >> y; if (n > k) { sum = (n - k) * y + k * x; } else { sum = n * x; } cout << sum; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'sum' was not declared in this scope 6 | sum = 0; | ^~~
s102984484
p04011
C++
#include <iostream> using namespace std; int main() { int n, k, x, y; cin >> n >> k >> x >> y; cout << k*x (n-k+1) * y << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'x' cannot be used as a function 7 | cout << k*x (n-k+1) * y << endl; | ~~^~~~~~~
s942283082
p04011
Java
import java.util.*; public class a044{ public static void main(String args[]){ Scanner sc1 = new Scanner(System.in); int n = sc1.nextInt(); int k = sc1.nextInt(); int x = sc1.nextInt(); int y = sc1.nextInt(); int sum = 0; for(int i = 0; i < k; i++){ ...
Main.java:3: error: class a044 is public, should be declared in a file named a044.java public class a044{ ^ 1 error
s604783608
p04011
C++
#include <iostream> #include <numeric> #include <math.h> #include <algorithm> #include <float.h> #include <limits> #include <vector> #include <string.h> #define rep(i,a,n) for(ll int (i) = (a);(i) < (n);(i)++) #define urep(i,a,n) for(ll int (i) = (a);(i) > (n);(i)--) #define MOD 1000000007 #define ll long long #defin...
a.cc: In function 'int main()': a.cc:50:19: error: 'x' was not declared in this scope 50 | if(a>b) cout<<b*x+(a-b)*y; | ^ a.cc:50:27: error: 'y' was not declared in this scope 50 | if(a>b) cout<<b*x+(a-b)*y; | ^ a.cc:51:16: error: 'x' was not declared in...
s660091566
p04011
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { int int n,k,x,y; cin >> n >> k >> x >> y; if(k>=n)cout << x*n << endl; else cout << (n-k)*y+x*k << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: two or more data types in declaration of 'n' 8 | int int n,k,x,y; | ^~~ a.cc:8:5: error: two or more data types in declaration of 'k' a.cc:8:5: error: two or more data types in declaration of 'x' a.cc:8:5: error: two or more data types in declaration of...
s696526678
p04011
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,k,x,y; cin>>n>>k>>x>>y; if(n<k+1) cout << n*x <<endl; else if cout<<(n-k)*y+k*x<<endl; }
a.cc: In function 'int main()': a.cc:8:11: error: expected '(' before 'cout' 8 | else if cout<<(n-k)*y+k*x<<endl; | ^~~~ | (
s987490671
p04011
C++
#include<bists/stdc++.h> using namespace std; int main(){ int N,K,X,Y; cin >> N >> K >> X >> Y; int ans = 0; for(int i=0; i<N;i++){ if( i == K) ans+=Y; else ans+=X; } return 0; }
a.cc:1:9: fatal error: bists/stdc++.h: No such file or directory 1 | #include<bists/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s677603145
p04011
C
#include <stdio.h> int main(){ int n,k,x,y; int a=0,d=0; scanf("%d",&n); scanf("%d",&k); scanf("%d",&x); scanf("%d",&y); if(n >x){ a=x; b=n-a; }else{ a=n;} printf("%d\n",a*x+b*y); return(0); }
main.c: In function 'main': main.c:11:5: error: 'b' undeclared (first use in this function) 11 | b=n-a; | ^ main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
s231178890
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >>N >>K >>X >>Y ; if(K<=N){; cout << K*X+(N-K)*Y << endl; } else cout << N*X << endl; }
a.cc: In function 'int main()': a.cc:5:9: error: 'N' was not declared in this scope 5 | cin >>N >>K >>X >>Y ; | ^ a.cc:5:13: error: 'K' was not declared in this scope 5 | cin >>N >>K >>X >>Y ; | ^ a.cc:5:17: error: 'X' was not declared in this scope 5 | cin >>N >>K >>...
s787371294
p04011
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >>N >>K >>X >>Y ; if(K<=N); cout << K*X+(N-K)*Y; else cout << N*X; }
a.cc: In function 'int main()': a.cc:5:9: error: 'N' was not declared in this scope 5 | cin >>N >>K >>X >>Y ; | ^ a.cc:5:13: error: 'K' was not declared in this scope 5 | cin >>N >>K >>X >>Y ; | ^ a.cc:5:17: error: 'X' was not declared in this scope 5 | cin >>N >>K >>...
s266353958
p04011
Java
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //泊数 int k = sc.nextInt(); //泊数 int x = sc.nextInt(); //金額 int y = sc.nextInt(); //金額 if (n > k){ System...
Main.java:12: error: cannot find symbol System.out.println(x * k + y(n-k)); ^ symbol: method y(int) location: class Main 1 error
s442139641
p04011
Java
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //泊数 int k = sc.nextInt(); //泊数 int x = sc.nextInt(); //金額 int y = sc.nextInt(); //金額 if (n > k){ System...
Main.java:12: error: cannot find symbol System.out.println(x * k + y(n - k)); ^ symbol: method y(int) location: class Main 1 error
s565626645
p04011
Java
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //泊数 int k = sc.nextInt(); //泊数 int x = sc.nextInt(); //金額 int y = sc.nextInt(); //金額 if (n > k){ System...
Main.java:12: error: cannot find symbol System.out.println(x * k + y (n - k)); ^ symbol: method y(int) location: class Main 1 error
s597217493
p04011
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c>>d; if(b>=a) cout<<a*c; if(b<a) cout<<k*c+(n-k)*d; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'k' was not declared in this scope 10 | cout<<k*c+(n-k)*d; | ^ a.cc:10:20: error: 'n' was not declared in this scope 10 | cout<<k*c+(n-k)*d; | ^
s490238551
p04011
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c>>d; if(k>=n) cout<<a*c; if(k<n) cout<<k*c+(n-k)*d; return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: 'k' was not declared in this scope 7 | if(k>=n) | ^ a.cc:7:15: error: 'n' was not declared in this scope 7 | if(k>=n) | ^ a.cc:9:12: error: 'k' was not declared in this scope 9 | if(k<n) | ...
s228890021
p04011
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,k,x,y; cin >> n >> k >> x >> y; cout << x*k + y*(n-k) return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: expected ';' before 'return' 8 | cout << x*k + y*(n-k) | ^ | ; 9 | return 0; | ~~~~~~
s120100846
p04011
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,K,X,Y; cin>>N>>K>>X>>Y; ciut<<K*X+(N-K)*Y<<endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'ciut' was not declared in this scope 7 | ciut<<K*X+(N-K)*Y<<endl; | ^~~~
s512801489
p04011
C++
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int main(){ char w[100]; scanf("%s", &w); int len = strlen(w); int num = 0; for(int i=0; i<len; i++){ if( count(w, w+len, w[i]) % 2 == 0){ num ++; if(num == len) printf('Yes'); } else{ p...
a.cc:16:16: warning: multi-character character constant [-Wmultichar] 16 | printf('Yes'); | ^~~~~ a.cc:19:14: warning: multi-character character constant [-Wmultichar] 19 | printf('No'); | ^~~~ a.cc: In function 'int main()': a.cc:16:16: error: invalid convers...
s277205256
p04011
C++
#include<cstdio> #include<cstring> #include<algorithm> int main(){ char w[100]; scanf("%s", &w); int len = strlen(w); int num = 0; for(int i=0; i<len; i++){ if( count(w, w+len, w+i) % 2 == 0){ num ++; if(num == len) printf('Yes'); } else{ printf('No'); bre...
a.cc:15:16: warning: multi-character character constant [-Wmultichar] 15 | printf('Yes'); | ^~~~~ a.cc:18:14: warning: multi-character character constant [-Wmultichar] 18 | printf('No'); | ^~~~ a.cc: In function 'int main()': a.cc:11:9: error: 'count' was not ...
s679497619
p04011
C++
#include<iostrem> using namespace std; int main(){ int a,b,c,d;cin>>a>>b>>c>>d; if(a<=b) cout<<a*c; else cout<<a*c+(a-b)*d; }
a.cc:1:9: fatal error: iostrem: No such file or directory 1 | #include<iostrem> | ^~~~~~~~~ compilation terminated.
s496864344
p04011
C++
#include<bits/t\stdc++.h> using namespace std; int main(void){ int n,k,x,y; cin >> n >> k >> x >> y; if(n<=k)cout<<n*x<<endl; else cout<<k*x+(n-k)*y<<endl; return 0; }
a.cc:1:9: fatal error: bits/t\stdc++.h: No such file or directory 1 | #include<bits/t\stdc++.h> | ^~~~~~~~~~~~~~~~~ compilation terminated.
s275595445
p04011
C++
#include<bits/stdc.++> using namespace std; int main(){ int n,k,a,b,sum; cin >> n >> k >> a >> b; if(n<=k){ cout << n*a << endl; }else{ cout << n*a+(n-k)*b << endl; } }
a.cc:1:9: fatal error: bits/stdc.++: No such file or directory 1 | #include<bits/stdc.++> | ^~~~~~~~~~~~~~ compilation terminated.
s988753992
p04011
C++
#include<stdio.h> int main(void) { int n,k,x,y,r; scanf("%d",&n); scanf("%d",&k); scanf("%d",&x); scanf("%d",&y); if(n>k) { r=y*n; } else{ r=x*n; } printf("%d\n",r); return 0 }
a.cc: In function 'int main()': a.cc:16:17: error: expected ';' before '}' token 16 | return 0 | ^ | ; 17 | } | ~
s412505052
p04011
C++
#include<stdio.h> int main(void) { int n,k,x,y,r; scanf("%d",&n); scanf("%d",&k); scanf("%d",&x); scanf("%d",&y); if(n>k) { r=y*n; } else{ r=x*n; } printf("%d\n",r); return 0;
a.cc: In function 'int main()': a.cc:17:18: error: expected '}' at end of input 17 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s651410730
p04011
C++
Copy Copy #include<stdio.h> int main(void) { int n,k,x,y,r; scanf("%d",&n); scanf("%d",&k); scanf("%d",&x); scanf("%d",&y); if(n>k) { r=y*n; } else{ r=x*n; } printf("%d\n",r); return 0;
a.cc:2:1: error: 'Copy' does not name a type 2 | Copy | ^~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'scanf' was not declared in this scope 8 | scanf("%d",&n); | ^~~~~ a.cc:18:9: error: 'printf' was not declared in this scope 18 | printf("%d\n",r); | ...
s991751267
p04011
C++
#include<stdio.h> int main(void) { int X,Y,K,N,e; scanf("%d",X); scanf("%d",Y); scanf("%d",N); e=(K*X)+(((k+1)*N*Y); printf("%d",e); return 0; }
a.cc: In function 'int main()': a.cc:5:22: error: expected ';' before '\U0000ff1b' 5 | scanf("%d",X); | ^~ | ; a.cc:8:20: error: 'k' was not declared in this scope 8 | e=(K*X)+(((k+1)*N*Y); | ^ a.cc:8:29: error: expec...
s325842721
p04011
C++
#include<stdio.h> int main(void) { int X,Y,K,e; scanf("%d",X); scanf("%d",Y); e=(K*X)+((k+1)*Y); printf("%d",e); return 0; }
a.cc: In function 'int main()': a.cc:5:22: error: expected ';' before '\U0000ff1b' 5 | scanf("%d",X); | ^~ | ; a.cc:7:19: error: 'k' was not declared in this scope 7 | e=(K*X)+((k+1)*Y); | ^