criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,K,X,Y,A;
  cin >> N;
  cin >> K;
  cin >> X;
  cin >> Y;
  
  if(N<K){
    a=X*N;
  }else{
    a=X*K+Y*(N-K);
  }
  cout << a << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'a' was not declared in this scope
   12 |     a=X*N;
      |     ^
a.cc:14:5: error: 'a' was not declared in this scope
   14 |     a=X*K+Y*(N-K);
      |     ^
a.cc:16:11: error: 'a' was not declared in this scope
   16 |   cout << a << endl;
      |           ^
Language: C++

#include <iostream>
#include <bitset>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
using namespace std;
using ll = long long int;
using dd = long double;
const ll MOD = 1e9 + 7;

vector<string> dfs(string s, ll depth, vector<char> symbol)
{
    vector<string> ret;
    if (depth == 0)
    {
        ret.push_back(s);
        return ret;
    }

    for (ll i = 0; i < symbol.size(); i++)
    {
        auto vec = dfs(s + symbol[i], depth - 1, symbol);
        for (auto &&e : vec)
        {
            ret.push_back(e);
        }
    }
    return ret;
}

ll gcd(ll a, ll b)
{
    if (a % b == 0)
    {
        return b;
    }
    return gcd(b, a % b);
}

int main()
{
    ll N, K, X, Y;
    cin >> N >> K >> X >> Y;

    cout << min(N - K, 0) * Y + min(N, K) * X << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:16: error: no matching function for call to 'min(ll, int)'
   47 |     cout << min(N - K, 0) * Y + min(N, K) * X << endl;
      |             ~~~^~~~~~~~~~
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:47:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   47 |     cout << min(N - K, 0) * Y + min(N, K) * X << endl;
      |             ~~~^~~~~~~~~~
/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 a.cc:5:
/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:47:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   47 |     cout << min(N - K, 0) * Y + min(N, K) * X << endl;
      |             ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b,c;
  cin >> a >> b >> c >> d;
  
  int answer == b*c + ( a-b ) * b
    
    cout << answer << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'd' was not declared in this scope
    6 |   cin >> a >> b >> c >> d;
      |                         ^
a.cc:8:14: error: expected initializer before '==' token
    8 |   int answer == b*c + ( a-b ) * b
      |              ^~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
  int N, K, X, Y;
  int sum;

  cin >> N >> K >> X >> Y;

  if (N > K)
  {
    sum = K * X + (N-K) * Y
  }
  else sum = N * X

  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before '}' token
   13 |     sum = K * X + (N-K) * Y
      |                            ^
      |                            ;
   14 |   }
      |   ~                         
a.cc:15:19: error: expected ';' before 'cout'
   15 |   else sum = N * X
      |                   ^
      |                   ;
   16 | 
   17 |   cout << sum << endl;
      |   ~~~~
Language: C++

#include <iostream>
using namespace std;


int test(int current,int max_day,int p_up,int price1,int price2){
  if(current==max_day and current>p_up){
    return price2;
  }
  else if(current==max_day and current<=p_up){
    return price1;
  }
  
  else if(current<=p_up){
    return test(current+1,max_day,p_up,price1,price2)+price1;
  }
  else if(current>p_up){
    return test(current+1,max_day,p_up,price1,price2)+price2;
  }
}

int main(){
  int n,k,x,y;
  cin>>n;
  cin>>k;
  cin>>x;
  cin>>y;
  
  cout<<test(n,k,x,y);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: too few arguments to function 'int test(int, int, int, int, int)'
   28 |   cout<<test(n,k,x,y);
      |         ~~~~^~~~~~~~~
a.cc:5:5: note: declared here
    5 | int test(int current,int max_day,int p_up,int price1,int price2){
      |     ^~~~
a.cc: In function 'int test(int, int, int, int, int)':
a.cc:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
Language: C++

#include <bits/stdc>
using namespace std;
int main() {
  int k,x,y,n;
  cin >> k >> x >> y >> n;
  if (n <= k) {
    cout << x*n << endl;
  } else {
    int z = k*x;
    z += (n-k)*y;
    cout << z << endl;
  }
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc: No such file or directory
    1 | #include <bits/stdc>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,K,X,Y;
  cin >> N >> K >> X >> Y;
  
  if(K>N){
    cout << N*X << endl;
  }
  else{
    cout << (N-K)*Y+K*X << endl;
  }

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

import java.util.*;
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<0){
            System.out.println(n*x);
        }else{
        System.out.printnln(k*x+(n-k)*y);
    }
    }
}


Compiler output:
Main.java:13: error: cannot find symbol
        System.out.printnln(k*x+(n-k)*y);
                  ^
  symbol:   method printnln(int)
  location: variable out of type PrintStream
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;
   return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>N>>K>>X>>Y;
      |   ^~~
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout<<N*X<<endl;
      |     ^~~~
a.cc:7:16: error: 'endl' was not declared in this scope
    7 |     cout<<N*X<<endl;
      |                ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<K*X+(N-K)*Y<<endl;
      |     ^~~~
a.cc:9:24: error: 'endl' was not declared in this scope
    9 |     cout<<K*X+(N-K)*Y<<endl;
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
 int N , K , X , Y ;
  cin >> N >> K >> X >> Y :
  
  cout << K*X + (N-K)*Y << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: found ':' in nested-name-specifier, expected '::'
    6 |   cin >> N >> K >> X >> Y :
      |                           ^
      |                           ::
a.cc:6:25: error: 'Y' is not a class, namespace, or enumeration
    6 |   cin >> N >> K >> X >> Y :
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, k, x, y
  int ans = 0;
  cin >> n >> k >> x >> y;
  if (n <= k) {
    ans = x * k;
  } else {
    ans = x * k + y * (n-k);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int ans = 0;
      |   ^~~
a.cc:7:25: error: 'y' was not declared in this scope
    7 |   cin >> n >> k >> x >> y;
      |                         ^
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     ans = x * k;
      |     ^~~
      |     abs
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans = x * k + y * (n-k);
      |     ^~~
      |     abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < (int)(n); i++)

int main( void )
{
    int n,k,x,y;
    cin >> n >> k >> x >. y;
    
    int ans = k * x + (n - k) * y;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected primary-expression before '.' token
    9 |     cin >> n >> k >> x >. y;
      |                         ^
Language: C++

n,k,x,y=[int(input())for _ in [0]*4]
print(n*x) if n<k else print(y*(n-k)+x*k)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,k,x,y=[int(input())for _ in [0]*4]
      | ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
	int N, A;
	cin >> N >> A;
	int x[53];
	int sum = 0;
	for (int i = 0; i < N; i++) {
		cin >> x[i];
		sum += x[i];
	}
	long long dp[53][2550][53] = { 0 };
	dp[0][0][0] = 1;
	for (int i = 0; i < N; i++) {
		for (int k = 0; k <= i; k++) {
			for (int j = 0; j <= sum; j++) {
				if (j >= x[i]&&k>0) {
					dp[i + 1][j][k] = dp[i][j - x[i]][k - 1] + dp[i][j][k];
				}
				else {
					dp[i + 1][j][k] = dp[i][j][k];
				}
			}
		}
	}
	long long combi;
	combi = 0;
	int n = 0;
	n = sum / A;
	for (int i = 1; i <= n; i++) {
			combi += dp[N][i*A][i];
	}
	cout << combi;
	return 0;
}
#include <iostream>
using namespace std;
 
int main() {
	int N, A;
	cin >> N >> A;
	int x[53];
	int sum = 0;
	for (int i = 0; i < N; i++) {
		cin >> x[i];
		sum += x[i];
	}
	long long dp[53][2550][53] = { 0 };
	dp[0][0][0] = 1;
	for (int i = 0; i < N; i++) {
		for (int k = 0; k <= i+1; k++) {
			for (int j = 0; j <= sum; j++) {
				if (j >= x[i]&&k>0) {
					dp[i + 1][j][k] = dp[i][j - x[i]][k - 1] + dp[i][j][k];
				}
				else {
					dp[i + 1][j][k] = dp[i][j][k];
				}
			}
		}
	}
	long long combi;
	combi = 0;
	for (int i = 1; i <= N; i++) {
			combi += dp[N][i*A][i];
	}
	cout << combi;
	return 0;
}

Compiler output:
a.cc:40:5: error: redefinition of 'int main()'
   40 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C++

include <iostream>
using namespace std ;

int main()
{
    int N, K, X, Y, sum ;
    cin >> N >> K >> X >> Y ;
    
    if( N >= K )
    sum = X*N ;
    else
    sum = (X*K)+Y*(N-K) ;

    cout << sum << '\n' ;

    return 0 ;
} 

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N >> K >> X >> Y ;
      |     ^~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << sum << '\n' ;
      |     ^~~~
Language: C++

int main()
{
    int whole,key,be,af;
    cin >> whole;
    cin >> key;
    cin >> be;
    cin >> af;
    if(whole >= key){
    cout << (whole - key + 1) * be + (whole - key) * af << endl;
    }
    else{
        cout << whole * key << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> whole;
      |     ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << (whole - key + 1) * be + (whole - key) * af << endl;
      |     ^~~~
a.cc:9:60: error: 'endl' was not declared in this scope
    9 |     cout << (whole - key + 1) * be + (whole - key) * af << endl;
      |                                                            ^~~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << whole * key << endl;
      |         ^~~~
a.cc:12:32: error: 'endl' was not declared in this scope
   12 |         cout << whole * key << endl;
      |                                ^~~~
Language: Java

    public static void main(String[] args) {
        
        System.out.println(
            new App().calcCost(
                 toInt(args[0])
                ,toInt(args[1])
                ,toInt(args[2])
                ,toInt(args[3])
            )
        );
    }

    public static int toInt (String a) {
        return Integer.parseInt(a);
    }

    private int calcCost(
          final int numStayDay
        , final int limitDay1
        , final int amountDay1
        , final int amountDay2) {

        final int numOfHighCostDay = limitDay1 > numStayDay ? 0 : numStayDay - limitDay1;
        final int x = limitDay1 * amountDay1;
        final int y = numOfHighCostDay * amountDay2;
        return x + y;
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
	int n,k,x,y;
  	cin >> n >> k >> x >> y;
  	if(n>k){
      cout << x*k << endl;
    }
  	else{
		cout << n*k-(n-k)*x-y << endl;
    }
  	
}
f

Compiler output:
a.cc:16:1: error: 'f' does not name a type
   16 | f
      | ^
Language: C++

#include <iostream>

int main()
{
  int N, K, X, Y;
  std::cin >> N >> K >> X >> Y;
  
  if (N - K > 0) std::cout << K*X + (N-K)*Y;
  else std::out << N*X;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'out' is not a member of 'std'; did you mean 'oct'?
    9 |   else std::out << N*X;
      |             ^~~
      |             oct
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main()
{
  int n,k,x,y;
  cin>>n>>k>>x>>y;
  if(n<=k)
    int l=k*x;
  else
  int l=k*x + (n-k)*y;
  cout<<l;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'l' was not declared in this scope
   12 |   cout<<l;
      |         ^
Language: C

/*
Anki:未済
作成日:
*/

#include <stdio.h>

int main()
{
    int n, k, x, y, cost;
    scanf( "%d\n%d\n%d\n%d", &n, &k, &x, &y );

    if( n < k+1 )
    {
        cost = x * k;
        return 0;
    }
    else
    {
        cost = x * k + y * ( n-k )
    }
    printf( "%d", cost );
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:35: error: expected ';' before '}' token
   20 |         cost = x * k + y * ( n-k )
      |                                   ^
      |                                   ;
   21 |     }
      |     ~
Language: C

/*
Anki:未済
作成日:
*/

#include <stdio.h>

int main()
{
    int n, k, x, y;
    scanf( "%d\n%d\n%d\n%d", &n, &k, &x, &y );

    if( n < k+1 )
    {
        cost = x * k;
        return 0;
    }
    else
    {
        cost = x * k + y * ( n-k )
    }
    printf( "%d", cost );
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:9: error: 'cost' undeclared (first use in this function)
   15 |         cost = x * k;
      |         ^~~~
main.c:15:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:35: error: expected ';' before '}' token
   20 |         cost = x * k + y * ( n-k )
      |                                   ^
      |                                   ;
   21 |     }
      |     ~
Language: C++

#include"bits/stdc++.h"
using namespace std;

int main() {
	int N, K, X, Y;
	cin >> N >> K >> X >> Y;

	int sum = 0;
	for (int i = 0; i < N + 1; i++) {
		if (i < K + 1) {
			sum += X;
		}
		else {
			sum += Y;
		}
	}
	cout << sum << endl;
}
#include"bits/stdc++.h"
using namespace std;

int main() {
	int N, K, X, Y;
	cin >> N >> K >> X >> Y;

	int sum = 0;
	for (int i = 0; i < N + 1; i++) {
		if (i < K) {
			sum += X;
		}
		else {
			sum += Y;
		}
	}
	cout << sum << endl;
}


Compiler output:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C

#include <stdio.h>
#include <limits.h>
 int main() { int t,x,y,z,p;
    scanf("%d%d%d%d",&x,&y,&z,&p);
    
    (x>y)? t=y*z+(x-y)*p:
    t=x*z;
    printf("%d",t);
    
    
 return 0; }

Compiler output:
main.c: In function 'main':
main.c:7:6: error: lvalue required as left operand of assignment
    7 |     t=x*z;
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;


int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
 	
	long long n, k, x, y, ans = 0;
	cin >> n >> k >> x >> y;

	ans = min(n, k) *x;
	ans += max(0, n-k) * y;
	cout << ans << '\n';

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: no matching function for call to 'max(int, long long int)'
   14 |         ans += max(0, n-k) * y;
      |                ~~~^~~~~~~~
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:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:14:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   14 |         ans += max(0, n-k) * y;
      |                ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:14:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   14 |         ans += max(0, n-k) * y;
      |                ~~~^~~~~~~~
Language: C++

#include<stdc++.h>
using namespace std;
int main(){
  int N,K,X,Y;cin >> N >> K >> X >> Y;
if (N <= K){
  cout << X*N << endl;
}else{
  cout << X*K+Y*(N-K) << endl;
}
}


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

int N,K,X,Y;cin >> N >> K >> X >> Y;
if (N <= K){
  cout << X*N << endl;
}else{
  cout << X*K+Y*(N-K) << endl;
}

Compiler output:
a.cc:1:13: error: 'cin' does not name a type
    1 | int N,K,X,Y;cin >> N >> K >> X >> Y;
      |             ^~~
a.cc:2:1: error: expected unqualified-id before 'if'
    2 | if (N <= K){
      | ^~
a.cc:4:2: error: expected unqualified-id before 'else'
    4 | }else{
      |  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int N,K,X,Y;
    cin >> N;
  	cin >> K;
  	cin >> X;
  	cin >> Y;
    
    int sum=0;
    for(int i=1;i<=N;i++){
        if(i<=K)
            sum+=X;
         else
            sum+=Y
    }
    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before '}' token
   16 |             sum+=Y
      |                   ^
      |                   ;
   17 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,K,X,Y,sum=0;
  cin>>N>>K>>X>>Y;
  int i=0;
  while(i<K && I<N){
	sum+=X;
  	i++;
  }
  while(i<N){
    sum+=Y;
    i++;
  }
  cout<<sum;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'I' was not declared in this scope
    8 |   while(i<K && I<N){
      |                ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,K,X,Y,sum=0;
  cin>>N>>K>>X>>Y;
  int i=0;
  while(i<K){
	sum+=X;
  	i++;
  }
  while(i<N){
    sum+=Y;
    i++
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before '}' token
   14 |     i++
      |        ^
      |        ;
   15 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int B,a,D,C;
int main()
{
    cin>>C>>D>>a>>B;
    if(C>D) cout<<C*a<<endl
    else {C-=D;cout<<a*D+B*C<<endl;}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected ';' before 'else'
    7 |     if(C>D) cout<<C*a<<endl
      |                            ^
      |                            ;
    8 |     else {C-=D;cout<<a*D+B*C<<endl;}
      |     ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,k,x,y,s;
  cin>>n>>k>>x>>y;
  if(n<=k)s=x*n;
  if(n>k)s=l*x+(n-k)*y;
  cout << s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'l' was not declared in this scope
    8 |   if(n>k)s=l*x+(n-k)*y;
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,k,x,y,s;
  cin>>n>>k>>x>>y;
  if(n<=k)s=x*n;
  if(n>k)s=l*x+(n-k)*y
  cout << s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'l' was not declared in this scope
    8 |   if(n>k)s=l*x+(n-k)*y
      |            ^
Language: C++

int main() {
    int n,k,x,y;
    cin >> n >> k >> x >> y;
    if(n<=k){
        cout << n*x;
    }
    else{
        cout << k*x+(n-k)*y;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n >> k >> x >> y;
      |     ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << n*x;
      |         ^~~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << k*x+(n-k)*y;
      |         ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main() {
  int N,K,X,Y;
  cin >>N>>K>>X>>Y;
  int A;
if (N<=K){  
 A= N*X;
}else{
 A= K*X+(N-K)*Y+
}
  
cout << A;
    return 0;
}    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected primary-expression before '}' token
   11 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	int n, k, x, y; cin >> n >> k >> x >> y;
	if(n <= k) int ans = n * x;
	else int ans = k * x + (n - k) * y;
  
	cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |         cout << ans;
      |                 ^~~
      |                 abs
Language: Java

import java.util.Scanner;

class Main{
  Scanner sin = new Scanner(System.in);
  int N = sin.nextInt();
  int K = sin.nextInt();
  int X = sin.nextInt();
  int Y = sin.nextInt();
  
  if(N<=K){
    int XY = X*N;
  }else{
    int NK = N-K;
    int XY = X*K + Y*NK;
  }
  System.out.println(XY);
}  

Compiler output:
Main.java:10: error: illegal start of type
  if(N<=K){
  ^
Main.java:10: error: <identifier> expected
  if(N<=K){
      ^
Main.java:10: error: <identifier> expected
  if(N<=K){
         ^
Main.java:12: error: illegal start of type
  }else{
   ^
Main.java:16: error: <identifier> expected
  System.out.println(XY);
                    ^
Main.java:16: error: <identifier> expected
  System.out.println(XY);
                       ^
6 errors
Language: Java

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n,k,x,y;
  cin >> n >> k >> x >> y;
  if(n<=k){
    cout << x*n;
  }else{
    cout << x*k+y*(n-k);
  }
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:6: error: not a statement
  cin >> n >> k >> x >> y;
                     ^
Main.java:8: error: not a statement
    cout << x*n;
         ^
Main.java:10: error: not a statement
    cout << x*k+y*(n-k);
         ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
6 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v()  sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
  /* #ifndef ONLINE_JUDGE
      // for getting input from input.txt
      freopen("input.txt", "r", stdin);
      // for writing output to output.txt
      freopen("output.txt", "w", stdout);
  #endif*?
fast();
//ll  t;cin>>t;while(t--)
{
  ll n,k,x,y,s=0;
  cin>>n>>k>>x>>y;
  ll ans=min(n,k)*x;
  ll temp=(n-k)>0?((n-k)*y):0;
  cout<<ans+temp<<endl;
  

}
return 0;
}

Compiler output:
a.cc:33:3: error: unterminated comment
   33 |   /* #ifndef ONLINE_JUDGE
      |   ^
a.cc: In function 'int main()':
a.cc:32:13: error: expected '}' at end of input
   32 | int main() {
      |            ~^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args){

        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int stay = Integer.parseInt(input.readLine());
        int sale = Integer.parseInt(input.readLine());
        int normalCost = Integer.parseInt(input.readLine());
        int saleCost = Integer.parseInt(input.readLine());
        if(stay > sale){
            System.out.println(sale * normalCost + (( stay - sale ) * saleCost));
        }else{
        System.out.println(stay * normalCost);
        }
    }
}


Compiler output:
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
        int stay = Integer.parseInt(input.readLine());
                                                  ^
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
        int sale = Integer.parseInt(input.readLine());
                                                  ^
Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
        int normalCost = Integer.parseInt(input.readLine());
                                                        ^
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
        int saleCost = Integer.parseInt(input.readLine());
                                                      ^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int stay = Integer.parseInt(input.readLine());
        int sale = Integer.parseInt(input.readLine());
        int normalCost = Integer.parseInt(input.readLine());
        int saleCost = Integer.parseInt(input.readLine());
        if(stay > sale){
            System.out.println(sale * normalCost + (( stay - sale ) * saleCost));
        }else{
        System.out.println(stay * normalCost);
        }
    }
}


Compiler output:
Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
        int stay = Integer.parseInt(input.readLine());
                                                  ^
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
        int sale = Integer.parseInt(input.readLine());
                                                  ^
Main.java:12: error: unreported exception IOException; must be caught or declared to be thrown
        int normalCost = Integer.parseInt(input.readLine());
                                                        ^
Main.java:13: error: unreported exception IOException; must be caught or declared to be thrown
        int saleCost = Integer.parseInt(input.readLine());
                                                      ^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in))
        int stay = Integer.parseInt(input.readLine());
        int sale = Integer.parseInt(input.readLine());
        int normalCost = Integer.parseInt(input.readLine());
        int saleCost = Integer.parseInt(input.readLine());
        if(stay > sale){
            System.out.println(sale * normalCost + (( stay - sale ) * saleCost));
        }else{
        System.out.println(stay * normalCost);
        }
    }
}


Compiler output:
Main.java:9: error: ';' expected
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in))
                                                                                   ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
   cin.tie(0);
   ios::sync_with_stdio(false);
   long long n, k, x, y;
   cin >> n >> k >> x >> y;
   if((n-k)<0) {
       int num = 0;
   } else {
       num = n-k;
   }
   cout << k*x+num*y << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'num' was not declared in this scope; did you mean 'enum'?
   11 |        num = n-k;
      |        ^~~
      |        enum
a.cc:13:16: error: 'num' was not declared in this scope; did you mean 'enum'?
   13 |    cout << k*x+num*y << endl;
      |                ^~~
      |                enum
Language: Java

import java.util.Scanner;

public class Hotel {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n,k,x,y ;
		n = sc.nextInt();
		k = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();

		if(n > k) {
		System.out.println((k*x)+((n-k)*y));
		}else{
			System.out.println("n*x");
		}

	}
}


Compiler output:
Main.java:3: error: class Hotel is public, should be declared in a file named Hotel.java
public class Hotel {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Hotel {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n,k,x,y ;
		n = sc.nextInt();
		k = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();
		System.out.println((k*x)+((n-k)*y));
	}
}


Compiler output:
Main.java:3: error: class Hotel is public, should be declared in a file named Hotel.java
public class Hotel {
       ^
1 error
Language: Java

package java_sample;

import java.util.Scanner;

public class Hotel {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n,k,x,y ;
		n = sc.nextInt();
		k = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();
		System.out.println((k*x)+((n-k)*y));
	}
}


Compiler output:
Main.java:5: error: class Hotel is public, should be declared in a file named Hotel.java
public class Hotel {
       ^
1 error
Language: C

#include <stdio.h>

int main(){
  int n,k,x,y;
  int total=0;
    
  scanf_s("%d",&n);
  scanf_s("%d",&k);
  scanf_s("%d",&x);
  scanf_s("%d",&y);
  
  if(n<=k){
    total=n*x;
  } else {
    total=k*x;
    total+=((n-k)*y);
  }
  
  printf("%d",total);
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   scanf_s("%d",&n);
      |   ^~~~~~~
      |   scanf
Language: C++


#include<bits/stdc++.h>



using namespace std;

int main(){

   long long N,K,X,Y;

   cin>>N;
   cin>>K;
   cin>>X;
   cin>>Y;

   if(N<K){
    cout<<N*X;
   }
   else{
2
   cout<<(K*X)+(N-K)*Y;

   }



   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected ';' before 'cout'
   21 | 2
      |  ^
      |  ;
   22 |    cout<<(K*X)+(N-K)*Y;
      |    ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {

int A,B,C,D,ans;
	cin>>A>>B>>C>>D;
for(int i=0; i<N;i++){
  if(i>K){ans+=D;}
  else{ans+=C;}
}
	
	cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'N' was not declared in this scope
    8 | for(int i=0; i<N;i++){
      |                ^
a.cc:9:8: error: 'K' was not declared in this scope
    9 |   if(i>K){ans+=D;}
      |        ^
Language: Java

import java.util.*;
import java.util.ArrayList;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int d = sc.nextInt();
      int n = a-b;
      int counter =0;
      if(n>0){
      	System.out.println( (b*c)+(n*d));
      }else{
      	System.out.println(a*d);
        
      }
}


Compiler output:
Main.java:18: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main() {
  int n,k,x,y;
  cin>>n>>K>>x>>y;
  cout<<min(k,n)*x+max(n-k,0)*y<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'K' was not declared in this scope
    5 |   cin>>n>>K>>x>>y;
      |           ^
Language: 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;
}

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

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected ';' before ':' token
   11 |  return 0:
      |          ^
      |          ;
Language: 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: 
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: expected ';' before '}' token
   14 |         price = (n - k)*y + k * x
      |                                  ^
      |                                  ;
   15 |     }
      |     ~
Language: 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: ");

        k = input.nextInt();

        System.out.print("X = ");

        x = input.nextInt();

        System.out.print("Y = ");

        y = input.nextInt();

        if ((n >= 1 && n <= 10000) && (k >= 1 && k <= 10000)) {

            if ((x >= 1 && x <= 10000) && (y >= 1 && y <= 10000)) {

                for (int i = 1; i <= k; i++) {

                    total1 = total1 + x;
                }

                for (int i = 1; i <= n - k; i++) {

                    total2 = total2 + y;
                }
            }
        }


        total = total1 + total2;

        System.out.println(total);
    }
}


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

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

Compiler output:
main.c: In function 'main':
main.c:13:5: error: expected declaration or statement at end of input
   13 |     }
      |     ^
Language: 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;    
    }

Compiler output:
main.c: In function 'main':
main.c:13:5: error: expected declaration or statement at end of input
   13 |     }
      |     ^
Language: 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;
}

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

Compiler output:
main.c: In function 'main':
main.c:12:10: error: expected '(' before '{' token
   12 |   else if{
      |          ^
      |          (
Language: 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)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: 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;
}

Compiler output:
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 |         Z = |X-Y|;
      |                  ^
Language: 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;
}

Compiler output:
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|);
      |                                       ^
Language: 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<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VD> VVD;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
using Graph=vector<vector<int>>;


template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

int main()
{
  i N,K;
  cin>>N>>K;
  int Y,X;
  cin>>X>>Y;
  if(N>K)
  {
    cout<<X*K+Y*(N-K);
  }
  else
  {
    cout<<X*N;
  }
}

Compiler output:
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;
      |           ^
Language: 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<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VD> VVD;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
using Graph=vector<vector<int>>;


template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

int main()
{
  i N,K;
  cin>>N>>K;
  int Y,X;
  cin>>X>>Y;
  if(N>K)
  {
    cout<<X*K+Y*(N-K);
  }
  else
  {
    cout<<K*N;
  }
}

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

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

Compiler output:
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)
      |           ^
Language: 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>y?x:y)
 #define min(x,y) (x<y?x:y)
 #define MAX 100000000000000000
 #define MOD 1000000007
 #define pi acos(-1.0)
 #define ei exp(1)
 #define PI 3.141592653589793238462
 #define INF 0x3f3f3f3f3f
 #define mem(a) (memset(a,0,sizeof(a)))
 typedef long long ll;
 ll gcd(ll a,ll b){
     return b?gcd(b,a%b):a;
 }
 bool cmp(int x,int y)
 {
     return x>y;
 }
 const int N=10005;
 const int mod=1e9+7;
 int main()
 {
     std::ios::sync_with_stdio(false);
     int n,k,x,y;
     cin>>n>>k>>x>>y;
     ll s=0;
     if(n<=k) s+=n*x;
     else s+=k*x+(n-k)*y;
     cout<<s<<endl;
     return 0;
 }

Compiler output:
main.c:1:11: fatal error: iostream: No such file or directory
    1 |  #include <iostream>
      |           ^~~~~~~~~~
compilation terminated.
Language: 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;
}

Compiler output:
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 *
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:18: error: reached end of file while parsing
    }
     ^
1 error