criyle/codenet-compile-errors huggingface dataset:
Language: 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])
		{
			money = num[0]*num[2];
		}



Compiler output:
Main.java:17: error: reached end of file while parsing
		}
		 ^
1 error
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'n'
    6 |   cin n >> k >> x >> y;
      |      ^~
      |      ;
Language: 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;
 } 

Compiler output:
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 '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:14:17: error: 'printf' was not declared in this scope
   14 |                 printf("%d",n*d);
      |                 ^~~~~~
a.cc:14:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: 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;

Compiler output:
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 | {
      | ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '}' token
   11 |     else{ans += y}
      |                  ^
      |                  ;
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '}' token
   11 |     else{ans += y}
      |                  ^
      |                  ;
Language: 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                                        // first省略
#define se second                                       // second省略
#define itn int                                         // int誤字保険
#define count cout                                      // cout誤字保険
#define vecotr vector                                   // vector誤字保険
#define ednl endl                                       // endl誤字保険
#define opt() cin.tie(0); ios::sync_with_stdio(false)   // 入出力速度改善

#define rep(i,l,r) for(ll i=(l);i<(r);i++)               // 範囲[l, r)で刻み1のfor文(順方向)
#define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k))         // 範囲[l, r)で刻みkのfor文(順方向)
#define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--)           // 範囲[l, r)で刻み1のfor文(逆方向)
#define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k))     // 範囲[l, r)で刻みkのfor文(逆方向)
#define all(x) (x).begin(), (x).end()                   // vectorのポインタ位置指定用
#define max(p,q)((p)>(q)?(p):(q))                       // max拡張
#define min(p,q)((p)<(q)?(p):(q))                       // min拡張
#define bit(n,m)(((n)>>(m))&1)                          // 変数nのm番目のbitを取り出す

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; } return 0; }

int dy[]={0, 1, 0, -1};                                 // 4方向近傍
int dx[]={1, 0, -1, 0};                                 // 4方向近傍

int main(){
    ll n,k,x,y:cin>>n>>k>>x>>y;
    cout<<min(n,k)*x+max(n-k,0)*y<<ednl;
}



Compiler output:
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: qualified-id in declaration before '>>' token
   30 |     ll n,k,x,y:cin>>n>>k>>x>>y;
      |                   ^~
a.cc:31:33: error: 'y' was not declared in this scope
   31 |     cout<<min(n,k)*x+max(n-k,0)*y<<ednl;
      |                                 ^
Language: 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:vec) cout<<itr<<' ';
  cout<<endl;
}

template <class T>
void cout_vec2(const vector<vector<T>> &vec){
  rep(i,vec.size()){
    rep(j,vec[i].size()){
      cout<<vec[i][j]<<' ';
    }
    cout<<endl;
  }
}

typedef pair<ll,ll> P;
const ll mod=1e9+7;
const ll inf=1e15;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,k,x,y;
  cin>>n>>k>>x>>y;
  int now=0;
  rep(i,n){
   if(i<k) now+=x;
   else now+=y
  }
  cout<<now<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:15: error: expected ';' before '}' token
   39 |    else now+=y
      |               ^
      |               ;
   40 |   }
      |   ~
Language: 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;
}


Compiler output:
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() {
      |            ^
Language: 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;}

Compiler output:
a.cc:1:9: fatal error: bits/stdc++: No such file or directory
    1 | #include<bits/stdc++>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: 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;
    cout << min(N, K)*X + max(N-K, 0)*Y << endl;


Compiler output:
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() {
      |            ^
Language: 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;
    for (ll i = 2; i <= bl; ++i) if (f(i, n) == s) return printf("%lld\n", i), 0;
    ll ans = INF; 
	n -= s;
    for (ll i = 1; i * i <= n; ++i) if(n % i == 0) {
        ll b = n / i + 1;
        if (f(b, n + s) == s) ans = std :: min(ans, b);
    }
    printf("%lld\n", ans != INF ? ans : -1);
    return 0 ;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'sqrt' was not declared in this scope
   15 |     ll bl = sqrt(n) + 1;
      |             ^~~~
Language: 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();
        if(n>=k)
            System.out.println(k*x+(n-k)*y);
        else
        System.out.println(n*x);
    }
}

Compiler output:
Main.java:3: error: class MMain is public, should be declared in a file named MMain.java
public class MMain{
       ^
1 error
Language: 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;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected ';' before '{' token
    9 |     }else(K < i){
      |                 ^
      |                 ;
Language: 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;
}
  

Compiler output:
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;
      |         ^
Language: 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);
  }
      
  
}

Compiler output:
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: 'String' has not been declared
    4 |     public static void main(String args[]){
      |                             ^~~~~~
a.cc:18:2: error: expected ';' after class definition
   18 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:7: error: 'Scanner' was not declared in this scope
    5 |       Scanner sc = new Scanner(System.in);
      |       ^~~~~~~
a.cc:7:15: error: 'sc' was not declared in this scope
    7 |       int n = sc.nextInt();
      |               ^~
a.cc:14:7: error: 'System' was not declared in this scope
   14 |       System.out.println(x*k + (n - k)*y);
      |       ^~~~~~
Language: 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) ||（x < 1 || x>10000） || （y < 1 || y>10000）||y>=x) {
  scanf (“%d%d%d%d”,&n,&k,&x,&y)；
  }
 printf(“%d”,printf(n, k, x, y));
 return 0;
}


Compiler output:
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 valid in an identifier
   20 |  printf(“%d”,printf(n, k, x, y));
      |         ^
a.cc:20:11: error: extended character ” is not valid in an identifier
   20 |  printf(“%d”,printf(n, k, x, y));
      |           ^
a.cc:2:17: error: expected initializer before 'n'
    2 | int printf（int n, int k, int x, int y）; {
      |                 ^
a.cc:2:43: error: expected unqualified-id before '{' token
    2 | int printf（int n, int k, int x, int y）; {
      |                                           ^
a.cc:15:2: error: expected primary-expression before 'int'
   15 |  int n, k, x, y;
      |  ^~~
a.cc:15:2: error: expected '}' before 'int'
a.cc:13:1: note: to match this '{'
   13 | {
      | ^
a.cc:16:2: error: 'n' does not name a type
   16 |  n = k = x = y = -1;
      |  ^
a.cc:17:2: error: expected unqualified-id before 'while'
   17 |  while （（n < 1 || n>10000） || (k < 1 || k>10000) ||（x < 1 || x>10000） || （y < 1 || y>10000）||y>=x) {
      |  ^~~~~
a.cc:20:8: error: expected constructor, destructor, or type conversion before '(' token
   20 |  printf(“%d”,printf(n, k, x, y));
      |        ^
a.cc:21:2: error: expected unqualified-id before 'return'
   21 |  return 0;
      |  ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: 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) ||（x < 1 || x>10000） || （y < 1 || y>10000）||y>=x) {
  scanf （“%d%d%d%d”,&n,&k,&x,&y）；
  }
 printf（“%d”,printf（n, k, x, y））;
 return 0;
}


Compiler output:
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 in an identifier
   20 |  printf（“%d”,printf（n, k, x, y））;
      |  ^
a.cc:20:12: error: extended character ” is not valid in an identifier
   20 |  printf（“%d”,printf（n, k, x, y））;
      |            ^
a.cc:2:17: error: expected initializer before 'n'
    2 | int printf（int n, int k, int x, int y） {
      |                 ^
a.cc:15:2: error: expected primary-expression before 'int'
   15 |  int n, k, x, y;
      |  ^~~
a.cc:15:2: error: expected '}' before 'int'
a.cc:13:1: note: to match this '{'
   13 | {
      | ^
a.cc:16:2: error: 'n' does not name a type
   16 |  n = k = x = y = -1;
      |  ^
a.cc:17:2: error: expected unqualified-id before 'while'
   17 |  while （（n < 1 || n>10000） || (k < 1 || k>10000) ||（x < 1 || x>10000） || （y < 1 || y>10000）||y>=x) {
      |  ^~~~~
a.cc:20:2: error: 'printf\U0000ff08\U0000201c' does not name a type
   20 |  printf（“%d”,printf（n, k, x, y））;
      |  ^~~~~~~~~
a.cc:21:2: error: expected unqualified-id before 'return'
   21 |  return 0;
      |  ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: 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) || (x < 1 || x>10000) || (y < 1 || y>10000)||y>=x) {
  scanf （"%d%d%d%d",&n,&k,&x,&y）;
 }
 printf(“%d”,count(n, k, x, y);
 return 0;
}

Compiler output:
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 ';' before '\U0000ff08'
   18 |   scanf （"%d%d%d%d",&n,&k,&x,&y）;
      |        ^~~
      |        ;
a.cc:20:9: error: '\U0000201c' was not declared in this scope
   20 |  printf(“%d”,count(n, k, x, y);
      |         ^
a.cc:20:11: error: 'd\U0000201d' was not declared in this scope
   20 |  printf(“%d”,count(n, k, x, y);
      |           ^~
a.cc:20:14: error: 'count' was not declared in this scope
   20 |  printf(“%d”,count(n, k, x, y);
      |              ^~~~~
Language: 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) || (x < 1 || x>10000) || (y < 1 || y>10000)||y>=x) {
  scanf >> n >> k >> x >> y;
 }
 printf << count(n, k, x, y);
 return 0;
}

Compiler output:
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 scope
   20 |  printf << count(n, k, x, y);
      |            ^~~~~
Language: 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) || (k < 1 || k>10000) || (x < 1 || x>10000) || (y < 1 || y>10000)||y>=x) {
  cin >> n >> k >> x >> y;
 }
 cout << count(n, k, x, y);
 return 0;
}

Compiler output:
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 | using namespace std;
a.cc:21:2: error: 'cout' was not declared in this scope
   21 |  cout << count(n, k, x, y);
      |  ^~~~
a.cc:21:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: 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

}

Compiler output:
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 | }
      | ~
Language: 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;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before '\U0000ff1b'
    7 |         scanf("%d",&b)；
      |                       ^~
      |                       ;
Language: 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;

}

Compiler output:
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");
      |         ^~~~~
      |         printf
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'y'
    7 |   sum=k*x+(n-k)y;
      |                ^
      |                ;
Language: 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;
}

Compiler output:
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
Language: 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;
}

Compiler output:
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
Language: 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;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '{' token
   10 |         else (N>K)
      |                   ^
      |                   ;
   11 |         {
      |         ~
Language: 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;}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '{' token
   10 |         else (N>K)
      |                   ^
      |                   ;
   11 |         {
      |         ~
Language: 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;

}

Compiler output:
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 | {
      | ^
Language: 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;

}

Compiler output:
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: 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 | {
      | ^
Language: 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;

}

Compiler output:
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: 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 | {
      | ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: expected unqualified-id before ';' token
    4 | int n,k,x,y,;
      |             ^
Language: 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;
}


Compiler output:
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){
      |               ^
Language: 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;
}


Compiler output:
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(){
      |           ^
Language: 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;
}


Compiler output:
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++){
      |             ^
Language: 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; 
}

Compiler output:
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 cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         if (n <= k) cout << x * k;
      |                     ^~~~
      |                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         else cout << x*k + y*(n - k);
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: 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;   
}


Compiler output:
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;
      |                         ^
Language: 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;
}


Compiler output:
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\n%y",&n,&K,&x,&y);
      |                               ^
main.c:4:31: note: each undeclared identifier is reported only once for each function it appears in
Language: 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;
}

Compiler output:
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\n%y",&n,&K,&x,&y);
      |                               ^
main.c:4:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:1: error: expected declaration or statement at end of input
   10 | }
      | ^
Language: 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;
}

Compiler output:
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 unsigned int]' (did you forget the '()' ?)
   10 |         for (int i = 0; i < w.length; ++i) {
      |                             ~~^~~~~~
      |                                     ()
Language: 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;
}


Compiler output:
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_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:15:33: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   15 |         cout << x*min(k,n)+y*min(0,n-k);
      |                              ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:15:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |         cout << x*min(k,n)+y*min(0,n-k);
      |                              ~~~^~~~~~~
Language: 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 ;
 }

Compiler output:
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: error: 'cin' does not name a type
    8 |   cin >> n >> k >> x >> y ;
      |   ^~~
a.cc:10:5: error: expected ')' before '-' token
   10 |   (n - k) >= 0 ? cout << (n-k)*y + k*x : cout << k*x ;
      |   ~ ^~
      |     )
a.cc:11:2: error: expected declaration before '}' token
   11 |  }
      |  ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'sum' was not declared in this scope
    6 |         sum = 0;
      |         ^~~
Language: 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;
}

Compiler output:
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;
      |               ~~^~~~~~~
Language: 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++){
            sum += x;
        }
        for(int j = 0; j < n-k; j++){
            sum += y;
        }
        System.out.print(sum);
    }
}

Compiler output:
Main.java:3: error: class a044 is public, should be declared in a file named a044.java
public class a044{
       ^
1 error
Language: 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
#define asort(a) sort(a.begin(),a.end());

using namespace::std;

int jo(ll int jxo, ll int jyo){//累乗
	ll int jhogeo = 1;
	rep(jinto,0,jyo) jhogeo=jhogeo*jxo;
	return jhogeo;
}
char tobig(char toxbig){//char大文字化
  return (toxbig-0x20);
}
char tolow(char toxlow){//char小文字化
  return (toxlow+0x20);
}
int ctoi(char cctoi){//char->int
  if('0' <= cctoi && cctoi <= '9') return (cctoi-'0');
  return -1;
}
int gcd(int gcad, int gcbd) {//最大公約数
  if(gcad < gcbd) return gcd(gcbd, gcad);
  int gcrd;
  while ((gcrd=gcad%gcbd)) {
    gcad = gcbd;
    gcbd = gcrd;
  }
  return gcbd;
}
int lcm(int lcam, int lcbm){//最小公倍数
 return (lcam*lcbm)/gcd(lcam,lcbm);
}


int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  if(a>b) cout<<b*x+(a-b)*y;
  else cout<<a*x;
  cout<<endl;
}
// int *p = new int[N];

//  vector<int> 変数名(要素数);
//  sort(変数名.begin(),変数名.end());//昇順ソート

// vector<vector<int>> 変数名(左の個数, vector<int>(右の個数));

//

Compiler output:
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 this scope
   51 |   else cout<<a*x;
      |                ^
Language: 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;
}

Compiler output:
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 'y'
a.cc:9:12: error: 'n' was not declared in this scope
    9 |     cin >> n >> k >> x >> y;
      |            ^
a.cc:9:17: error: 'k' was not declared in this scope
    9 |     cin >> n >> k >> x >> y;
      |                 ^
a.cc:9:22: error: 'x' was not declared in this scope
    9 |     cin >> n >> k >> x >> y;
      |                      ^
a.cc:9:27: error: 'y' was not declared in this scope
    9 |     cin >> n >> k >> x >> y;
      |                           ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected '(' before 'cout'
    8 |   else if cout<<(n-k)*y+k*x<<endl;
      |           ^~~~
      |           (
Language: 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;
}

Compiler output:
a.cc:1:9: fatal error: bists/stdc++.h: No such file or directory
    1 | #include<bists/stdc++.h>
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: 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);
}

Compiler output:
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
Language: 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;
  
}


Compiler output:
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 >>X  >>Y ;
      |                 ^
a.cc:5:22: error: 'Y' was not declared in this scope
    5 |   cin >>N >>K >>X  >>Y ;
      |                      ^
Language: 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;
  
}

Compiler output:
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 >>X  >>Y ;
      |                 ^
a.cc:5:22: error: 'Y' was not declared in this scope
    5 |   cin >>N >>K >>X  >>Y ;
      |                      ^
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else
      |   ^~~~
Language: 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.out.println(x * k + y(n-k));
        }else{
        System.out.println(x * n);
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
        System.out.println(x * k + y(n-k));
                                   ^
  symbol:   method y(int)
  location: class Main
1 error
Language: 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.out.println(x * k + y(n - k));
        }else{
        System.out.println(x * n);
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
        System.out.println(x * k + y(n - k));
                                   ^
  symbol:   method y(int)
  location: class Main
1 error
Language: 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.out.println(x * k + y (n - k));
        }else{
        System.out.println(x * n);
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
        System.out.println(x * k + y (n - k));
                                   ^
  symbol:   method y(int)
  location: class Main
1 error
Language: 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;
}

Compiler output:
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;
      |                    ^
Language: 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;
}

Compiler output:
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)
      |            ^
a.cc:9:14: error: 'n' was not declared in this scope
    9 |         if(k<n)
      |              ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before 'return'
    8 |   cout << x*k + y*(n-k)
      |                        ^
      |                        ;
    9 |   return 0;
      |   ~~~~~~
Language: 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;
}


Compiler output:
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;
      |   ^~~~
Language: 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{
      printf('No');
      break;
    }
  }    
  return 0;
}

Compiler output:
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 conversion from 'int' to 'const char*' [-fpermissive]
   16 |         printf('Yes');
      |                ^~~~~
      |                |
      |                int
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:19:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   19 |       printf('No');
      |              ^~~~
      |              |
      |              int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: 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');
      break;
    }
  }    
  return 0;
}

Compiler output:
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 declared in this scope; did you mean 'std::count'?
   11 |     if( count(w, w+len, w+i) % 2 == 0){
      |         ^~~~~
      |         std::count
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:15:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |         printf('Yes');
      |                ^~~~~
      |                |
      |                int
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:18:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   18 |       printf('No');
      |              ^~~~
      |              |
      |              int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: 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;
}

Compiler output:
a.cc:1:9: fatal error: iostrem: No such file or directory
    1 | #include<iostrem>
      |         ^~~~~~~~~
compilation terminated.
Language: 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;
}

Compiler output:
a.cc:1:9: fatal error: bits/t\stdc++.h: No such file or directory
    1 | #include<bits/t\stdc++.h>
      |         ^~~~~~~~~~~~~~~~~
compilation terminated.