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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: expected initializer before 'if'
    7 |  if (K <= N) {answer = X * K + Y * (N - K);}
      |  ^~
a.cc:8:2: error: 'else' without a previous 'if'
    8 |  else {answer = X * N;}
      |  ^~~~
a.cc:8:8: error: 'answer' was not declared in this scope
    8 |  else {answer = X * N;}
      |        ^~~~~~
a.cc:9:10: error: 'answer' was not declared in this scope
    9 |  cout << answer << endl;
      |          ^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b,c,d;  
  cin>>a>>b>>c>>d;
  if(b<=A){cout<<(a-b)*d+b*c<<endl;}
  else{cout<<b*c<<endl;}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'A' was not declared in this scope
    6 |   if(b<=A){cout<<(a-b)*d+b*c<<endl;}
      |         ^
Language: C++

#include <iostream>
using namespace std;
int n;
int main(){
  int a,b,c,d;  
  cin>>a>>b>>c>>d;
  if(b<=A){cout<<(a-b)*d+b*c<<endl;}
  else{cout<<b*c<<endl;}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'A' was not declared in this scope
    7 |   if(b<=A){cout<<(a-b)*d+b*c<<endl;}
      |         ^
Language: C++

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

int main(){
  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:5:8: error: 'N' was not declared in this scope
    5 |   cin>>N>>K>>X>>Y;
      |        ^
a.cc:5:11: error: 'K' was not declared in this scope
    5 |   cin>>N>>K>>X>>Y;
      |           ^
a.cc:5:14: error: 'X' was not declared in this scope
    5 |   cin>>N>>K>>X>>Y;
      |              ^
a.cc:5:17: error: 'Y' was not declared in this scope
    5 |   cin>>N>>K>>X>>Y;
      |                 ^
Language: Java

package aproblems;
import java.util.Scanner;

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

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();

		int result = 0;
		if (N>K) {			
			result = X*K;
			result += Y*(N-K);
		} else {
			result = X*N;
		}
		System.out.println(result);
	}

}


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

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<iomanip>
using namespace std;
int main()
{
	int n,k,x,y;
	cin>>n>>k>>x>>y;
	if(n>k)
	{
		m=k*x+(n-k)*y;
	}
	else
	{
		m=n*x;
	}
	cout<<m<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'm' was not declared in this scope
   14 |                 m=k*x+(n-k)*y;
      |                 ^
a.cc:18:17: error: 'm' was not declared in this scope
   18 |                 m=n*x;
      |                 ^
a.cc:20:15: error: 'm' was not declared in this scope
   20 |         cout<<m<<endl;
      |               ^
Language: C

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

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

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

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

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

total = 0
for i in range(N):
    if i <= (K - 1):
        total += X
    else:
        total += Y
print(total)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C


#include <stdio.h>
int main()
{
   int N,K,X,Y,s,i;
   long long int X,Y,s;
    scanf("%d %d %lld %lld",&N,&K,&X,&Y);
    s=K*X+(N-K)*Y;
   printf("%lld\n",s);


return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:18: error: conflicting types for 'X'; have 'long long int'
    6 |    long long int X,Y,s;
      |                  ^
main.c:5:12: note: previous declaration of 'X' with type 'int'
    5 |    int N,K,X,Y,s,i;
      |            ^
main.c:6:20: error: conflicting types for 'Y'; have 'long long int'
    6 |    long long int X,Y,s;
      |                    ^
main.c:5:14: note: previous declaration of 'Y' with type 'int'
    5 |    int N,K,X,Y,s,i;
      |              ^
main.c:6:22: error: conflicting types for 's'; have 'long long int'
    6 |    long long int X,Y,s;
      |                      ^
main.c:5:16: note: previous declaration of 's' with type 'int'
    5 |    int N,K,X,Y,s,i;
      |                ^
Language: C++

#include<iostream>
using namespace std;

int n;

int main(){
    cin>>n>>k>>x>>y;
    int ans=0;
    for(i=1;i<=n;i++){
        if(i<=k)ans+=x;
        else ans+=y;
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'k' was not declared in this scope
    7 |     cin>>n>>k>>x>>y;
      |             ^
a.cc:7:16: error: 'x' was not declared in this scope
    7 |     cin>>n>>k>>x>>y;
      |                ^
a.cc:7:19: error: 'y' was not declared in this scope
    7 |     cin>>n>>k>>x>>y;
      |                   ^
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i=1;i<=n;i++){
      |         ^
Language: C++

import java.util.Scanner;

public class Main {

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

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

int main(){
    string a;
    cin >> a;
    int arr[1000];
    memset(arr,0,sizeof(arr));
    for(int i=0;i<a.size();i++){
        arr[(int)a[i]]++;
    }
    int c=0;
    for (int i=’a’;i<=’z’,i++){
        if(arr[i]%2!=0) c++;
    }
    if (c!=0) cout << ’No’ <<endl;
    else cout << ’Yes’ << endl;
}

Compiler output:
a.cc:13:16: error: extended character ’ is not valid in an identifier
   13 |     for (int i=’a’;i<=’z’,i++){
      |                ^
a.cc:13:16: error: extended character ’ is not valid in an identifier
a.cc:13:23: error: extended character ’ is not valid in an identifier
   13 |     for (int i=’a’;i<=’z’,i++){
      |                       ^
a.cc:13:23: error: extended character ’ is not valid in an identifier
a.cc:16:23: error: extended character ’ is not valid in an identifier
   16 |     if (c!=0) cout << ’No’ <<endl;
      |                       ^
a.cc:16:23: error: extended character ’ is not valid in an identifier
a.cc:17:18: error: extended character ’ is not valid in an identifier
   17 |     else cout << ’Yes’ << endl;
      |                  ^
a.cc:17:18: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:13:16: error: '\U00002019a\U00002019' was not declared in this scope
   13 |     for (int i=’a’;i<=’z’,i++){
      |                ^~~
a.cc:13:23: error: '\U00002019z\U00002019' was not declared in this scope
   13 |     for (int i=’a’;i<=’z’,i++){
      |                       ^~~
a.cc:13:30: error: expected ';' before ')' token
   13 |     for (int i=’a’;i<=’z’,i++){
      |                              ^
      |                              ;
a.cc:16:23: error: '\U00002019No\U00002019' was not declared in this scope
   16 |     if (c!=0) cout << ’No’ <<endl;
      |                       ^~~~
a.cc:17:18: error: '\U00002019Yes\U00002019' was not declared in this scope
   17 |     else cout << ’Yes’ << endl;
      |                  ^~~~~
Language: C++

#include<iostream>
#include<cmath>
uisng namespace std;
int main()
{
  int N,K,X,Y;cin>>N>>K>>X>>Y;
  cout<<X*min(N,K)+Y*max(N-K,0)<<endl;
  return 0;
}

Compiler output:
a.cc:3:1: error: 'uisng' does not name a type
    3 | uisng namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   int N,K,X,Y;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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<X*min(N,K)+Y*max(N-K,0)<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |   cout<<X*min(N,K)+Y*max(N-K,0)<<endl;
      |           ^~~
      |           std::min
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:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:7:22: error: 'max' was not declared in this scope; did you mean 'std::max'?
    7 |   cout<<X*min(N,K)+Y*max(N-K,0)<<endl;
      |                      ^~~
      |                      std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:7:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<X*min(N,K)+Y*max(N-K,0)<<endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

int main(void){
  int n,k,l,x,y;
  
  cin >> n >> k >> x >> y;
  n = n>k? n-k: 0;
  cout << (k*x+n*y) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: 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:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout << (k*x+n*y) << endl;
      |   ^~~~
      |   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:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout << (k*x+n*y) << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

const int Nmax = 50;
const int Amax = 50;
const int Xmax = 50;

long dp[Nmax+1][Nmax+1][Nmax*Xmax+1] = {};
long xarr[Xmax];

int main()
{
  long N,A;

  cin >> N >> A;
  for (int i = 0; i < N; i++) cin >> xarr[i];
  // end input

  long m = (long)max(A, *max_element(xarr, xarr+N));

  for (int j = 0; j <= N; j++) {
    for (int k = 0; k <= N; k++) {
      for (int s = 0; s <= m*N; s++) {
	long tmp = 0;
	if (j == 0 && k == 0 && s == 0) { tmp = 1; }
	else if (j >= 1 && s < xarr[j-1]) { tmp = dp[j-1][k][s]; }
	else if (j >= 1 && k >= 1 && s >= xarr[j-1]) {
	  tmp = dp[j-1][k][s] + dp[j-1][k-1][s-xarr[j-1]];
	}
	dp[j][k][s] = tmp;
      }
    }
  }

  long sum = 0;
  for (int i = 1; i <= N; i++) sum += dp[N][i][i*A];
  cout << sum << "\n=="<<endl;

  //  for (int i = 0; i < m*N; i++) cout << dp[N-1][i][i*A] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: 'max_element' was not declared in this scope
   20 |   long m = (long)max(A, *max_element(xarr, xarr+N));
      |                          ^~~~~~~~~~~
Language: C++

n = int(input())
k = int(input())
x = int(input())
y = int(input())

sum = 0
for i in range(n):
    if i < k:
        sum += x
    else:
        sum += y

print(sum)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

using System;

class A {
    public static void Main() {
        var n = int.Parse(Console.ReadLine());
        var k = int.Parse(Console.ReadLine());
        var x = int.Parse(Console.ReadLine());
        var y = int.Parse(Console.ReadLine());
        Console.WriteLine(n < k ? n * x : k * x + (n - k) * y);
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void Main() {
      |           ^~~~~~~
      |           :
a.cc:11:2: error: expected ';' after class definition
   11 | }
      |  ^
      |  ;
a.cc: In static member function 'static void A::Main()':
a.cc:5:9: error: 'var' was not declared in this scope
    5 |         var n = int.Parse(Console.ReadLine());
      |         ^~~
a.cc:6:13: error: expected ';' before 'k'
    6 |         var k = int.Parse(Console.ReadLine());
      |             ^
a.cc:7:13: error: expected ';' before 'x'
    7 |         var x = int.Parse(Console.ReadLine());
      |             ^
a.cc:8:13: error: expected ';' before 'y'
    8 |         var y = int.Parse(Console.ReadLine());
      |             ^
a.cc:9:9: error: 'Console' was not declared in this scope
    9 |         Console.WriteLine(n < k ? n * x : k * x + (n - k) * y);
      |         ^~~~~~~
a.cc:9:27: error: 'n' was not declared in this scope
    9 |         Console.WriteLine(n < k ? n * x : k * x + (n - k) * y);
      |                           ^
a.cc:9:31: error: 'k' was not declared in this scope
    9 |         Console.WriteLine(n < k ? n * x : k * x + (n - k) * y);
      |                               ^
a.cc:9:39: error: 'x' was not declared in this scope
    9 |         Console.WriteLine(n < k ? n * x : k * x + (n - k) * y);
      |                                       ^
a.cc:9:61: error: 'y' was not declared in this scope
    9 |         Console.WriteLine(n < k ? n * x : k * x + (n - k) * y);
      |                                                             ^
Language: C++

#include<iostream>
using namespace std;

int main(void)
  int n, k, x, y;
	cin >> n >> k >> x >> y;

   if (n > k ) cout << k*x+(n-k)*y << endl;
	else cout << n*x << endl;
}

Compiler output:
a.cc:5:3: error: expected initializer before 'int'
    5 |   int n, k, x, y;
      |   ^~~
a.cc:6:9: error: 'cin' does not name a type
    6 |         cin >> n >> k >> x >> y;
      |         ^~~
a.cc:8:4: error: expected unqualified-id before 'if'
    8 |    if (n > k ) cout << k*x+(n-k)*y << endl;
      |    ^~
a.cc:9:9: error: expected unqualified-id before 'else'
    9 |         else cout << n*x << endl;
      |         ^~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

    #include <iostream>
     int main() {
       int N, K, X, Y;
       std::cin >> N;
       std::cin >> K;
       std::cin >> X;
       std::cin >> Y;
       
       if (N >= K) {
         int ans = K * X + (N - K) * Y;
       
       std::cout << ans <<std::endl;
       } else {
         int ans = N * X;
         std::cout << ans <<std::endl;
       
       return 0;
     }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: expected '}' at end of input
   18 |      }
      |       ^
a.cc:2:17: note: to match this '{'
    2 |      int main() {
      |                 ^
Language: C++

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

int main() {
  int N, K, X, Y
  if (N <= K) {
    cout << N * X << endl;
  }
  else {
    cout << N * Y << endl;
  }
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'if'
    6 |   if (N <= K) {
      |   ^~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else {
      |   ^~~~
a.cc:10:17: error: 'Y' was not declared in this scope
   10 |     cout << N * Y << endl;
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n, k, x, y, a;
  cin >> n >> k >> x >> y;
  if (k >= n){
    cout << n * x << endl;
  }else{
    k - n = a;
    cout << (a * y) + (n * x) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: lvalue required as left operand of assignment
    9 |     k - n = a;
      |     ~~^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n, k, x, y, a;
  cin >> n >> k >> x >> y;
  if (k > n){
    cout << n * x << endl;
  }else{
    k - n = a;
    cout << a * y + n * x << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: lvalue required as left operand of assignment
    9 |     k - n = a;
      |     ~~^~~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before '}' token
   10 |   return 0
      |           ^
      |           ;
   11 | 
   12 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
   int a,b,c,d,pay;
  cin>>a>>b>>c>>d;
  
  if(a<=b){
    pay=a*c;
  }
  else{
    pay=b*c+(a-b)*d
  }
  
  cout<<pay<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before '}' token
   11 |     pay=b*c+(a-b)*d
      |                    ^
      |                    ;
   12 |   }
      |   ~
Language: C

#include<stdio.h>
int main()
    int N,K,X,Y;
    scanf("%d",&N)
    
}


Compiler output:
main.c: In function 'main':
main.c:4:5: error: expected declaration specifiers before 'scanf'
    4 |     scanf("%d",&N)
      |     ^~~~~
main.c:3:15: error: declaration for parameter 'Y' but no such parameter
    3 |     int N,K,X,Y;
      |               ^
main.c:3:13: error: declaration for parameter 'X' but no such parameter
    3 |     int N,K,X,Y;
      |             ^
main.c:3:11: error: declaration for parameter 'K' but no such parameter
    3 |     int N,K,X,Y;
      |           ^
main.c:3:9: error: declaration for parameter 'N' but no such parameter
    3 |     int N,K,X,Y;
      |         ^
main.c:7: error: expected '{' at end of input
Language: C

#include<stdio.h>
main()
{
    int i,j,k,l,h,p,f,a;
    scanf("%d", &i);
    scanf("%d", &j);
    scanf("%d", &l);
    scanf("%d", &h);
    p=i*l;
    f=j*h;
    a=(p+f);
    printf("The accmodation fee is as follows: \n %d Eor 1st night\n %d For the 2nd night \n Thus in total=%d", p,f,a);
}
#include<stdio.h>
main()
{
    int i,j,k,l,h,p,f,a;
    scanf("%d", &i);
    scanf("%d", &j);
    scanf("%d", &l);
    scanf("%d", &h);
    p=i*l;
    f=j*h;
    a=(p+f);
    printf("The accmodation fee is as follows: \n %d Eor 1st night\n %d For the 2nd night \n Thus in total=%d", p,f,a);
}


Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c:15:1: error: return type defaults to 'int' [-Wimplicit-int]
   15 | main()
      | ^~~~
main.c:15:1: error: redefinition of 'main'
main.c:2:1: note: previous definition of 'main' with type 'int()'
    2 | main()
      | ^~~~
Language: C++

#include <bits/stdc++.h>
//---------------------------
using namespace std;
//---------------------------
#define REP(i,n) for(int i = 0; i < (n); i++)
#define P(x) cout << (x) << "\n"

#define MOD 1000000007 // 1e9+7
#define PI acos(-1.0)
#define ll long long int // 10^18
#define INF 1000000001 // 1e9+1

int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};
//---------------------------

int main(){
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);

  // ifstream in("input.txt");
  // cin.rdbuf(in.rdbuf());

  int a,b,c,d;cin>>a>>b>>c>>d;
  int ans;
  if(n<=k){
    ans=c*n;
  }else{
    ans=c*k+d*(n-k);
  }
  P(ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:6: error: 'n' was not declared in this scope
   26 |   if(n<=k){
      |      ^
a.cc:26:9: error: 'k' was not declared in this scope
   26 |   if(n<=k){
      |         ^
Language: C++

#include <cstdio>
int main() {
  int n, k, x, y;
  scanf("%d%d%d%d", &n, &k, &x, &y);
  printf("%d\n",n>k ? (n-k) * y + k * x : n * x));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:49: error: expected ';' before ')' token
    5 |   printf("%d\n",n>k ? (n-k) * y + k * x : n * x));
      |                                                 ^
      |                                                 ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,K,X,Y;
  int sum=0;
  for(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:6:7: error: 'i' was not declared in this scope
    6 |   for(i=1;i<=N;i++){
      |       ^
Language: C++

#include<iostrem>
using namespace std;
int main(){
  int N,K,X,Y;
  int sum=0;
  for(i=1;i<=N;i++){
    if(i<=K)sum+=X;
    else sum+=Y;
  }
  cout<<sum<<endl;
}

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

#include <stdio.h>
int main(){
  int a,b,c,d;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  
  if(a>b){
    int count=b*c+(a-b)*d;
  }
  else{
    int count=b*c;
  }
  
  printf("%d\n",count);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'count' was not declared in this scope
   13 |   printf("%d\n",count);
      |                 ^~~~~
Language: C++

#include <stdio.h>
int mian(){
  int a,b,c,d;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  
  if(a>b){
    int count=b*c+(a-b)*d;
  }
  else{
    int count=b*c;
  }
  
  printf("%d\n",count);
  
  return 0;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:13:17: error: 'count' was not declared in this scope
   13 |   printf("%d\n",count);
      |                 ^~~~~
Language: C++

#include<iostream>
int main(){
  int N,K,a,b;
  cin>>N>>K>>a>>b;
  int total=0;
  for(int i=1;i<=N;i++){
    if(i<=K)total+=a;
    else total+=b;
  }
  cout<<total<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>N>>K>>a>>b;
      |   ^~~
      |   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:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout<<total<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout<<total<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc:19:2: error: stray '#' in program
   19 | }#include <bits/stdc++.h>
      |  ^
a.cc:19:3: error: 'include' does not name a type
   19 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:21:5: error: redefinition of 'int main()'
   21 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
Language: C++

package main

import "fmt"

func main() {
	var n, k, x, y int
	fmt.Scanf("%d\n%d\n%d\n%d\n", &n, &k, &x, &y)

	if n-k > 0 {
		fmt.Println(k*x + (n-k)*y)
	} else {
		fmt.Println(n * x)
	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |         ans = n * x;
      |         ^~~
      |         abs
a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |         ans = n * x + (n - k) * y;
      |         ^~~
      |         abs
a.cc:20:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
	int a, b, c, d, ans;
	cin >> a >> b >> c >> d;
	ans = min(a, b)*c + min(a - b, 0)*d << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:45: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |         ans = min(a, b)*c + min(a - b, 0)*d << endl;
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C

#include <stdio.h>
#include <math.h>


int main() 
{
    int n,k,x,y,e,f,g,;
    
    scanf("%d",&n);
    scanf("%d",&k);
    scanf("%d",&x);
    scanf("%d",&y);
    if(k>n)
    {
        printf("%d",x*n);
    }else{
    
    e=k*x;
    f=n-k;
    g=f*y;
    
    
    printf("%d",g+e);
    }
    
   
}

Compiler output:
main.c: In function 'main':
main.c:7:23: error: expected identifier or '(' before ';' token
    7 |     int n,k,x,y,e,f,g,;
      |                       ^
Language: C++

include <stdio.h>

int main(void) {

  int x, y, n, k, sum;

  scanf("%d%d%d%d", &n, &k, &x, &y);

  if (n - k <= 0)
    sum = n * x;
  else
    sum = k * x + (n - k) * y;

  printf("%d\n", sum);

  return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

#include <iostream>
 
using namespace std;
 
int main(){
int N,K,X,Y
long long int ans=0;
cin >> N >> K >> X >> Y;
ans = K*X;
if(N>K)ans+=(N-K)*Y;
cout << ans;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected initializer before 'long'
    7 | long long int ans=0;
      | ^~~~
a.cc:8:23: error: 'Y' was not declared in this scope
    8 | cin >> N >> K >> X >> Y;
      |                       ^
a.cc:9:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 | ans = K*X;
      | ^~~
      | abs
Language: Java

import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int K = in.nextInt();
        int X = in.nextInt();
        int Y = in.nextInt();


        if (K > N) {
            System.out.println(N * X);
        } else {
            int sumX = K * X;
            int sumY = (N - K) * Y;
            System.out.println(sumX + sumY);
        }
       
    }



    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


Compiler output:
Main.java:79: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before 'int'
    9 | int X;
      | ^~~
a.cc:13:8: error: 'X' was not declared in this scope
   13 | cin >> X;
      |        ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String a = s.nextLine();
		char[] ar = a.toCharArray();
		loop: for (int i = 0;i < ar.length();i++) {
			int y = 0;
			for (int m = 0;m < ar.length();m++) {
				if(ar[n].equals(ar[m])) {
					y += 1;
				}
				if(m.equals(ar[ar.length()])) {
					if(y % 2 == 1) {
						System.out.println("No");
						break loop;
					}
				}
			}
		}
		System.out.println("Yes");
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		loop: for (int i = 0;i < ar.length();i++) {
		                           ^
  symbol:   method length()
  location: variable ar of type char[]
Main.java:9: error: cannot find symbol
			for (int m = 0;m < ar.length();m++) {
			                     ^
  symbol:   method length()
  location: variable ar of type char[]
Main.java:10: error: cannot find symbol
				if(ar[n].equals(ar[m])) {
				      ^
  symbol:   variable n
  location: class Main
Main.java:10: error: char cannot be dereferenced
				if(ar[n].equals(ar[m])) {
				        ^
Main.java:13: error: cannot find symbol
				if(m.equals(ar[ar.length()])) {
				                 ^
  symbol:   method length()
  location: variable ar of type char[]
Main.java:13: error: int cannot be dereferenced
				if(m.equals(ar[ar.length()])) {
				    ^
6 errors
Language: Java

import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int k = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		System.out.println(x*k+Math.max(0, y*(n-k);
	}
}


Compiler output:
Main.java:12: error: ')' or ',' expected
		System.out.println(x*k+Math.max(0, y*(n-k);
		                                          ^
1 error
Language: Java

import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int k = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		System.out.println(x*k+Math.max(0, y*(n-k));
	}
}


Compiler output:
Main.java:12: error: ')' or ',' expected
		System.out.println(x*k+Math.max(0, y*(n-k));
		                                           ^
1 error
Language: Java

package atcoder;

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

public class Main001 {
	 
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		FastScanner in = new FastScanner(inputStream);

		
		char[] c = in.next().toCharArray();
		int[] num = new int[26];
		
		for (int i = 0; i < c.length; i++) {
			num[c[i] - 'a']++;
		}
		
		boolean isBeautiful = true;
		for (int i = 0; i < num.length; i++) {
			if (num[i] % 2 != 0) {
				isBeautiful = false;
				break;
			}
		}
		
		System.out.println(isBeautiful ? "Yes" : "No");
	}
	
	static class FastScanner {
		private BufferedReader in;
		private StringTokenizer st;
 
		public FastScanner(InputStream stream) {
			in = new BufferedReader(new InputStreamReader(stream));
		}
 
		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					String rl = in.readLine();
					if (rl == null) {
						return null;
					}
					st = new StringTokenizer(rl);
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}
 
		public int nextInt() {
			return Integer.parseInt(next());
		}
 
	}
}

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

#include<bits/stdc++.h>

#define fi first
#define se second
#define FO(x, n) for (int x = 0; x < n; ++x)
#define FOR(x, a, b) for (int x = a; x < b; ++x)
#define RFO(x, n) for (int x = n - 1; x >= 0; --x)
#define RFOR(x, a, b) for (int x = b - 1; x >= a; --x)
#define FOR_ITER(x, a) for(auto x = a.begin(); x != a.end(); ++x)
using namespace std;
typedef unsigned char byte;
typedef long long llong;
typedef unsigned long long ullong;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<string, string> pss;
typedef pair<llong, llong> pll;
inline bool feq(const double& a, const double& b) { return fabs(a - b) < 1e-10; }

using namespace std;

int n, k, x, y;

int main(){
//    int n, l;
//    cin >> n >> k;
//    vector<bool> dislike(10, false);
//
//    FOR(i, 0, k) {
//        int t;
//        cin >> t;
//        dislike[t] = true;
//    }


    cin >> n >> k >> x >> y;

    int sum = 0;
    FOR(i, 1, n + 1) {
        if(i > k) {
            sum += y;
        } else {
            sum += x;
        }
    }

    cout << sum. << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:18: error: expected unqualified-id before '<<' token
   47 |     cout << sum. << endl;
      |                  ^~
Language: C++


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

int main( int argc, char *argv[] )
{
int N;
int K;
int X;
int Y;

	ios::sync_with_stdio( false );
	cin.tie( 0 );

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

	return 0;

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:24:18: error: expected '}' at end of input
   24 |         return 0;
      |                  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>

using namespace std;

int main(){

int N,K,X,Y;
cin >> N >> K >> X >> Y;

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

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: expected '}' before 'else'
   13 | else{
      | ^~~~
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
a.cc:13:1: error: expected '}' before 'else'
   13 | else{
      | ^~~~
a.cc:10:8: note: to match this '{'
   10 | if(N>K){
      |        ^
Language: C++

#include<iostream>

using namespace std;

int main(){

int a,b,c;
cin >> a >> b >> c;

int i=0;
while(i<a){
cout << +b << endl;
i++1;
}
cout << +c << endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: expected ';' before numeric constant
   13 | i++1;
      |    ^
      |    ;
Language: C++

#include<iostream>

using namesapce std;

int main(){

int a,b,c;
cin >> a >> b >> c;

int i=0;
while(i<a){
cout << +b << endl;
i++1;
}
cout << +c << endl;

return 0;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin >> a >> b >> c;
      | ^~~
      | 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:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 | cout << +b << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 | cout << +b << endl;
      |               ^~~~
      |               std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:4: error: expected ';' before numeric constant
   13 | i++1;
      |    ^
      |    ;
a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 | cout << +c << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 | cout << +c << endl;
      |               ^~~~
      |               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

package main

import (
  "fmt"
)

func min(x, y int) int {
  if x > y {
    return y
  }
  return x
}

func main(){
  var n,k,x,y int
  fmt.Scan(&n, &k, &x, &y)

  if min(n,k) == n {
    fmt.Println(n * x)
  } else {
    fmt.Println(k * x + (n-k) * y)
  }
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:14:1: error: 'func' does not name a type
   14 | func 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();
        int S;
        if(N >= K){
            S = K*X+(N-K)*Y;
            System.out.println(M);
        }else{
            S=N*X;
            System.out.println(M);
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
            System.out.println(M);
                               ^
  symbol:   variable M
  location: class Main
Main.java:15: error: cannot find symbol
            System.out.println(M);
                               ^
  symbol:   variable M
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	int n, k, x, y, answer;
	int X =sc.nextInt();
	int K =sc.nextInt();
	int X =sc.nextInt();
	int Y =sc.nextInt();
	if(N<=K){
	answer=K * X + (N - K) * Y;
	System.out.println(answer);
	}else {
	answer=N*X;
	System.out.println(answer);
	}
	}
	}

Compiler output:
Main.java:8: error: variable X is already defined in method main(String[])
	int X =sc.nextInt();
	    ^
Main.java:10: error: cannot find symbol
	if(N<=K){
	   ^
  symbol:   variable N
  location: class Main
Main.java:11: error: cannot find symbol
	answer=K * X + (N - K) * Y;
	                ^
  symbol:   variable N
  location: class Main
Main.java:14: error: cannot find symbol
	answer=N*X;
	       ^
  symbol:   variable N
  location: class Main
4 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	int X =sc.nextInt();
	int K =sc.nextInt();
	int X =sc.nextInt();
	int Y =sc.nextInt();
	if(N<=K){
	System.out.println("N*X");
	}else if(N>K){
	System.out.println("K*X+(N-K)*Y");
	}
	}
	}

Compiler output:
Main.java:7: error: variable X is already defined in method main(String[])
	int X =sc.nextInt();
	    ^
Main.java:9: error: cannot find symbol
	if(N<=K){
	   ^
  symbol:   variable N
  location: class Main
Main.java:11: error: cannot find symbol
	}else if(N>K){
	         ^
  symbol:   variable N
  location: class Main
3 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	String X =sc.next();
	String K =sc.next();
	String X =sc.next();
	String Y =sc.next();
	if(N<=K){
	System.out.println("N*X");
	}else if(N>K){
	System.out.println("K*X+(N-K)*Y");
	}
	}
	}

Compiler output:
Main.java:7: error: variable X is already defined in method main(String[])
	String X =sc.next();
	       ^
Main.java:9: error: cannot find symbol
	if(N<=K){
	   ^
  symbol:   variable N
  location: class Main
Main.java:11: error: cannot find symbol
	}else if(N>K){
	         ^
  symbol:   variable N
  location: class Main
3 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	int X =sc.nextInt();
	int K =sc.nextInt();
	int X =sc.nextInt();
	int Y =sc.nextInt();
	if(N<=K){
	System.out.println(N*X);
	}else if(N>K){
	System.out.println(K*X+(N-K)*Y);
	}
	}
	}

Compiler output:
Main.java:7: error: variable X is already defined in method main(String[])
	int X =sc.nextInt();
	    ^
Main.java:9: error: cannot find symbol
	if(N<=K){
	   ^
  symbol:   variable N
  location: class Main
Main.java:10: error: cannot find symbol
	System.out.println(N*X);
	                   ^
  symbol:   variable N
  location: class Main
Main.java:11: error: cannot find symbol
	}else if(N>K){
	         ^
  symbol:   variable N
  location: class Main
Main.java:12: error: cannot find symbol
	System.out.println(K*X+(N-K)*Y);
	                        ^
  symbol:   variable N
  location: class Main
5 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	int N =nextInt();
	int K =nextInt();
	int X =nextInt();
	int Y =nextInt();
	if(N<=K){
	System.out.println(N*X);
	}else if(N>K){
	System.out.println(K*X+(N-K)*Y);
	}
	}
	}

Compiler output:
Main.java:5: error: cannot find symbol
	int N =nextInt();
	       ^
  symbol:   method nextInt()
  location: class Main
Main.java:6: error: cannot find symbol
	int K =nextInt();
	       ^
  symbol:   method nextInt()
  location: class Main
Main.java:7: error: cannot find symbol
	int X =nextInt();
	       ^
  symbol:   method nextInt()
  location: class Main
Main.java:8: error: cannot find symbol
	int Y =nextInt();
	       ^
  symbol:   method nextInt()
  location: class Main
4 errors
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();
        int M;
        if(N > K){
            M = K * X + (N - k) * Y;
            System.out.println(M);
        }else if(N < K){
            M = N * X;
            System.out.println(M);
        }
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
            M = K * X + (N - k) * Y;
                             ^
  symbol:   variable k
  location: class Main
1 error
Language: C++

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N < K:
	print(X*N)
else:
	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<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
#include<math.h>

using namespace std;

typedef long long ll;
typedef pair<long long, long long> pll;

int main(){
	int N, K, X, Y;
	scanf_s("%d", &N);
	scanf_s("%d", &K);
	scanf_s("%d", &X);
	scanf_s("%d", &Y);
	if (N <= K){
		printf("%d", N*X);
	}
	else{
		int out = K*X + (N - K)*Y;
		printf("%d", out);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n,k,a,b;

	cin>>n>>k>>x>>y;

	cout<<k+x+(n-k)*y<<endl;

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'x' was not declared in this scope
    8 |         cin>>n>>k>>x>>y;
      |                    ^
a.cc:8:23: error: 'y' was not declared in this scope
    8 |         cin>>n>>k>>x>>y;
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
int sum=0;
int main(){
  int N,K,X,Y;
  cin>>N>>K>>X>>Y;
  if(N>=K){
    sum=X*K+(N-K)*Y;
    cout<<sum;
  }
  else{
    sum=X*N
    cout<<sum;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: expected ';' before 'cout'
   13 |     sum=X*N
      |            ^
      |            ;
   14 |     cout<<sum;
      |     ~~~~
Language: C++

using System;

class Program
{
    static void Main()
    {
        int n, k, x, y,res = 0;
        n = int.Parse(Console.ReadLine());
        k = int.Parse(Console.ReadLine());
        x = int.Parse(Console.ReadLine());
        y = int.Parse(Console.ReadLine());
        for (int i = 0; i < n; i++)
        {
            res += x;
        }
        if (n - k > 0)
        {
            for (int i = 0; i < n - k; i++)
            {
                res += y;
            }
        }
        Console.WriteLine(res);
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:8:13: error: expected primary-expression before 'int'
    8 |         n = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:9:13: error: expected primary-expression before 'int'
    9 |         k = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:10:13: error: expected primary-expression before 'int'
   10 |         x = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:11:13: error: expected primary-expression before 'int'
   11 |         y = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:23:9: error: 'Console' was not declared in this scope
   23 |         Console.WriteLine(res);
      |         ^~~~~~~