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

#include<iostream>
using namespace std;
int main()
{
  int N,amt;
  cin>>N;
  if(N<=1000)
  {
    amt=N-1000;
    cout<<amt<<endl;
  else
    (N>1000)
    cout<<"0"<<endl;
  }
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected '}' before 'else'
   11 |   else
      |   ^~~~
a.cc:8:3: note: to match this '{'
    8 |   {
      |   ^
a.cc:12:13: error: expected ';' before 'cout'
   12 |     (N>1000)
      |             ^
      |             ;
   13 |     cout<<"0"<<endl;
      |     ~~~~     
a.cc: At global scope:
a.cc:15:5: error: expected unqualified-id before 'return'
   15 |     return 0;
      |     ^~~~~~
a.cc:16:5: error: expected declaration before '}' token
   16 |     }
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N,amt;
  cin>>N;
  if(N<=1000)
    amt=N-1000;
    cout<<amt<<endl;
    else 
      (N>1000)
    cout<<"0"<<endl;
     return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else
      |     ^~~~
a.cc:11:15: error: expected ';' before 'cout'
   11 |       (N>1000)
      |               ^
      |               ;
   12 |     cout<<"0"<<endl;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N,amt;
  cin>>N;
  if(N<=1000)
    amt=N-1000;
    cout<<amt<<endl;
    else if(N>1000)
    cout<<"0"<<endl;
     return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else if(N>1000)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin>>n;
  string s={"AC","WA","TLE","RA"};
  int a[4]={};
  while(n--) {
    cin>>s;
    if(s=="AC") a[0]++;
    else if(s=="WA") a[1]++;
    else if(s=="TLE") a[2]++;
    else a[3]++;
  }
  for(int i=0;i<4;i++) {
    cout<<s[i]<<" x "<<a[i]<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:33: error: could not convert '{"AC", "WA", "TLE", "RA"}' from '<brace-enclosed initializer list>' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    6 |   string s={"AC","WA","TLE","RA"};
      |                                 ^
      |                                 |
      |                                 <brace-enclosed initializer list>
Language: C++

#include <stdio.h>

int main(void)
{
	int a,n;
	scanf_s("%d", &n);
	if (n > 1000) {
		n %= 1000;
	}
	a = 1000  - n;
	printf("%d\n", a);
}

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

#include <stdio.h>

int main(void)
{
	int a,n;
	scanf_s("%d", &n);
	if (n > 1000) {
		n %= 1000;
	}
	a = 1000  - n;
	printf("%d\n", a);
}

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

#include <stdio.h>

int main(void)
{
	int a,N;
	scanf_s("%d", &N);
	if (N > 1000) {
		N %= 1000;
	}
	a = 1000  - N;
	printf("%d\n", a);
}

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

#include <stdio.h>

int main(void)
{
	int a,N;
	scanf_s("%d", &N);
	if (N > 1000) {
		N %= 1000;
	}
	a = 1000  - N;
	printf("%d\n", a);
}

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

#include<stdio.h>

int main(void)
{
  int n,payment;

printf()
  scanf("%d",&n);
  payment=n%1000;
  printf("%d\n",payment);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:1: error: too few arguments to function 'printf'
    7 | printf()
      | ^~~~~~
In file included from main.c:1:
/usr/include/stdio.h:363:12: note: declared here
  363 | extern int printf (const char *__restrict __format, ...);
      |            ^~~~~~
main.c:7:9: error: expected ';' before 'scanf'
    7 | printf()
      |         ^
      |         ;
    8 |   scanf("%d",&n);
      |   ~~~~~
Language: C

#include<stdio.h>

int main(void)
{
  int n,payment;

  scanf("%d",&n)
  payment=n%1000;
  printf("%d\n",payment);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected ';' before 'payment'
    7 |   scanf("%d",&n)
      |                 ^
      |                 ;
    8 |   payment=n%1000;
      |   ~~~~~~~
Language: C++

#include<stdio.h>

int main(){
	int n,a,b;
	scanf("%d", &n);
	a= n%1000;
	b= 1000-a;
	if(j==1000){
		printf("0");
	}
	printf("%d", b);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'j' was not declared in this scope
    8 |         if(j==1000){
      |            ^
Language: C++

#include<stdio.h>

int main(){
	int n,a,b;
	scanf("%d", &n);
	a= n%1000;
	b= 1000-a;
	if(j==1000){
		printf("0")
	}
	printf("%d", b);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'j' was not declared in this scope
    8 |         if(j==1000){
      |            ^
a.cc:9:28: error: expected ';' before '}' token
    9 |                 printf("0")
      |                            ^
      |                            ;
   10 |         }
      |         ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope
    7 |  cout<<1000-(n%1000)<<endl;
      |              ^
Language: C++

#include <iostream>

int main() {
  int n; std::cin >> n;
  std::cou << 1000 - n << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'cou' is not a member of 'std'; did you mean 'cout'?
    5 |   std::cou << 1000 - n << std::endl;
      |        ^~~
      |        cout
Language: C++

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

int main(){
	int N;
	cin >> N;
	while (N >= 1000)
      N -= 1000
    cout << N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'cout'
    8 |       N -= 1000
      |                ^
      |                ;
    9 |     cout << N << endl;
      |     ~~~~
Language: C

#include <stdio.h>

int main(void)
{
  
  int n;
  int ans;
  
  scanf("%d", &n);
  
  ans = n % 1000;
  
  printf("%d", ans);
 
  
  ruturn 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:3: error: 'ruturn' undeclared (first use in this function)
   16 |   ruturn 0;
      |   ^~~~~~
main.c:16:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:9: error: expected ';' before numeric constant
   16 |   ruturn 0;
      |         ^~
      |         ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'ans1' was not declared in this scope; did you mean 'ans'?
   11 |     ans1=1000-ans;
      |     ^~~~
      |     ans
Language: Java

import java.util.Scanner;

public class APayment {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int temp = n / 1000 * 1000;
        int result = temp == n ? 0 : temp + 1000 - n;
        System.out.println(result);
    }
}

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

package beginnerContest173;

import java.util.Scanner;

public class APayment {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int temp = n / 1000 * 1000;
        int result = temp == n ? 0 : temp + 1000 - n;
        System.out.println(result);
    }
}

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

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<tuple>
#include<map>
#include<bitset>
#include<queue>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;

int main(){
  int n;
  cin >> n;

  n = n % 1000;
  if (n != 0){
    n = abs(n - 1000);  
  }

  cout <<  << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected primary-expression before '<<' token
   22 |   cout <<  << endl;
      |            ^~
Language: C++

#include<iostream>

int main()
{
    int N=0;
    int joyo=0;

    std::cin >> N;

    joyo=N%1000;

    if(0 != joyo)
    {
        otsuri=1000-joyo;
    }
    std::cout << joyo;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'otsuri' was not declared in this scope
   14 |         otsuri=1000-joyo;
      |         ^~~~~~
Language: C++

#include <iostream>

int main(){

	std::string N;
	std::cin >> N;
	int change;

	change = N % 1000;
	change - 1000;

		std::cout << 'N' << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    9 |         change = N % 1000;
      |                  ~ ^ ~~~~
      |                  |   |
      |                  |   int
      |                  std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

//Compiler version g++ 6.3.0

int main()
{
  int n, rem, sum;
  cin>>n;
  if(n%1000==0)
  {
    cout<<"0"<<endl;
  }
  else
  {
    rem=n/1000;
    mod=n%1000;
    sum=1000-mod;
    cout<<sum<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'mod' was not declared in this scope; did you mean 'modf'?
   17 |     mod=n%1000;
      |     ^~~
      |     modf
Language: C

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

int main()
{

   int a;

   cin >> a;
   
   if (a%1000 == 0)
   cout << a % 1000 ;
   
   else 
   {
      cout << 1000 - a % 1000;
   }


    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: Java

import java.util.Scanner;

public class Test {

    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        System.out.println((1000-(x%1000))%1000);

    }

}


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

import java.util.Scanner;

public class Test {

    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        System.out.println(1000-(x%1000));

    }

}


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

import java.util.Scanner;

public class Test {
    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        System.out.println(1000-(x%1000));

    }
}


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

import java.util.Scanner;

public class t1
{


    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        System.out.println(1000-(x%1000));

    }
}

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

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

Compiler output:
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | 　return(0);
      | ^
a.cc: In function 'int main()':
a.cc:10:1: error: '\U00003000return' was not declared in this scope; did you mean 'sigreturn'?
   10 | 　return(0);
      | ^~~~~~~~
      | sigreturn
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int i;
  double n;
  cin>>n;
  if(n%1000==0){
    cout<<"0"<<'\n';
    }else{
      for(i=0;i=n;i++){
      i=i+1000;
      }
    cout<<i-n<<'\n';
  }
  return(0);
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   if(n%1000==0){
      |      ~^~~~~
      |      | |
      |      | int
      |      double
Language: C++

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

int main() {
  int n,a;
  
  if(n%1000 == 0)
    cout<<0;
  else{
    a=1000-(n%1000);
    cout<<a<<endl;
  
}


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

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

int main() {
  int n,a;
  
  if(n%1000 == 0)
    cout<<0;
  else{
    a=1000-(n%1000)
    cout<<a<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before 'cout'
   10 |     a=1000-(n%1000)
      |                    ^
      |                    ;
   11 |     cout<<a<<endl;
      |     ~~~~            
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:52: error: expected ';' before ')' token
    9 |   cout << ((n % 1000 != 0) ? 1000 - (n % 1000) : 0));
      |                                                    ^
      |                                                    ;
Language: C

#include <iostream>
using namespace std;

int main()
{
	int N, back;
	N = 0; back = 0;
	cin >> N;
	if (N > 0 && N<10000) {
		back = N % 1000;
		cout << back;

	}
	else {

	}
	return 0;
}

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

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

int main() {
  int n;
  int a,w,t,r;
  cin >> n;
  string str[n];
  a = 0;
  w = 0;
  t = 0;
  r = 0;

  for(int i = 0; i < n; i++){
      cin >> str[i];
  }


  for(int i = 0; i < n; i++){
    if(str[i] == "AC"){
        a++;
    }else if(str[i] == "WA"){
        w++;
    }else if(str[i] == "TLE"){
        t++;
    }else if(str[i] == "RE"){
        r++;
    }
  }

  cout << "AC " << "x " << a << endl
  cout << "WA " << "x " << w << endl
  cout << "TLE " <<  "x " << t << endl
  cout << "RE " << "x " << r << endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:37: error: expected ';' before 'cout'
   32 |   cout << "AC " << "x " << a << endl
      |                                     ^
      |                                     ;
   33 |   cout << "WA " << "x " << w << endl
      |   ~~~~
Language: C++

int main() {
  int n;
  int r;
  cin >> n;
  
  r = n % 1000; 

    cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> n;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << r << endl;
      |     ^~~~
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout << r << endl;
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  int r;
  cin >> n;
  cin >> str;
  
  r = n % 1000; 
  

    cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   cin >> str;
      |          ^~~
      |          std
Language: C++

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

    int main() {
        
        int n;
        cin >> n;
        
        if(n%1000==0)
            cout << 0;
            
        else if(1000<n<2000)
                cout << 2000 <<' ';
                
         else if(2000<n<3000)
                cout << 3000<<' ';
                
        else if(3000<n<4000)
                cout << 4000<<' ';
        
        else if(4000<n<5000)
            cout << 5000 <<' ';
            
        else if(5000<n<6000)
            cout << 6000 <<' ';
        
        else if(6000<n<7000)
            cout << 7000 <<' ';
            
        else if(7000<n<8000)
            cout << 8000<<' ';
            
        else if(8000<n<9000)
            cout << 9000<<' ';
            
        else if(9000<n<10000)
            cout << 10000<<' ';
            
            return 0;
        }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:10:13: error: 'cout' was not declared in this scope
   10 |             cout << 0;
      |             ^~~~
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout << 2000 <<' ';
      |                 ^~~~
a.cc:16:17: error: 'cout' was not declared in this scope
   16 |                 cout << 3000<<' ';
      |                 ^~~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << 4000<<' ';
      |                 ^~~~
a.cc:22:13: error: 'cout' was not declared in this scope
   22 |             cout << 5000 <<' ';
      |             ^~~~
a.cc:25:13: error: 'cout' was not declared in this scope
   25 |             cout << 6000 <<' ';
      |             ^~~~
a.cc:28:13: error: 'cout' was not declared in this scope
   28 |             cout << 7000 <<' ';
      |             ^~~~
a.cc:31:13: error: 'cout' was not declared in this scope
   31 |             cout << 8000<<' ';
      |             ^~~~
a.cc:34:13: error: 'cout' was not declared in this scope
   34 |             cout << 9000<<' ';
      |             ^~~~
a.cc:37:13: error: 'cout' was not declared in this scope
   37 |             cout << 10000<<' ';
      |             ^~~~
Language: C++

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected '(' before '{' token
   12 |   {
      |   ^
      |   (
Language: Java

import java.util.Scanner;

public class Atcoder{
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s=0;
    if(n<=1000){
        s=1000-n;
        System.out.println(s);
    }else if(n<=2000){
        s=2000-n;
        System.out.println(s);
    }else if(n<=3000){
        s=3000-n;
        System.out.println(s);
    }else if(n<=4000){
        s=4000-n;
        System.out.println(s);
    }else if(n<=5000){
        s=5000-n;
        System.out.println(s);
    }else if(n<=6000){
        s=6000-n;
        System.out.println(s);
    }else if(n<=7000){
        s=7000-n;
        System.out.println(s);
    }else if(n<=8000){
        s=8000-n;
        System.out.println(s);
    }else if(n<=9000){
        s=9000-n;
        System.out.println(s);
    }else if(n<=10000){
        s=10000-n;
        System.out.println(s);
    }
    
    }
}

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

public class Main {
  public static void main(String[] args) {
    int N = new java.util.Scanner(System.in).nextInt();
    if (N == 1000 || N == 2000 || N == 3000 || N == 4000 || N == 5000 || N == 6000 || N == 7000 || N == 8000 || N == 9000 || N == 10000) {
      int A = 0; 
    } else {
    int A = 1000 - (N % 1000);
    }
    System.out.println(A);
  }
}


Compiler output:
Main.java:9: error: cannot find symbol
    System.out.println(A);
                       ^
  symbol:   variable A
  location: class Main
1 error
Language: Java

public class Main {
  public static void main(String[] args) {
    int N = new java.util.Scanner(System.in).nextInt();
    if (N == 1000 || 2000 || 3000 || 4000 || 5000 || 6000 || 7000 || 8000 || 9000 || 10000) {
      int A = 0; 
    } else {
    int A = 1000 - (N % 1000);
    }
    System.out.println(A);
  }
}


Compiler output:
Main.java:4: error: bad operand types for binary operator '||'
    if (N == 1000 || 2000 || 3000 || 4000 || 5000 || 6000 || 7000 || 8000 || 9000 || 10000) {
                  ^
  first type:  boolean
  second type: int
Main.java:9: error: cannot find symbol
    System.out.println(A);
                       ^
  symbol:   variable A
  location: class Main
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: 'else' without a previous 'if'
    9 |  else {cout << ans << endl;}
      |  ^~~~
Language: C++

#include<bits/stdc++.h>
usig namespace std;
int main()
{
  int64_t n;
  cin>>n;
  cout<<n%1000<<"\n";
  return 0;
}

Compiler output:
a.cc:2:1: error: 'usig' does not name a type
    2 | usig namespace 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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<n%1000<<"\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++

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

int main() {
    int n; cin >> n;
    cout << N  % 1000 ;
}

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

#include<stdio.h>
int main(void)
{
  int N,n;
  scanf("%d",&N)
  n=1000-N;
  printf("%d",n)
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:5:17: error: expected ';' before 'n'
    5 |   scanf("%d",&N)
      |                 ^
      |                 ;
    6 |   n=1000-N;
      |   ~              
main.c:7:17: error: expected ';' before 'return'
    7 |   printf("%d",n)
      |                 ^
      |                 ;
    8 |   return 0;
      |   ~~~~~~
Language: C

#include <stdio.h>

int a, b, c,d, i;
int main(){
	scanf("%d", &a);
	int b = a/1000;
	int c = a-b*1000;
	int d = 1000 - c;
	printf("%d\n",d)0;
	return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:9:25: error: expected ';' before numeric constant
    9 |         printf("%d\n",d)0;
      |                         ^
      |                         ;
Language: C

#include <stdio.h>

int a, b, c,d, i;
int main(){
	scanf("%d", &a);
	int b = a/1000;
	int c = a-b*1000;
	int d = 1000 - c;
	printf("%d\n",a)0;
	return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:9:25: error: expected ';' before numeric constant
    9 |         printf("%d\n",a)0;
      |                         ^
      |                         ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int N, AC = 0, WA = 0, TLE = 0 , RE = 0;
  cin>>N;
  string c;
  for(int i=0; i<N; i++){
    cin>>c;
    switch(c.at(0){
      case 'A':
        AC++;
        break;
      case 'W':
        WA++;
        break;
      case 'T':
        TLE++;
        break;
      case 'R':
        RE++;
        break;
    }
  }
  cout<<"AC x "<<AC<<"\n";
  cout<<"WA x "<<WA<<"\n";
  cout<<"TLE x "<<TLE<<"\n";
  cout<<"RE x "<<RE<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: expected ')' before '{' token
   11 |     switch(c.at(0){
      |           ~       ^
      |                   )
a.cc:25:3: error: expected primary-expression before '}' token
   25 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int N, AC = 0, WA = 0, TLE = 0 , RE = 0;
  cin>>N;
  string c;
  for(int i=0; i<N; i++){
    cin>>c;
    switch(c[0]){
      case "A":
        AC++;
        break;
      case "W":
        WA++;
        break;
      case "T":
        TLE++;
        break;
      case "R":
        RE++;
        break;
    }
  }
  cout<<"AC x "<<AC<<"\n";
  cout<<"WA x "<<WA<<"\n";
  cout<<"TLE x "<<TLE<<"\n";
  cout<<"RE x "<<RE<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: conversion from 'const char*' to 'int' in a converted constant expression
   12 |       case "A":
      |            ^~~
a.cc:12:12: error: could not convert '"A"' from 'const char [2]' to 'int'
   12 |       case "A":
      |            ^~~
      |            |
      |            const char [2]
a.cc:15:12: error: conversion from 'const char*' to 'int' in a converted constant expression
   15 |       case "W":
      |            ^~~
a.cc:15:12: error: could not convert '"W"' from 'const char [2]' to 'int'
   15 |       case "W":
      |            ^~~
      |            |
      |            const char [2]
a.cc:18:12: error: conversion from 'const char*' to 'int' in a converted constant expression
   18 |       case "T":
      |            ^~~
a.cc:18:12: error: could not convert '"T"' from 'const char [2]' to 'int'
   18 |       case "T":
      |            ^~~
      |            |
      |            const char [2]
a.cc:21:12: error: conversion from 'const char*' to 'int' in a converted constant expression
   21 |       case "R":
      |            ^~~
a.cc:21:12: error: could not convert '"R"' from 'const char [2]' to 'int'
   21 |       case "R":
      |            ^~~
      |            |
      |            const char [2]
Language: C++

// https://atcoder.jp/contests/abc173/tasks/abc173_a
#include <bit/stdc++.h>
using namespace std ;
int main() 
{
    long long n ;
    cin >> n ;
    if (n % 1000 == 0) cout << 0 << endl ;
    else cout << 1000 - (n % 1000) << endl ;
    return 0 ;
}
/*  CODED BY:-
 ___________________________________
|                       ___         |
|  /\   /\  \ /  |  |  |___   |__|  |        
| /~~\ /~~\  |   |__|   ___|  |  |  |
|___________________________________|
 
*/

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

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

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

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

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

Compiler output:
a.cc:3:1: error: expected identifier before 'int'
    3 | int main ()
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | int main ()
      | ~~~             
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 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << res << 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:9:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << res << 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 argc,char **argc){
  int n=0;
  int re=0;
  
  cin>>n;
  re=(n%1000);
  if(ans){
    std::cout<<1000-re<<std::endl;
  }else{
    std::cout<<ans<<std::endl;
  }
}

Compiler output:
a.cc:3:26: error: conflicting declaration 'char** argc'
    3 | int main(int argc,char **argc){
      |                   ~~~~~~~^~~~
a.cc:3:14: note: previous declaration as 'int argc'
    3 | int main(int argc,char **argc){
      |          ~~~~^~~~
a.cc: In function 'int main(...)':
a.cc:9:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if(ans){
      |      ^~~
      |      abs
Language: C++

#include <iostream<

using namespace std;


int N; // N 1000 1900 3000 0 100

int main(){

  cin >> N;
  
  N = 1000 - N;
  
  cout << N;

}

Compiler output:
a.cc:1:20: error: missing terminating > character
    1 | #include <iostream<
      |                    ^
a.cc:1:10: fatal error: iostream<: No such file or directory
    1 | #include <iostream<
      |          ^
compilation terminated.
Language: C

#include<stdio.h>
void main()
{
 int n,i=1,s;
  scanf("%d",&n);
  while(a>0)
  {
    a=n-1000*i;
    i++;
    s=a;
  }
  printf("%d",-s);
}
    

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'a' undeclared (first use in this function)
    6 |   while(a>0)
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n,s=0;
	if(n%1000==0)
		cout<<0;
	else
	s+=n/1000+1;
	cout<<1000*s-n

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'return'
   10 |         cout<<1000*s-n
      |                       ^
      |                       ;
   11 | 
   12 |     return 0;
      |     ~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n,y;
	cin >> n;
	if (n/1000==0); y++);
	cout << y;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected ';' before ')' token
    7 |         if (n/1000==0); y++);
      |                            ^
      |                            ;
Language: C++

#include <iostream> 
using namespace std;
int main(){
	int x, b;
	cin >> b;
	int x = b % 1000;
	cout << (1000-x) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: redeclaration of 'int x'
    6 |         int x = b % 1000;
      |             ^
a.cc:4:13: note: 'int x' previously declared here
    4 |         int x, b;
      |             ^
Language: C++

 #include <iostream>
2 using namespace std;
3 int main(){
4 int N;
5 cin >> N;
6 cout << (1000 - N % 1000) % 1000 << endl;
7 }

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 using namespace std;
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3 int main(){
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b;
	cin>>a;
	if(a%1000!=0)
	b=n/1000;
	
	b=b*1000;
	cout<<(b-a)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |         b=n/1000;
      |           ^
Language: C

#include <iostream>
2 using namespace std;
3 int main(){
4 int N;
5 cin >> N;
6 cout << (1000 - N % 1000) % 1000 << endl;
7 }

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

#include <iostream>
using namespace std;

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

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else m=n/1000;
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n,m,l;
  cin>>n;
  if (n%1000!=0)
  m=(n/1000)+1;
  l=1000*m-n;
  cout<<l<<endl;
  else m=n/1000;
  l=1000*m-n;
  cout<<l<<endl;
  
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else m=n/1000;
      |   ^~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin >> N;
    int a;
    a = N % 1000;
    cout << a << 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 <bits/stdc++.h>
using namespace std;

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);	
	int x;
	cin >> x;
	x %= 1000
	x = 1000 - x;
	if (x == 1000) x = 0;
	cout << x << "\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'x'
   10 |         x %= 1000
      |                  ^
      |                  ;
   11 |         x = 1000 - x;
      |         ~
Language: C++

#include <iostream>
2 using namespace std;
3 int main(){
4 int N;
5 cin >> N;
6 cout << (1000 - N % 1000) % 1000 << endl;
7 }

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 using namespace std;
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3 int main(){
      | ^
Language: C++

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

int a;
main (){
  cin>>a;
  cout<<1000-a%1000;

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main (){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:21: error: expected '}' at end of input
    7 |   cout<<1000-a%1000;
      |                     ^
a.cc:5:8: note: to match this '{'
    5 | main (){
      |        ^
Language: C

#include<stdio.h>
using namespace std;
int main(){
  int m,c;
  cin>>m;
  c=1000-m%1000;
  cout<<c<<endl;
  return 0;
}
  


Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:5:3: error: 'cin' undeclared (first use in this function)
    5 |   cin>>m;
      |   ^~~
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: 'cout' undeclared (first use in this function)
    7 |   cout<<c<<endl;
      |   ^~~~
main.c:7:12: error: 'endl' undeclared (first use in this function)
    7 |   cout<<c<<endl;
      |            ^~~~
Language: C

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

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

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

#define ll long long

int main() {
	int n;
	cin >> n;
	int ans;
	for (int i = 1; i < 112 i++) {
		ans = n - 1000 * i;
		if (ans > 0)break;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: expected ';' before 'i'
   10 |         for (int i = 1; i < 112 i++) {
      |                                ^~
      |                                ;
Language: C++

#include <stdio.h>
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:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>N;
      |   ^~~
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<0<<endl;
      |     ^~~~
a.cc:6:14: error: 'endl' was not declared in this scope
    6 |     cout<<0<<endl;
      |              ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<1000-(N%1000)<<endl;
      |     ^~~~
a.cc:9:26: error: 'endl' was not declared in this scope
    9 |     cout<<1000-(N%1000)<<endl;
      |                          ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(void) {
  int n;cin>>n;
  if (n%1000==0){cout<<0<<endl;break;}
  int x;x=((n/1000)+1);
  cout<<x*1000-n<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:32: error: break statement not within loop or switch
    5 |   if (n%1000==0){cout<<0<<endl;break;}
      |                                ^~~~~
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String [] args)
{
 
    Scanner sc = new Scanner(System.in);
  	System.out.println("Enter the the value for n");
    int n = sc.nextInt();
  
  	if(n < 1 || n > 10000)
    {
    	System.exit(1)
    }
  
    int change = n % 1000;
  	System.out.println(change);
}
}


Compiler output:
Main.java:12: error: ';' expected
    	System.exit(1)
    	              ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String [] args)
{
 
    Scanner sc = new Scanner(System.in);
  	System.out.println("Enter the the value for n");
    int userInput = sc.nextDouble();
  
    int change = userInput % 1000;
  	System.out.println(change);
}
}


Compiler output:
Main.java:8: error: incompatible types: possible lossy conversion from double to int
    int userInput = sc.nextDouble();
                                 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String [] args)
{
 
    Scanner sc = new Scanner(System.in);
  	System.out.println("Enter the the value for n")
    double userInput = sc.nextDouble();
  
  	System.out.println(userInput%1000);
}
}


Compiler output:
Main.java:7: error: ';' expected
  	System.out.println("Enter the the value for n")
  	                                               ^
1 error
Language: Java

import java.util.Scanner;

public static void main(String [] args)
{
	Scanner sc = new Scanner(System.in);
  	System.out.println("Enter the the value for n")
    double userInput = sc.nextDouble();
  
  	System.out.println(userInput % 1000);
}


Compiler output:
Main.java:3: 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)
Main.java:6: error: ';' expected
  	System.out.println("Enter the the value for n")
  	                                               ^
2 errors
Language: Java

import java.util.Scanner;

public static void main(String [] args)
{
	Scanner sc = new Scanner(System.in);
  	System.out.println("Enter the the value for n")
    double userInput = sc.nextDouble();
  
  	System.out.println(n%1000);
}

Compiler output:
Main.java:3: 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)
Main.java:6: error: ';' expected
  	System.out.println("Enter the the value for n")
  	                                               ^
2 errors
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();
        System.out.println(-n%1000+1000);
    }
}


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: Java

import java.util.Scanner;

public class Payment {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(n%1000);
    }
}



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++

1 #include <iostream>
2 using namespace std;
3 int main(){
4 int N;
5 cin >> N;
6 cout << (1000 - N % 1000) % 1000 << endl;
7 }

Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | 1 #include <iostream>
      |   ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1 #include <iostream>
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3 int main(){
      | ^
Language: C++

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

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

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

Compiler output:
a.cc:2:2: error: extended character   is not valid in an identifier
    2 |   using namespace std;
      |  ^
a.cc:2:2: error: '\U000000a0using' does not name a type
    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 >> 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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << 1000 - N  % 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:6:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << 1000 - N  % 1000 << 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 N ;
  cin >> N;
  cout << (N % 1000) % 1000 << endl;
}

Compiler output:
a.cc:2:2: error: extended character   is not valid in an identifier
    2 |   using namespace std;
      |  ^
a.cc:2:2: error: '\U000000a0using' does not name a type
    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 >> 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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << (N % 1000) % 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:6:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << (N % 1000) % 1000 << 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 N;
  cin >> N;
  cout << (N % 1000) % 1000 << endl;
}

Compiler output:
a.cc:2:2: error: extended character   is not valid in an identifier
    2 |   using namespace std;
      |  ^
a.cc:2:2: error: '\U000000a0using' does not name a type
    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 >> 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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << (N % 1000) % 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:6:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << (N % 1000) % 1000 << 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 <stdio.h>
#include<iostream>
#include<string>
using namespace std;
int main() {
	int H;
	cin >> H;
	if (H % 1000 == 0)
		cout << 0 << endl;
	else 
		cout<<1000 - (H % 1000)<<endl;
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cour' was not declared in this scope
    5 |         cour << 1000 - n << endl;
      |         ^~~~