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

//SHIVAM GARG
import java.util.*;
import java.lang.*;
import java.io.*;
 
/*
2
2
5 9
7
1 2 4 8 16 64 128
*/
public class Codechef
{
 
 
	public static void main (String[] args) throws java.lang.Exception {
	    FastReader reader = new FastReader();
	    int temp = reader.nextInt() % 1000;
		if(temp  == 0){
                System.out.println(0);
        }else{
                          System.out.println(1000-temp);
        }

			    
    }
    
 
 
 /* Iterative Function to calculate  (x^y)%p in O(log y) */
 
    public static long prime = 1000000007;
    public static long[] fact;
    static long power(long x, long y) 
    { 
        // Initialize result 
        long res = 1; 
        // Update x if it is more than or 
        // equal to p 
        x = x % prime; 
                      
        while (y > 0) 
        { 
            // If y is odd, multiply x  with result 
            if (y % 2 == 1) 
                res = (res * x) % prime; 
            // y must be even now 
            y = y >> 1; // y = y/2 
            x = (x * x) % prime; 
        } 
          
        return res; 
    } 
      
    // Returns n^(-1) mod p 
    static long modInverse(long n) 
    {   return power(n, prime-2);   } 
      
    // Returns nCr % p using Fermat's little theorem. 
    static long nCrModPFermat(int n, int r) 
    { 
        // Base case 
        if (r == 0) 
            return 1; 
        long a1 = fact[n];
        long a2 = modInverse(fact[r]) % prime;
        long a3 = modInverse(fact[n-r]) % prime;
        return ((fact[n] * a2)%prime * a3) % prime; 
    } 
	
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        {  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());  } 
        
        long[] nextLongArray(int n){
            long[] a = new long[n];
            for(int i=0; i<n; i++)
            {   a[i] = nextLong();  }
            return a;
        }
        
        int[] nextIntArray(int n){
            int[] a = new int[n];
            for(int i=0; i<n; i++)
            {   a[i] = nextInt();   }
            return a;
        }
        String nextLine() { 
            String str = ""; 
            try{    str = br.readLine(); 
            } catch (IOException e) { 
                //e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
	
	
}

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

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

int main(){
  int N;
  cin >> N;
  for(true){
    N -= 1000;
    if(N < 1000){
      break;
    }
  }
  cout << N << endl;
}

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

#include <iostream>
using namespace std;

int main() {
  int X; cin >> x;
  cout << x % 1000 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'x' was not declared in this scope
    5 |   int X; cin >> x;
      |                 ^
Language: C

#include <stdio.h>
#define MONEY 1000
int main()
{
  int N, b;
  scanf("%d", &N)
    if (N <= 1 && N >= 10000)
    {
      if (YEN-N>=0)
      {
        b=YEN-N;
      }
      if (YEN-N<=0)
      {
        for (YEN-N>=0)
        {
          YEN+=1000;
        }
      }
      printf("&d", b);
    }
}

Compiler output:
main.c: In function 'main':
main.c:6:18: error: expected ';' before 'if'
    6 |   scanf("%d", &N)
      |                  ^
      |                  ;
    7 |     if (N <= 1 && N >= 10000)
      |     ~~
Language: C++

#include <iostream>

int main() {
	int N;
  	cin>>N;
  	cout<< N%1000==0?0:1000-N%1000;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: 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:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout<< N%1000==0?0:1000-N%1000;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        if(n <= 1000){
            System.out.println(1000 - n);
        }else if(n <= 2000){
            System.out.println(2000 - n);
        }
        else if(n <= 3000){
            System.out.println(3000 - n);
        }
        else if(n <= 4000){
            System.out.println(4000 - n);
        }
        else if(n <= 5000){
            System.out.println(5000 - n);
        }
        else if(n <= 6000){
            System.out.println(6000 - n);
        }
        else if(n <= 7000){
            System.out.println(7000 - n);
        }
        else if(n <= 8000){
            System.out.println(8000 - n);
        }
        else if(n <= 9000){
            System.out.println(9000 - n);
        }
        else if(n <= 10000){
            System.out.println(10000 - n);
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected primary-expression before '/' token
    9 |    cout<<(n/1000+1)*1000-n<</
      |                             ^
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
Language: C++

#include <iostream>
#include <bits/stdtr1c++.h>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
using namespace std;
typedef long long ll;
const int N = 100005;
const int MOD = 1000000007;
int dx[] = {-1, -1, -1,  0, 0,  1, 1, 1};
int dy[] = {-1,  0,  1, -1, 1, -1, 0, 1};
vector<int> grap[100001];
vector<bool> visited(100001);
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n; cin >> n;
    if(n%1000==0) cout << 0 << endl;
    else cout << (n/1000 + 1 )*1000 - n; << endl;

    

   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:42: error: expected primary-expression before '<<' token
   43 |     else cout << (n/1000 + 1 )*1000 - n; << endl;
      |                                          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,h;
  cin >> N;
  int a;
  a = N % 1000;
  h = 1000 - a;
  A = h % 1000;
  cout << a << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'A' was not declared in this scope
    9 |   A = h % 1000;
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,h;
  cin >> N;
  int a;
  a = N % 1000;
  h = 1000 - a
  A = h % 1000;
  cout << a << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'A'
    8 |   h = 1000 - a
      |               ^
      |               ;
    9 |   A = h % 1000;
      |   ~
Language: C++

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

int main(){
  int n;
  cin >> n;
  if( n % 1000 )
    cout << 1000 - n % 1000 << endl;
  else
    cout << "0" << endl
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before 'return'
   10 |     cout << "0" << endl
      |                        ^
      |                        ;
   11 |     return 0;
      |     ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,i;
  cin>>n;
  int arr[n],sum=0
  for(i=0;i<n;i++){
    cin>>arr[i];
   sum=sum+arr[i];
  }cout<<sum-1<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'for'
    7 |   for(i=0;i<n;i++){
      |   ^~~
a.cc:7:18: error: expected ';' before ')' token
    7 |   for(i=0;i<n;i++){
      |                  ^
      |                  ;
Language: C++

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


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

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespcace'
    2 | using namespcace std;
      |       ^~~~~~~~~~
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;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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<<1000 - n<<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:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout<<1000 - n<<endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/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 number;
  cin>>number;

(number%1000==0) ?cout<<0 :cout<<(1000-(number%1000))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:54: error: expected ';' before '}' token
    9 | (number%1000==0) ?cout<<0 :cout<<(1000-(number%1000))
      |                                                      ^
      |                                                      ;
   10 | }
      | ~
Language: C++

#include<iostrem>
using namespace std;
int main(){
int n;
 cin>>n;
 
	//(n%1000==0)?cout<<0:cout<<(n-(n%1000));
  	(n%1000==0) ? cout<<0 : cout<<(1000-(n%1000));
}

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

#include<iostrem>
using namespace std;
int main(){
int n;
 cin>>n;
 
	(n%1000==0)?cout<<0:cout<<(1000-(n%1000));
}

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

#include<iostrem>
using namespace std;
int main(){
int n;
 cin>>n;

	(n%1000==0)?cout<<0:cout<<(n-(n%1000));
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: operands to '?:' have different types 'std::basic_ostream<char>' and 'int'
    6 |         (n % 1000 == 0) ? cout<<0 : (1000 - (n % 1000) );
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &vec){ os << "["; for (auto v : vec) os << v << ", "; os << "]"; return os; }
template<typename T> ostream &operator<<(ostream &os, const deque<T> &vec){ os << "deq["; for (auto v : vec) os << v << ", "; os << "]"; return os; }
template<typename T> ostream &operator<<(ostream &os, const set<T> &vec){ os << "{"; for (auto v : vec) os << v << ", "; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const unordered_set<T> &vec){ os << "{"; for (auto v : vec) os << v << ", "; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const multiset<T> &vec){ os << "{"; for (auto v : vec) os << v << ", "; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const unordered_multiset<T> &vec){ os << "{"; for (auto v : vec) os << v << ", "; os << "}"; return os; }
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &pa){ os << "(" << pa.first << ", " << pa.second << ")"; return os; }
template<typename TK, typename TV> ostream &operator<<(ostream &os, const map<TK, TV> &mp){ os << "{"; for (auto v : mp) os << v.first << ": " << v.second << ", "; os << "}"; return os; }
template<typename TK, typename TV> ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp){ os << "{"; for (auto v : mp) os << v.first << ": " << v.second << ", "; os << "}"; return os; }
template<typename T> void ndarray(vector<T> &vec, int len) { vec.resize(len); }
template<typename T, typename... Args> void ndarray(vector<T> &vec, int len, Args... args) { vec.resize(len); for (auto &v : vec) ndarray(v, args...); }
template<typename T> bool chmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool chmin(T &m, const T q) { if (q < m) {m = q; return true;} else return false; }
template<typename T1, typename T2> pair<T1, T2> operator+(const pair<T1, T2> &l, const pair<T1, T2> &r) { return make_pair(l.first + r.first, l.second + r.second); }
template<typename T1, typename T2> pair<T1, T2> operator-(const pair<T1, T2> &l, const pair<T1, T2> &r) { return make_pair(l.first - r.first, l.second - r.second); }
#define f first
#define s second
 
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    if(n % 1000 == 0) {
        cout << 0;
        return 0;
    }
    cout << 1000 - (n % 1000)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:30: error: expected ';' before '}' token
   32 |     cout << 1000 - (n % 1000)
      |                              ^
      |                              ;
   33 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long int n;
  cin>>n;
  if(n%1000==0)
  { cout<<0<<endl;
     return 0;
  }
  long long int d;
  else
  {
    long long int c = n/1000;
     c = c+1;
    c = c*1000;
    d = c - n;
  }
  cout<<d<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else
      |   ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
        int n;

        cin >> n;

        int mod = n % 1000;

        if (mod == 0){
                cout << 0 << endl;
        }
        else{
                cout << 1000 - mod << endl;
        }
}

~                                                                            ~                            

Compiler output:
a.cc:20:78: error: expected class-name before '~' token
   20 | ~                                                                            ~
      |                                                                              ^
Language: C++

#include <iosteream>

using namespace std;

int main(){
        int n;

        cin >> n;

        int mod = n % 1000;

        if (mod == 0){
                cout << 0;
        }
        else{
                cout << 1000 - mod;
        }
}

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

#include <iosteream>

using namespace std;

int main(){
        int n;

        cin >> n;

        int mod = n % 1000;

        if (mod == 0){
                cout << 0 << endl;
        }
        else{
                cout << 1000 - mod << endl;
        }
}

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

#include <iosteream>

using namespace std;

int main(){
        int n;

        cin >> n;

        int mod = n % 1000;

        if (mod == 0)
                cout << 0 << endl;
        else
                cout << 1000 - mod << endl;
}

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

#include <iostream>

int main() {
  int cask;
  cin >> cask;
  if(cask % 1000 == 0) {
    return 0;
  } else {
    return cask - (cask % 1000);
}

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 >> cask;
      |   ^~~
      |   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:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
#ifndef ONLINE_JUDGE
    freopen("test.in", "r", stdin);
    freopen("test.out", "w", stdout);
#endif

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |         return;
      |         ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
    int 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:6:11: error: expected primary-expression before '>' token
    6 |     cin >>> n;
      |           ^
Language: Java

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

public class sol {

    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (final 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 (final IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(final String[] args) {
        
        FastReader fr = new FastReader();
        int price = fr.nextInt();

        int rem = price % 1000;

        if(rem != 0) {
            System.out.println(1000 - rem);
        }
        else {
            System.out.println(0);
        }

    }

}

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

import java.io.*;
import java.util.*;
import java.math.*;
public class A {
	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		System.out.println((n%1000));
		out.close();
	}
	static class FastIO {
		InputStream dis;
		byte[] buffer = new byte[1 << 17];
		int pointer = 0;
		public FastIO(String fileName) throws IOException {
			dis = new FileInputStream(fileName);
		}
		public FastIO(InputStream is) throws IOException {
			dis = is;
		}
		int nextInt() throws IOException {
			int ret = 0;
 
			byte b;
			do {
				b = nextByte();
			} while (b <= ' ');
			boolean negative = false;
			if (b == '-') {
				negative = true;
				b = nextByte();
			}
			while (b >= '0' && b <= '9') {
				ret = 10 * ret + b - '0';
				b = nextByte();
			}
 
			return (negative) ? -ret : ret;
		}
		long nextLong() throws IOException {
			long ret = 0;
 
			byte b;
			do {
				b = nextByte();
			} while (b <= ' ');
			boolean negative = false;
			if (b == '-') {
				negative = true;
				b = nextByte();
			}
			while (b >= '0' && b <= '9') {
				ret = 10 * ret + b - '0';
				b = nextByte();
			}
			return (negative) ? -ret : ret;
		}
		byte nextByte() throws IOException {
			if (pointer == buffer.length) {
				dis.read(buffer, 0, buffer.length);
				pointer = 0;
			}
			return buffer[pointer++];
		}
		String next() throws IOException {
			StringBuffer ret = new StringBuffer();
 
			byte b;
			do {
				b = nextByte();
			} while (b <= ' ');
			while (b > ' ') {
				ret.appendCodePoint(b);
				b = nextByte();
			}
 
			return ret.toString();
		}
	}
}


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

#include<stdio.h>
int main()
{
	int a, b, c;
	scanf("%d",&a);

	b = a/1000;
	c = a%1000;

	if (c != 0) {
		b++:
		b*=1000;
	}
	printf("%d\n",b-c);
	return 0;
}




Compiler output:
main.c: In function 'main':
main.c:11:20: error: expected ';' before ':' token
   11 |                 b++:
      |                    ^
      |                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef map<int,int> mii;
typedef map<ll,ll> mll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define fi first
#define se second
#define pi 3.141592653589793
#define ld long double
#define mod 998244353ll
#define pb push_back
#define all(v) v.begin(),v.end()
#define rall(v) v.begin(), v.end(), greater<ll>()
#define tc int t;cin>>t;while(t--)
#define pqmax priority_queue<int>
#define pqmin priority_queue<int,vi,greater<int>>
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL)
#define tc_g int tt;cin>>tt;for(int ti=1;ti<=tt;ti++)#define case_g "Case #"<<ti<<": "
#define Debug(x) cout << x << "\n"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
int main() {
     ll num;
     cin >> num;
     cout << (1000 - num%10000;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:31: error: expected ')' before ';' token
   35 |      cout << (1000 - num%10000;
      |              ~                ^
      |                               )
Language: Java

		Scanner sc = new Scanner(System.in);
		String[] l = sc.nextLine();
		int p = Integer.parseInt(l[0]);
		int i = -1;

		int c = 1;
		while(i > -1){
          i = c*1000 - p
        }
		System.out.println(i);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
		Scanner sc = new Scanner(System.in);
		^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: class, interface, enum, or record expected
		while(i > -1){
		^
2 errors
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int N;
  cin >> N;
  int res = 1000 - (N % 1000);
  if(res == 1000){res = 0};
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '}' token
    8 |   if(res == 1000){res = 0};
      |                          ^
      |                          ;
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  int res = 1000 - (N % 1000);
  if(res == 1000){res = 0}
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '}' token
    8 |   if(res == 1000){res = 0}
      |                          ^
      |                          ;
Language: C++

#include <iostrem>
using namespace std;
int main(){
  int N,d,ret;
  cin>>N;
  d=N%1000;
  if(d>0)
    ret=1000-d;
  else
    ret=0;
  cout<<ret;
  return 0;

}

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

#include <iostream>

class Casher
{
private:
	const int price;
public:
	Casher() = default;
	Casher(const int& price) :price(price) {}

	int calc()
	{
		return 1000 - (price % 1000);
	}
};

int main(void)
{
	int price = 0;
	std::cin >> price;

	std::shared_ptr<Casher> casher(new Casher(price));
	std::cout << casher->calc() << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: 'shared_ptr' is not a member of 'std'
   22 |         std::shared_ptr<Casher> casher(new Casher(price));
      |              ^~~~~~~~~~
a.cc:2:1: note: 'std::shared_ptr' is defined in header '<memory>'; this is probably fixable by adding '#include <memory>'
    1 | #include <iostream>
  +++ |+#include <memory>
    2 | 
a.cc:22:31: error: expected primary-expression before '>' token
   22 |         std::shared_ptr<Casher> casher(new Casher(price));
      |                               ^
a.cc:22:33: error: 'casher' was not declared in this scope; did you mean 'Casher'?
   22 |         std::shared_ptr<Casher> casher(new Casher(price));
      |                                 ^~~~~~
      |                                 Casher
Language: C

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
if(n%1000!=0){cout<<1000-n%1000;}
else{cout<<"0";}
}


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'elsecout' was not declared in this scope
    9 |     elsecout<<0;
      |     ^~~~~~~~
Language: C

#include<iostream>
#include<stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
     
int main(){
  //整数の時はint
  int  n,ans;
  //文字の時はstring
  //string s;
      
  cin>>n;
  if(!(n%1000))
    ans=(n/1000)*1000-n;
  else
    ans=(n/1000+1)*1000-n;
  cout<<ans<<endl;
  return 0;
}


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

#include <iostream>
using namespace std;
int main(){
    int n, s, i;
    int a = 0;
    int w = 0;
    int t = 0;
    int r = 0;
    cin >> n;
    for (i = 1; i <= n; i++){
        cin >> s;
        if(s == "AC"){
            a++;
        }
        else if (s == "WA"){
            w++;
        }
        else if (s == "TLE"){
            t++;
        }
        else{
            r++;
        }
        cout << "AC x " << a << endl;
        cout << "WA x " << w << endl;
        cout << "TLE x " << t << endl;
        cout << "RE x " << r << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if(s == "AC"){
      |            ~~^~~~~~~
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         else if (s == "WA"){
      |                  ~~^~~~~~~
a.cc:18:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         else if (s == "TLE"){
      |                  ~~^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int n, s, i;
    int a = 0;
    int w = 0;
    int t = 0;
    int r = 0;
    cin >> n;
    for (i = 1; i <= n; i++){
        cin >> s;
        if(s == "AC"){
            a++
        }
        else if (s == "WA"){
            w++
        }
        else if (s == "TLE"){
            t++
        }
        else (s == "RE"){
            r++
        }
        cout << "AC x " << a << endl;
        cout << "WA x " << w << endl;
        cout << "TLE x " << t << endl;
        cout << "RE x " << r << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if(s == "AC"){
      |            ~~^~~~~~~
a.cc:13:16: error: expected ';' before '}' token
   13 |             a++
      |                ^
      |                ;
   14 |         }
      |         ~       
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         else if (s == "WA"){
      |                  ~~^~~~~~~
a.cc:16:16: error: expected ';' before '}' token
   16 |             w++
      |                ^
      |                ;
   17 |         }
      |         ~       
a.cc:18:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         else if (s == "TLE"){
      |                  ~~^~~~~~~~
a.cc:19:16: error: expected ';' before '}' token
   19 |             t++
      |                ^
      |                ;
   20 |         }
      |         ~       
a.cc:21:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |         else (s == "RE"){
      |               ~~^~~~~~~
a.cc:21:25: error: expected ';' before '{' token
   21 |         else (s == "RE"){
      |                         ^
      |                         ;
Language: C++

#include <iostream>
using namespace std;
int main(){
    int n;
    int a = 0;
    int w = 0;
    int t = 0;
    int r = 0;
    cin >> n;
    for (int i = 1; i <= n; i++){
        cin >> s;
        if(s == "AC"){
            a++
        }
        else if (s == "WA"){
            w++
        }
        else if (s == "TLE"){
            t++
        }
        else (s == "RE"){
            r++
        }
        cout << "AC x " << a << endl;
        cout << "WA x " << w << endl;
        cout << "TLE x " << t << endl;
        cout << "RE x " << r << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 's' was not declared in this scope
   11 |         cin >> s;
      |                ^
a.cc:13:16: error: expected ';' before '}' token
   13 |             a++
      |                ^
      |                ;
   14 |         }
      |         ~       
a.cc:16:16: error: expected ';' before '}' token
   16 |             w++
      |                ^
      |                ;
   17 |         }
      |         ~       
a.cc:19:16: error: expected ';' before '}' token
   19 |             t++
      |                ^
      |                ;
   20 |         }
      |         ~
Language: C++

#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main() {
	int N;
	int q;
	cin N;
	while(N>q*1000){
		q++;
	}
	cout << q + 1 << endl;
	return 0;
}

	

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'N'
   10 |         cin N;
      |            ^~
      |            ;
Language: C++

using namespace std;
int main(void){
    // Your code here!
    int n ,a = 0;
    cin >> n;
    
    if(n % 1000 > 0) cout << 1000 - (n % 1000) << endl;
    else cout << 0 << endl;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     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 | using namespace std;
a.cc:7:22: error: 'cout' was not declared in this scope
    7 |     if(n % 1000 > 0) cout << 1000 - (n % 1000) << endl;
      |                      ^~~~
a.cc:7:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:51: error: 'endl' was not declared in this scope
    7 |     if(n % 1000 > 0) cout << 1000 - (n % 1000) << endl;
      |                                                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:8:10: error: 'cout' was not declared in this scope
    8 |     else cout << 0 << endl;
      |          ^~~~
a.cc:8:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:23: error: 'endl' was not declared in this scope
    8 |     else cout << 0 << endl;
      |                       ^~~~
a.cc:8:23: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>

#define int long long
#define x first
#define y second
#define PII pair<int,int>
#define LL long long
#define pb push_back
#define pqp priority_queue<PII,vector<PII>,greater<PII>>
#define pqi priority_queue<int,vector<int>,greater<int>>
#define PSS pair<string,string>
#define in insert
#define line inline
#define sort(s) sort(s.begin(),s.end());
#define reverse(s) reverse(s.begin(),s.end());
#define V vector<int>
#define VV vector<V>
#define PDD pair<double,double>

using namespace std;

const int N = 1000010;

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

inline int read()
{
    int x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if (ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' || ch <= '9'){
        x = (x<<1) + (x<<3) + (ch^48);
        ch = getchar();
    }
    return x * f;
}

void solve()
{
    int n; cin >> n;
    ocut << (n - n % 1000) % 1000 << endl;


}
signed main()
{
    //int _; cin >> _ ;while(_ --)
    solve();

    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:45:5: error: 'ocut' was not declared in this scope
   45 |     ocut << (n - n % 1000) % 1000 << endl;
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  cout<<999-(n-1)%1000;
  }
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  N / 1000 = a;
  1000 - a = b;
  N + a + b = c;
  cout << c - N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'a' was not declared in this scope
    7 |   N / 1000 = a;
      |              ^
a.cc:8:14: error: 'b' was not declared in this scope
    8 |   1000 - a = b;
      |              ^
a.cc:9:15: error: 'c' was not declared in this scope
    9 |   N + a + b = c;
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  N / 1000 = a
  1000 - a = b
  N + a + b = c
  cout << c - N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'a' was not declared in this scope
    7 |   N / 1000 = a
      |              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'N' was not declared in this scope
    5 |   cin >> N;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cout << N + N / 1000 + 1000 - N / 1000 - N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'N' was not declared in this scope
    5 |   cout << N + N / 1000 + 1000 - N / 1000 - N << endl;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  cout << N + N / 1000 + 1000 - N / 1000 - N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'N' was not declared in this scope
    6 |   cout << N + N / 1000 + 1000 - N / 1000 - N << endl;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  cout << N / 1000 + 1000 - N / 1000 - N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'N' was not declared in this scope
    6 |   cout << N / 1000 + 1000 - N / 1000 - N << endl;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  N / 1000 = a
  1000 - a = b
  N + a + b = c
  cout << c - N << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'N' was not declared in this scope
    6 |   N / 1000 = a
      |   ^
a.cc:6:14: error: 'a' was not declared in this scope
    6 |   N / 1000 = a
      |              ^
Language: Java

import com.sun.prism.shader.Solid_TextureYV12_AlphaTest_Loader;

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

public class Main {

  public static void main(String[] args) {

      Scanner in = new Scanner(System.in);
      int N = in.nextInt();
      int bill = 1000;

      if(N%bill==0)
      {


          System.out.println(0);
      }
        else
      {
          int no_of_notes = N/bill + 1;
          System.out.println(no_of_notes*1000-N);
      }
  }

}


Compiler output:
Main.java:1: error: package com.sun.prism.shader does not exist
import com.sun.prism.shader.Solid_TextureYV12_AlphaTest_Loader;
                           ^
1 error
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(void) {
    int a;
    cin >> a;
    if(a%1000==0){
        cout << 0 << endl;
    }
    else(cout << 1000-a%1000  << endl;)
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:38: error: expected ')' before ';' token
   10 |     else(cout << 1000-a%1000  << endl;)
      |         ~                            ^
      |                                      )
a.cc:10:39: error: expected primary-expression before ')' token
   10 |     else(cout << 1000-a%1000  << endl;)
      |                                       ^
Language: C++

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

int main{
  float n;
  cin >> n;
  int k=ceil(n/1000);
  cout << k*1000-n;
  return 0;
}


Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main{
      |     ^~~~
a.cc:6:3: error: expected primary-expression before 'float'
    6 |   float n;
      |   ^~~~~
a.cc:6:3: error: expected '}' before 'float'
a.cc:5:9: note: to match this '{'
    5 | int main{
      |         ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin >> n;
      |   ^~~
a.cc:8:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |   int k=ceil(n/1000);
      |              ^
      |              yn
a.cc:9:3: error: 'cout' does not name a type
    9 |   cout << k*1000-n;
      |   ^~~~
a.cc:10:3: error: expected unqualified-id before 'return'
   10 |   return 0;
      |   ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

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

int main{
  float n;
  cin >> n;
  int k=ceil(n/1000);
  cout << k*1000-n;
  return 0;
}

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

#include <iostream>

int main(void) {
    int N;
    cin >> N;

    int s;
    int answer;
    s = N % 1000;
    answer = N - s*1000;

    cout << answer << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: 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:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << answer << 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:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << answer << 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>
using namespace std;

int main(){
  int n;
  cin >> n;
  c = c % 1000;
  if(c != 0){
    cout << 1000 - c << endl;
  }
  else{
    cout << 0 << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = c % 1000;
      |   ^
Language: Java

import java.util.*;
public class Solution {

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

        int n = sc.nextInt();
        if (n % 1000 == 0)
            System.out.println(0);
        else 
            System.out.println(Math.abs(n % 1000 - 1000));

    }
}

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

import java.util.Scanner;

public class atcoder_begin_173_A_Payment {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int price = scan.nextInt(); // 商品価格
        scan.close();
        int num1000 = price / 1000; // 必要な1000円の枚数-1
        if (price % 1000 == 0) {
            // 価格が1000円で割り切れるときはお釣り０
            System.out.println("0");
        } else {
            System.out.println(1000 * (num1000 + 1) - price);
        }
    }
}

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

import java.util.*;
public class Main {
	public static void main(String[] args){
	    Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
      
      	int maisu = 0;
      	if(n%1000=0) {
          maisu = n / 1000;
          System.out.println(maisu);
        } else {
          maisu = n % 1000 + 1;
          System.out.println(maisu);
        }
    }
}

Compiler output:
Main.java:9: error: unexpected type
      	if(n%1000=0) {
      	    ^
  required: variable
  found:    value
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
	    Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
      
      	int maisu = 0;
      	if(n%1000=0) {
          maisu = n / 1000;
        } else {
          maisu = n % 1000 + 1;
        }
      	  System.out.println(maisu);
    }
}


Compiler output:
Main.java:9: error: unexpected type
      	if(n%1000=0) {
      	    ^
  required: variable
  found:    value
1 error
Language: Java

import java.util.*;

public class Main(String[] args){
  public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int oturi = 0;
		//for(int i = N; i > 1000;i++) {
			oturi = N % 1000;
		//}
		System.out.println(oturi);
	}
}

Compiler output:
Main.java:3: error: '{' expected
public class Main(String[] args){
                 ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;int div;
  cin >> n;
  int i=1;
  int change=0;
  int amount=1000;
  if(n<amount){
    change = amount-n
  }
  else{
    div=n/amount
    div=div*1000;
    change = n-div;
  }
  cout << change << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before '}' token
   10 |     change = amount-n
      |                      ^
      |                      ;
   11 |   }
      |   ~                   
a.cc:13:17: error: expected ';' before 'div'
   13 |     div=n/amount
      |                 ^
      |                 ;
   14 |     div=div*1000;
      |     ~~~
Language: C

int main(){
  int n=0;
  int a=0;
  scanf("%d",&n);
  
  a = n%1000;
  a = 1000-a;
  
  printf("%d", a);
    

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d",&n);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 |   printf("%d", a);
      |   ^~~~~~
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:3: error: expected declaration or statement at end of input
Language: C++

int n;
cin>>n;
cout<<n%1000<<endl;

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin>>n;
      | ^~~
a.cc:3:1: error: 'cout' does not name a type
    3 | cout<<n%1000<<endl;
      | ^~~~