criyle/codenet-compile-errors huggingface dataset:
Language: Java

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


public class A{
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        // Start writing your solution here. -------------------------------------
      /*
      int n      = sc.nextInt();        // read input as integer
      long k     = sc.nextLong();       // read input as long
      double d   = sc.nextDouble();     // read input as double
      String str = sc.next();           // read input as String
      String s   = sc.nextLine();       // read whole line as String

      int result = 3*n;
      out.println(result);                    // print via PrintWriter
      */
        // Stop writing your solution here. -------------------------------------
        int n = sc.nextInt();
        if (n % 1000 == 0) {
            out.println(0);
        } else {
            out.println(((n / 1000) + 1) * 1000);
        }
        out.close();
    }



    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------
}

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

class Solution{
  public static void main(String[] args){
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    while(n > 0){
    	n -= 1000;
    }
    System.out.println(-n);
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    ^
  symbol:   class BufferedReader
  location: class Solution
Main.java:3: error: cannot find symbol
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                            ^
  symbol:   class BufferedReader
  location: class Solution
Main.java:3: error: cannot find symbol
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                               ^
  symbol:   class InputStreamReader
  location: class Solution
3 errors
Language: C

#include <stdio.h>

int main(void){
    int a;
    scanf("%d",&a);
    printf("%d",(1000-(a%1000));
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:32: error: expected ')' before ';' token
    6 |     printf("%d",(1000-(a%1000));
      |           ~                    ^
      |                                )
main.c:7:14: error: expected ';' before '}' token
    7 |     return 0;
      |              ^
      |              ;
    8 | }
      | ~
Language: C

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
    int N, thousand;
    cin >> N;
    thousand = N / 1000;
    if (thousand * 1000 - N == 0) {
        cout << 0 << endl;
    } else {
        cout << (thousand + 1) * 1000 - N << 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++

#include<iostream>
#define ll long long
int main()
{
  ll no;
  cin>>no;
  if(no%1000==0)
  {
    cout<<"0";
  }
  else
  {
    cout<<1000-no%1000;
  }
  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>>no;
      |   ^~~
      |   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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<"0";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout<<1000-no%1000;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

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

int main() {
    int n;
    cin>>n;
    if(n<=1000 && n>1) cout<<1000-n;
    if(n<=2000 && n>1000) cout<<2000-n;
    if(n<=3000 && n>2000) cout<<3000-n;
    if(n<=4000 && n>3000) cout<<4000-n;
    if(n<=5000 && n>4000) cout<<5000-n;
    if(n<=6000 && n>5000) cout<<6000-n;
    if(n<=7000 && n>6000) cout<<7000-n;
    if(n<=8000 && n>7000) cout<<8000-n;
    if(n<=9000 && n>8000) cout<<9000-n;
    if(n<=10000 && n>9000) cout<<10000-n;
	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++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int yen;
 	cin>>yen;

  　yen%=1000;
	if(yen) cout<<1000-yen<<"\n";
	else	cout<<0<<"\n";
}

Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   　yen%=1000;
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: '\U00003000yen' was not declared in this scope
    7 |   　yen%=1000;
      |   ^~~~~
Language: C++

#include <iostream>
int main() {
  int ans;
  int n;
  cin >> n;
  ans = n % 1000;
  return ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   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
      |                  ^~~
Language: C++

#include <cstdio.h>

int main() {
  int ans;
  int n;
  scanf("%d", &n);
  ans = n % 1000;
  return ans;
}

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

#include<iostreme>
#using namespace std;
int main(){
  int a;
  cin>>a;
  int ans=1000;
  cout<<ans-(a%1000)<<endl;
}


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

#include<iostream>
#using namespace std;
int main(){
  int a;
  cin>>a;
  int ans=1000;
  cout<<ans-(a%1000)<<endl;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #using
    2 | #using namespace std;
      |  ^~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a;
      |   ^~~
      |   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<<ans-(a%1000)<<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:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<ans-(a%1000)<<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: Java

import java.util.Scanner;

public class Payment {

	public static void main(String[] args) {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		//
		// 処理
		//

		int count = n / 1000 + 1;
		System.out.println(1000 * count - n);

	}

}


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

#include <stdio.h>
 
int main(void)
{
  int n;
  scanf("%d", &n);
  
  for(int i=0; i<=10; i++) {
	if(n>i*1000) {
    } else {
      printf("%d", (i*1000)-n);
      break;
    }
  }
  

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected declaration or statement at end of input
   14 |   }
      |   ^
Language: C++

#include<iostream>
suing namesapce std;
int main(){
  int n;
  cin>>n;
  int no = 1000;
  while(no<n){
    no = no+1000;
  }
   cout<<abs(no-n);
  return 0;
}

Compiler output:
a.cc:2:1: error: 'suing' does not name a type
    2 | suing namesapce std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>n;
      |   ^~~
      |   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:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |    cout<<abs(no-n);
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

int n;
std::cin >> n;
std::cout << n % 1000;

Compiler output:
a.cc:2:6: error: 'cin' in namespace 'std' does not name a type
    2 | std::cin >> n;
      |      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int n;
a.cc:3:6: error: 'cout' in namespace 'std' does not name a type
    3 | std::cout << n % 1000;
      |      ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | std::cout << n % 1000;
      | ^~~
Language: Java

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
      Scanner scan = new Scanner(System.in);
      int N = scan.nextInt();
      System.out.println(1000-N%1000);
    }
}

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

#include <stdio.h>
 
int main(void)
{
  int N;
  scanf("%d", &N);
  
  for(int i=0; i<=10; i++) {
	if(N>i*1000) {
    } else {
      printf("%d", (i*1000)-N);
      break
    }
  }
  
}

Compiler output:
main.c: In function 'main':
main.c:12:12: error: expected ';' before '}' token
   12 |       break
      |            ^
      |            ;
   13 |     }
      |     ~
Language: Java

import java.util.*;

public class prac{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int price = sc.nextInt();
    String charge = Integer.toString(10000 - price);
    int len = charge.length();

    if (len > 3){
      charge = charge.substring(1);
    }

    System.out.println(charge);
  }
}

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

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

int main() {   
    ios::sync_with_stdio(0);   
    cin.tie(0);   
   
    #ifndef ONLINE_JUDGE   
    freopen("input.txt", "r", stdin);   
    freopen("output.txt", "w", stdout);   
    #endif   
    
	int t;cin>>t;
	if(t%1000 == 0){
		cout<<"0"''
	}
	else{cout<<1000-(t%1000);}
	 



}   
        

Compiler output:
a.cc:15:26: error: empty character constant
   15 |                 cout<<"0"''
      |                          ^~
a.cc: In function 'int main()':
a.cc:15:26: error: expected ';' before '\x0'
   15 |                 cout<<"0"''
      |                          ^~
      |                          ;
Language: C++

#include<iostream>
using namespace std;

int main()
{

int rupees;
cin>>rupees;

ans=(rupees%1000)==0?0:1000-(rupees%1000);
cout<<ans;
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 | ans=(rupees%1000)==0?0:1000-(rupees%1000);
      | ^~~
      | abs
Language: C++

#include<iostream>
using namespace std;

int rupees;
cin>>rupees;

ans=(rupees%1000)==0?0:1000-(rupees%1000);
cout<<ans;


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin>>rupees;
      | ^~~
a.cc:7:1: error: 'ans' does not name a type
    7 | ans=(rupees%1000)==0?0:1000-(rupees%1000);
      | ^~~
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<ans;
      | ^~~~
Language: C++

#inlcude<iostream>

int rupees;
cin>>rupess;

cout<<1000-(rupees%1000);

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<iostream>
      |  ^~~~~~~
      |  include
a.cc:4:1: error: 'cin' does not name a type
    4 | cin>>rupess;
      | ^~~
a.cc:6:1: error: 'cout' does not name a type
    6 | cout<<1000-(rupees%1000);
      | ^~~~
Language: C++

int rupess;
cin>>rupess;

cout<<1000-(rupess%1000);

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin>>rupess;
      | ^~~
a.cc:4:1: error: 'cout' does not name a type
    4 | cout<<1000-(rupess%1000);
      | ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
int n;
cin>>n;
n%=1000;
cout<<1000-n;

Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin>>n;
      | ^~~
a.cc:5:1: error: 'n' does not name a type
    5 | n%=1000;
      | ^
a.cc:6:1: error: 'cout' does not name a type
    6 | cout<<1000-n;
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){ 
  N,p;
  cin>>N>>endl;
  P = N%1000;
  cout<<p<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'N' was not declared in this scope
    4 |   N,p;
      |   ^
a.cc:4:5: error: 'p' was not declared in this scope
    4 |   N,p;
      |     ^
a.cc:6:3: error: 'P' was not declared in this scope
    6 |   P = N%1000;
      |   ^
Language: C++

#include<iostream>;
using namespace std;
int main(){ 
  N,p;
  cin>>N>>endl;
  P = N%1000;
  cout<<p<<endl;
}



Compiler output:
a.cc:1:19: warning: extra tokens at end of #include directive
    1 | #include<iostream>;
      |                   ^
a.cc: In function 'int main()':
a.cc:4:3: error: 'N' was not declared in this scope
    4 |   N,p;
      |   ^
a.cc:4:5: error: 'p' was not declared in this scope
    4 |   N,p;
      |     ^
a.cc:6:3: error: 'P' was not declared in this scope
    6 |   P = N%1000;
      |   ^
Language: C++

#using std
main()
{
  int n = 0;
  n << std::cin;
  
  if(n%1000 == 0)
  {
    std::cout << 0;
  }
  else
  {
    std::cout << (1000 - n % 1000);
  }
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #using
    1 | #using std
      |  ^~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:13: error: 'cin' is not a member of 'std'
    5 |   n << std::cin;
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #using std
a.cc:9:10: error: 'cout' is not a member of 'std'
    9 |     std::cout << 0;
      |          ^~~~
a.cc:9:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:10: error: 'cout' is not a member of 'std'
   13 |     std::cout << (1000 - n % 1000);
      |          ^~~~
a.cc:13:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include<stdio.h>
int main(void) {
	int N;
    int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
    scanf("%d", &N);
    for(int i = 0; i < N; i++) {
        char str[4];
    	scanf("%s", str);
    	if(strcmpstr, "AC") == 0)
        	c0++;
        else if(strcmp(str, "WA") == 0)
        	c1++;
        else if(strcmp(str, "TLE") == 0)
        	c2++;
        else if(strcmp(str, "RE") == 0)
        	c3++;
    }
    printf("AC × %d\n", c0);
    printf("WA × %d\n", c1);
    printf("TLE × %d\n", c2);
    printf("RE × %d\n", c3);
}

Compiler output:
main.c: In function 'main':
main.c:9:12: error: 'strcmpstr' undeclared (first use in this function)
    9 |         if(strcmpstr, "AC") == 0)
      |            ^~~~~~~~~
main.c:9:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:29: error: expected expression before '==' token
    9 |         if(strcmpstr, "AC") == 0)
      |                             ^~
main.c:9:33: error: expected statement before ')' token
    9 |         if(strcmpstr, "AC") == 0)
      |                                 ^
main.c:11:9: error: 'else' without a previous 'if'
   11 |         else if(strcmp(str, "WA") == 0)
      |         ^~~~
main.c:11:17: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   11 |         else if(strcmp(str, "WA") == 0)
      |                 ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void) {
Language: C

#include<stdio.h>

int main(){
int n;
scanf("%d", &n);
n = (10000-n)%1000;
printf("%d\", n);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:8: warning: missing terminating " character
    7 | printf("%d\", n);
      |        ^
main.c:7:8: error: missing terminating " character
    7 | printf("%d\", n);
      |        ^~~~~~~~~~
main.c:8:1: error: expected expression before 'return'
    8 | return 0;
      | ^~~~~~
main.c:8:10: error: expected ';' before '}' token
    8 | return 0;
      |          ^
      |          ;
    9 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n;
    int *a;
    int sum = 0;

    cin >> n;
    a = new int[n];

    for (int i = 0; i < n; i++) cin >> a[i];

    qsort(a, a + n, greater<int>());

    // for (int i = 0; i < n; i++) cout << a[i];

    for (int i = 0; i < n - 1; i++){
        sum = sum + a[i];
    }

    
    cout << sum << endl;

    delete a;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: invalid conversion from 'int*' to 'size_t' {aka 'long unsigned int'} [-fpermissive]
   14 |     qsort(a, a + n, greater<int>());
      |              ~~^~~
      |                |
      |                int*
a.cc:14:21: error: cannot convert 'std::greater<int>' to 'size_t' {aka 'long unsigned int'}
   14 |     qsort(a, a + n, greater<int>());
      |                     ^~~~~~~~~~~~~~
      |                     |
      |                     std::greater<int>
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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/stdlib.h:970:57: note:   initializing argument 3 of 'void qsort(void*, size_t, size_t, __compar_fn_t)'
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |                                                  ~~~~~~~^~~~~~
Language: Java

import java.util.*;

public class payment {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int payment = sc.nextInt();
        int yen = 1000;
        while(yen<payment){
            yen = yen + 1000;
        }
        System.out.println(yen - payment);
    }
}

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

#include<bits/stdc++.h>

using namespace std;


int main(){
  int n;
  cin>>n;
  int bill = 1000
  int res = bill - (n%bill);
  cout<<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'int'
   10 |   int res = bill - (n%bill);
      |   ^~~
a.cc:11:9: error: 'res' was not declared in this scope
   11 |   cout<<res<<endl;
      |         ^~~
Language: Java

int n = 0;
	int i = 0;
	int x = 0;

	while(n > x) {
		i = i+1;
		x=1000*i;
	}
	int y = x % n;
	System.out.print(y);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int n = 0;
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
	while(n > x) {
	^
Main.java:7: error: class, interface, enum, or record expected
		x=1000*i;
		^
Main.java:8: error: class, interface, enum, or record expected
	}
	^
Main.java:10: error: class, interface, enum, or record expected
	System.out.print(y);
	^
5 errors
Language: Java

int n = null;
int i = mull;
x = 1000*i;

while(n > x){
  i = i + 1;
  x = 1000*i;
}

int j = x % n ;
System.out.print(j);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int n = null;
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
x = 1000*i;
^
Main.java:5: error: class, interface, enum, or record expected
while(n > x){
^
Main.java:7: error: class, interface, enum, or record expected
  x = 1000*i;
  ^
Main.java:8: error: class, interface, enum, or record expected
}
^
Main.java:11: error: class, interface, enum, or record expected
System.out.print(j);
^
6 errors
Language: Java

import java.util.*;
public class payment {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int rem = n%1000;
		if (rem == 0) {
			System.out.println(0);
		} else {
			System.out.println(1000 - rem);
		}
	}
}

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

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

int main()
{
    int n;
    cin>>n;
  	if(n%1000) cout<<0;
    else if(n>=1000) cout<<((n/1000)+1)%(1000));
    else{
        cout<<((1000-n)%1000);
    }
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:47: error: expected ';' before ')' token
   10 |     else if(n>=1000) cout<<((n/1000)+1)%(1000));
      |                                               ^
      |                                               ;
Language: Java

import java.util.*;
public class A {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	int change = n % 1000;
      	System.out.println(1000 - change);
    }
}

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

import java.util.Scanner;
class A - Payment {
 public static void main (String args[]) {
   Scanner sc = new Scanner (System.in);
   System.out.println("いくら？:");
   int N = sc.nextInt();
   int k = 1;
   do {
     k += 1;
   }while (N-1000*k > 0);
   System.out.println("おつりは"+(1000*k-N)+"です");
 }
}

Compiler output:
Main.java:2: error: '{' expected
class A - Payment {
       ^
1 error
Language: Java

import java.util.Scanner;
class A-Payment {
 public static void main (String args[]) {
   Scanner sc = new Scanner (System.in);
   System.out.println("いくら？:");
   int N = sc.nextInt();
   int k = 1;
   do {
     k += 1;
   }while (N-1000*k > 0);
   System.out.println("おつりは"+(1000*k-N)+"です");
 }
}

Compiler output:
Main.java:2: error: '{' expected
class A-Payment {
       ^
1 error
Language: Java

import java.util.Scanner;
 public static void main (String args[]) {
   Scanner sc = new Scanner (System.in);
   System.out.println("いくら？:");
   int N = sc.nextInt();
   int k = 1;
   do {
     k += 1;
   }while (N-1000*k > 0);
   System.out.println("おつりは"+(1000*k-N)+"です");
 }


Compiler output:
Main.java:2: 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: Java

import java.util.Scanner;
public static void main (String[] args) {
  Scanner sc = new Scanner (System.in);
  System.out.println("いくら？:);
  int N = sc.nextInt();
  int k = 1;
  do {
      k += 1;
  }while (N-1000*k > 0);
  System.out.println("おつりは"+(1000*k-N)+"です");
}


Compiler output:
Main.java:4: error: unclosed string literal
  System.out.println("????:);
                     ^
Main.java:2: 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)
2 errors
Language: Java

import java.util.*;
 
public class easy
{
  public static void main(String[]args)
  {
 	Scanner console = new Scanner(System.in);
    int n = console.nextInt();
    n = n % 1000;
    int answer = 1000 - n;
    System.out.print(answer);
  }
}

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

import java.util.*;

public class easy
{
  public static void main(String[]args)
  {
 	Scanner console = new Scanner(System.in);
    int n = console.nextInt();
    n = n % 1000;
    int answer = 1000 - n;
    System.out.print(answer);
  }
}

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

#include<stdio.h>
 
int main(){
  
  int payment;
  int result;
  int i;
  
  for(i = 1; i<100:i++){
  scanf("%d",&payment);
  
  if(payment < 0 || 10000 < payment){
    return 1;
  }
  
  
  result = payment % 1000;
  
  printf("%d\n",result);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:19: error: expected ';' before ':' token
    9 |   for(i = 1; i<100:i++){
      |                   ^
      |                   ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:60: error: expected ')' before ';' token
    8 |                 printf ("%d\n", (((c/1000) + 1) * 1000 - c);
      |                        ~                                   ^
      |                                                            )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:58: error: expected ')' before ';' token
    8 |                 printf ("%d\n", ((c/1000 + 1) * 1000 - c);
      |                        ~                                 ^
      |                                                          )
Language: C++

#include <stdio.h>

int main() {
	
	int N;
	scanf("%d", &N);
	
	while (N > 0) {
		N = N - 1000;

	}
		printf ("%d\n", n * -1);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: 'n' was not declared in this scope
   12 |                 printf ("%d\n", n * -1);
      |                                 ^
Language: C

#include <stdio.h>

int main(){
    char str[105];
    scanf("%[^\n]",str);
    
    printf("%c",str[0]);
    
    for (int i=1; str[i] !='\0'; i++){
        if(str[i]=='-'){
            printf("%c",str[i+1]);
        }
    }
    puts("");
    
    for(int i=0; str[i] !='\0';i++){
        if(str[i]>='A'&& str[i]<='Z'){
            prntf("%c",str[i]);
        }
    }
    puts("");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:13: error: implicit declaration of function 'prntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |             prntf("%c",str[i]);
      |             ^~~~~
      |             printf
Language: C++

#include <stdio.h>

int main(){
    char str[105];
    scanf("%[^\n]",str);
    
    printf("%c",str[0]);
    
    for (int i=1; str[i] !='\0'; i++){
        if(str[i]=='-'){
            printf("%c",str[i+1]);
        }
    }
    puts("");
    
    for(int i=0; str[i] !='\0';i++){
        if(str[i]>='A'&& str[i]<='Z'){
            prntf("%c",str[i]);
        }
    }
    puts("");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'prntf' was not declared in this scope; did you mean 'printf'?
   18 |             prntf("%c",str[i]);
      |             ^~~~~
      |             printf
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n,a;
	cin>>n;
	a=n/1000;
	if(a==0||n=1000)cout<<1000-n;
	else if(a==1||n=2000)cout<<2000-n;
	else if(a==2||n=3000)cout<<3000-n;
	else if(a==3||n=4000)cout<<4000-n;
	else if(a==4||n=5000)cout<<5000-n;
	else if(a==5||n=6000)cout<<6000-n;
	else if(a==6||n=7000)cout<<7000-n;
	else if(a==7||n=8000)cout<<8000-n;
	else if(a==8||n=9000)cout<<9000-n;
	else if(a==9||n=10000)cout<<10000-n;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: lvalue required as left operand of assignment
    7 |         if(a==0||n=1000)cout<<1000-n;
      |            ~~~~^~~
a.cc:8:21: error: lvalue required as left operand of assignment
    8 |         else if(a==1||n=2000)cout<<2000-n;
      |                 ~~~~^~~
a.cc:9:21: error: lvalue required as left operand of assignment
    9 |         else if(a==2||n=3000)cout<<3000-n;
      |                 ~~~~^~~
a.cc:10:21: error: lvalue required as left operand of assignment
   10 |         else if(a==3||n=4000)cout<<4000-n;
      |                 ~~~~^~~
a.cc:11:21: error: lvalue required as left operand of assignment
   11 |         else if(a==4||n=5000)cout<<5000-n;
      |                 ~~~~^~~
a.cc:12:21: error: lvalue required as left operand of assignment
   12 |         else if(a==5||n=6000)cout<<6000-n;
      |                 ~~~~^~~
a.cc:13:21: error: lvalue required as left operand of assignment
   13 |         else if(a==6||n=7000)cout<<7000-n;
      |                 ~~~~^~~
a.cc:14:21: error: lvalue required as left operand of assignment
   14 |         else if(a==7||n=8000)cout<<8000-n;
      |                 ~~~~^~~
a.cc:15:21: error: lvalue required as left operand of assignment
   15 |         else if(a==8||n=9000)cout<<9000-n;
      |                 ~~~~^~~
a.cc:16:21: error: lvalue required as left operand of assignment
   16 |         else if(a==9||n=10000)cout<<10000-n;
      |                 ~~~~^~~
Language: Java

import java.util.Scanner;

public class ABC173_Payment {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int itemPrice = scan.nextInt();
		while(itemPrice>0) {
			itemPrice-=1000;
		}
		System.out.println(Math.abs(itemPrice));

	}

}


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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
  ll n;
  cin>>n;
  if(n%1000==0)
    cout<<0<<endl;
  else
    cout<<1000-n%1000<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected '}' at end of input
   11 |     cout<<1000-n%1000<<endl;
      |                             ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
     int N;
	 cin >> N;
	 int C0 = 0;
	 int C1 = 0;
	 int C2 = 0;
	 int C3 = 0;
	 for(int i = 0; i < N; i++){
	 	string S;
		cin >> S;
		if(S == "AC"){
			C0++
		}
			else if(S == "WA"){
			C1++
		}
			else if(S == "TLE"){
			C2++
		}
			else if(S == "RE"){
			C3++
		}
	 }
	 cout << "AC x " << C0 << endl;
		 cout << "WA x " << C1 << endl;
		 cout << "TLE x " << C2 << endl;
		  cout << "RE x " << C3 << endl;
     }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected ';' before '}' token
   14 |                         C0++
      |                             ^
      |                             ;
   15 |                 }
      |                 ~            
a.cc:17:29: error: expected ';' before '}' token
   17 |                         C1++
      |                             ^
      |                             ;
   18 |                 }
      |                 ~            
a.cc:20:29: error: expected ';' before '}' token
   20 |                         C2++
      |                             ^
      |                             ;
   21 |                 }
      |                 ~            
a.cc:23:29: error: expected ';' before '}' token
   23 |                         C3++
      |                             ^
      |                             ;
   24 |                 }
      |                 ~
Language: Java

import java.util.Scanner;
public class Calc{
public static void main(String[] args){
  Scanner a = new Scanner(System.in);
  int p = a.nextInt();
  if(p>0 && P =<10000){
  	System.out.println(p%1000);
  }else{
    
  }
}

Compiler output:
Main.java:6: error: illegal start of type
  if(p>0 && P =<10000){
                ^
Main.java:6: error: ';' expected
  if(p>0 && P =<10000){
                     ^
Main.java:8: error: 'else' without 'if'
  }else{
   ^
Main.java:11: error: reached end of file while parsing
}
 ^
4 errors
Language: C++

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;


int main()
{
    int N;
    cin >> N;
    
    if (n%1000==0) cout << 0;
    else {
        int k = n/1000;
        cout << (k+1)*1000 - N;
    }

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'n' was not declared in this scope
   12 |     if (n%1000==0) cout << 0;
      |         ^
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoderExamCS
{
    class Program
    {
        static void Main(string[] args)
        {
            int N, answer = 0;

            N = int.Parse(Console.ReadLine());
            for (int i = 1; i <= 10; i++)
            {
                if (N < i * 1000)
                {
                    answer = i * 1000 - N;
                    break;
                }
            }

            Console.WriteLine(answer);
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:27:6: error: expected ';' after class definition
   27 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AtCoderExamCS::Program::Main(int*)':
a.cc:15:17: error: expected primary-expression before 'int'
   15 |             N = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:25:13: error: 'Console' was not declared in this scope
   25 |             Console.WriteLine(answer);
      |             ^~~~~~~
Language: C++

# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
n = int(input())
if n%1000 == 0:
    print(0)
else:
    print(1000-n%1000)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #Begin
    1 | # Begin Header {{{
      |   ^~~~~
a.cc:7:3: error: invalid preprocessing directive #}
    7 | # }}} End Header
      |   ^
a.cc:8:3: error: invalid preprocessing directive #_________\U000030b3\U000030fc\U000030c7\U000030a3\U000030f3\U000030b0\U0000306f\U00003053\U00003053\U0000304b\U00003089\U0000ff01\U0000ff01___________
    8 | # _________コーディングはここから！！___________
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:2:1: error: 'from' does not name a type
    2 | from math import gcd
      | ^~~~
Language: Java


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

public class a
{
	public static void main(String[] args)
    {
     	Scanner in = new Scanner(System.in);
      	int n = in.nextInt();
      	if(n % 1000 > 0) System.out.println(1000 - (n % 1000));
      	else System.out.println(0);
      	
    }
}


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

#include <iostream>
#include <math>
using namespace std;
int main()
{
  int N;int x;
  int change_amt;
  cin>>N;
  x=ceil(N/1000);
  
  change_amt=(1000*x)-N;
  cout<<change_amt;
  
  return 0;
}


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

#include<bits/std++.h>
using namespace std;
int main(){
  int n; cin>>n;
  cout<<(1000-n%1000)%1000<<endl;
  return 0;
  
}

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

#include<stdio.h>

int main(void){
  int N,n=1000,i;
  scanf("%d",&N);
  
  for(i=1;N>n;i++){
    n=n**i;
  }
  printf("%d",n-N);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: invalid type argument of unary '*' (have 'int')
    8 |     n=n**i;
      |         ^~
Language: C++

#include<bits/stdc++.h>
  6 using namespace std;
  5 
  4 int main(){
  3     int n;
  2     cin >> n;
  1     cout << 1000 - (n % 1000) << "\n";
8   }


Compiler output:
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   6 using namespace std;
      |   ^
a.cc:3:3: error: expected unqualified-id before numeric constant
    3 |   5
      |   ^
Language: C

#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); i++)
using namespace std;
using ll = long long;
int main()
{
    int N;
    cin >> N;
    if(N%1000 == 0){
        cout << 0 << endl;
    }else{
        cout << 1000 - N%1000 << 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++

#include <stdio.h>

int main() {
	
        int  N;
        scanf("%d", &N);
        int result[1000];
        result[0] = 1;
        int length = 1, i, j, temp, carry = 0;
        for(i = 2; i <= N; i++) {
            for(j = 0; j < length; j++) {
                temp = carry + result[j] * i;
                carry = temp / 10;
                result[j] = temp % 10;
            }
            while(carry) {
                result[j] = carry % 10;
                carry /= 10;
                j++;
            }
            length = j;
        }
        for(int i = length - 1; i >= 0; i--){
            printf("%d", result[i]);
        }
        printf("\n");
    }
 
	return 0;
}

Compiler output:
a.cc:29:9: error: expected unqualified-id before 'return'
   29 |         return 0;
      |         ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include <stdio.h>
int main(){
	int a=0, b;
	
	scanf("%d" , &b);
	for(a=0; a<b, a+=1000){
	
	a;
}
	
	printf("%d" , a-b);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:30: error: expected ';' before ')' token
    6 |         for(a=0; a<b, a+=1000){
      |                              ^
      |                              ;
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int n;
  cin >> n;
  cout << ((int a = n % 1000)? 1000 - a : a) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before 'int'
    8 |   cout << ((int a = n % 1000)? 1000 - a : a) << endl;
      |             ^~~
a.cc:8:13: error: expected ')' before 'int'
    8 |   cout << ((int a = n % 1000)? 1000 - a : a) << endl;
      |            ~^~~
      |             )
a.cc:8:53: error: expected ')' before ';' token
    8 |   cout << ((int a = n % 1000)? 1000 - a : a) << endl;
      |           ~                                         ^
      |                                                     )
Language: C++

#include <stdio.h>

int main() {
	int N;
	scanf("%d", &N);
	int change = N - 1000;
	if (N % 1000 == 0) {
		printf("0\n", &change);
		printf("We can pay the exact price.");
	}
	
	if(N > 1000 && N < 2000) {
		printf("We will use two 1000-yen bills to pay the price and receive &d\n", 2000-N);
	}
	if(N > 2000 && N < 3000) {
		printf("We will use three 1000-yen bills to pay the price and receive &d\n", 3000-N);
	}
	if(N > 3000 && N < 4000) {
		printf("We will use four 1000-yen bills to pay the price and receive &d\n", 4000-N);
	}
	if(N > 4000 &N < 5000){
		printf("We will use five 1000-yen bills to pay the price and receive &d\n", 5000-N);
	}
	if(N > 5000 && N < 6000) {
		printf("We will use six 1000-yen bills to pay the price and receive &d\n", 6000-N);
	}
	if(N > 6000 && N > 7000 ) {
		printf("We will use seven 1000-yen bills to pay the price and receive &d\n", 7000-N);
	}
	if(N > 7000 && N < 8000) {
		printf("We will use eight 1000-yen bills to pay the price and receive &d\n", 8000-N);
	}
	if(N > 8000 && N < 9000) {
		printf("We will use nine 1000-yen bills to pay the price and receive &d\n", 9000-N);
	}
	if(N > 9000 && N < 10000) {
		printf("We will use ten 1000-yen bills to pay the price and receive &d\n", 10000-N);
	return 0;
}

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

#include <stdio.h>

int main() {
	int N;
	scanf("%d", &N);
	int change = N - 1000;
	if (N % 1000 == 0) {
		printf("0\n", &change);
		printf("We can pay the exact price.");
	}
	
	if(N > 1000 && N < 2000) {
		printf("We will use two 1000-yen bills to pay the price and receive &d\n", 2000-N);
	}
	if(N > 2000 && N < 3000) {
		printf("We will use three 1000-yen bills to pay the price and receive &d\n", 3000-N);
	}
	if(N > 3000 && < 4000) {
		printf("We will use four 1000-yen bills to pay the price and receive &d\n", 4000-N);
	}
	if(N > 4000 &N < 5000){
		printf("We will use five 1000-yen bills to pay the price and receive &d\n", 5000-N);
	}
	if(N > 5000 && N < 6000) {
		printf("We will use six 1000-yen bills to pay the price and receive &d\n", 6000-N);
	}
	if(N > 6000 && N > 7000 ) {
		printf("We will use seven 1000-yen bills to pay the price and receive &d\n", 7000-N);
	}
	if(N > 7000 && N < 8000) {
		printf("We will use eight 1000-yen bills to pay the price and receive &d\n", 8000-N);
	}
	if(N > 8000 && N < 9000) {
		printf("We will use nine 1000-yen bills to pay the price and receive &d\n", 9000-N);
	}
	if(N > 9000 && N < 10000) {
		printf("We will use ten 1000-yen bills to pay the price and receive &d\n", 10000-N);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected primary-expression before '<' token
   18 |         if(N > 3000 && < 4000) {
      |                        ^
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include<stdio.h>
int main(){
int n=0, x;

	scanf("%d", &x);
	for(n=0;n<x;n+=1000){
	n;
	}
printf("%d", n2-x);



return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'n2' was not declared in this scope; did you mean 'n'?
    9 | printf("%d", n2-x);
      |              ^~
      |              n
Language: C++

include <stdio.h>

int main(){
	
	int harga;
	scanf("%d", &harga);
	int money = 0;
	while(money < harga){
		money = money + 1000;
	}
	if(money == harga){
		printf("%d", money);
	}
	else if (money >= harga){
		printf("%d", money - harga);
	}
	return 0;
}

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