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

#includeM<stdio.h>

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includeM; did you mean #include?
    1 | #includeM<stdio.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (1000 - N % 1000) % 1000;
      |   ^~~~
Language: C

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

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

#include <stdio.h>
int main () {
    int a;
    scanf("%d",&a);
    if (a%1000!=0)
    {
        printf("%d\n",1000-(a%1000));
    }
    else
    {
        printf("0\n")
    }
    
    
}

Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ';' before '}' token
   11 |         printf("0\n")
      |                      ^
      |                      ;
   12 |     }
      |     ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:15: error: invalid operands to binary * (have 'int (*)(const char * restrict, ...)' and 'char *')
   11 |         printf*("0\n")
      |         ~~~~~~^
      |         |     |
      |         |     char *
      |         int (*)(const char * restrict, ...)
main.c:11:23: error: expected ';' before '}' token
   11 |         printf*("0\n")
      |                       ^
      |                       ;
   12 |     }
      |     ~
Language: Java

import java.util.*;
 
public class Main {
	public static void main(String args[] ) throws Exception {
		Scanner sc = new Scanner(System.in);
		int money = sc.nextINT();
		int souzond = (money / 1000)+1;
                System.out.print((souzond*1000)-money);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int money = sc.nextINT();
		              ^
  symbol:   method nextINT()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.*;
 
public class Main {
	public static void main(String args[] ) throws Exception {
		Scanner sc = new Scanner(System.in);
		int money = sc.nextint();
		int souzond = (money / 1000)+1;
                System.out.print((souzond*1000)-money);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int money = sc.nextint();
		              ^
  symbol:   method nextint()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String args[] ) throws Exception {
		Scanner sc = new Scanner(System.in);
		int money = sc.nextint();
		int souzond = (money / 1000);1;
                System.out.print((souzond*1000)-money);
	}
}

Compiler output:
Main.java:7: error: not a statement
		int souzond = (money / 1000);1;
		                             ^
1 error
Language: Java

mport java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
      	int n = Integer.parseInt(line);
      
      	int x = n % 1000;
      	int answer = 0;
      	if(x > 0){
          answer = 1000 - x;
        }
      System.out.println(String.valueOf(answer));
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
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();
      
      	int raise =(int) N %1000;
      	int answer = 0;
      	if(N!=0){
          int answer = N - (raise*1000);
        }
      	System.out.println(String.valueOf(answer));
    }
}

Compiler output:
Main.java:12: error: variable answer is already defined in method main(String[])
          int answer = N - (raise*1000);
              ^
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();
      
      	int raise =(int) N %1000;
      	if(N!=0){
          int answer = N - (raise*1000);
        } else {
          int answer = 0;
        }
      	System.out.println(String.valueOf(answer));
    }
}

Compiler output:
Main.java:15: error: cannot find symbol
      	System.out.println(String.valueOf(answer));
      	                                  ^
  symbol:   variable answer
  location: class Main
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();
      
      	int raise =(int) N %1000;
      	if(N!=0){
          int answer = N - (raise*1000);
        } else {
          int answer = 0;
      	System.out.println(String.valueOf(answer));
    }
}

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

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

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

#include <iostream>
using namespace std;


int main(){
	int n;
  	int ac=0, wa=0, tle=0, re=0;
  	string temp;
  	cin >> n;
  	for (int i=0;i<n;i++){
      cin >> temp;
      if(temp == "AC")
          ac++;
      else if(temp == "WA") 
          wa++;
      else if (temp == "TLE")
          tle++;
      else if (temp == "RE")
          re++;
      }
    }
  cout << "AC x " << ac << endl;
  cout << "WA x " << wa << endl;
  cout << "TLE x " << tle << endl;
  cout << "RE x " << re << endl;
  return 0;
}


Compiler output:
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout << "AC x " << ac << endl;
      |   ^~~~
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout << "WA x " << wa << endl;
      |   ^~~~
a.cc:24:3: error: 'cout' does not name a type
   24 |   cout << "TLE x " << tle << endl;
      |   ^~~~
a.cc:25:3: error: 'cout' does not name a type
   25 |   cout << "RE x " << re << endl;
      |   ^~~~
a.cc:26:3: error: expected unqualified-id before 'return'
   26 |   return 0;
      |   ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <iostream>

int main(){
  	int yen;
  	cin >> yen;
  	cout << (yen%1000?yen/1000+1:yen/1000)*1000 - yen%1000;
	return 0;
}

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 >> yen;
      |         ^~~
      |         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 << (yen%1000?yen/1000+1:yen/1000)*1000 - yen%1000;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include　<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  cout << (N+1000-1)/1000-N;
}

Compiler output:
a.cc:1:2: error: extended character 　 is not valid in an identifier
    1 | #include　<iostream>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
    1 | #include　<iostream>
      |  ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #include　<iostream>
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << (N+1000-1)/1000-N;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include<iostream>
using namespace std;

int main() {
    int n;
	cin>>n;
	cout<<(int)ceil(n/1000.0)*1000-n<<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 <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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: lvalue required as left operand of assignment
    8 |  if (n % 1000 = 0)
      |      ~~^~~~~~
Language: C

n= int(input())
eq= 1000-(n%1000)
if n%1000==0:
    eq=0
print(eq)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n= int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:4: error: expected expression before 'int'
    1 | n= int(input())
      |    ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a,k;
vector<int> value;
const int MOD=1e9+7;

productOf_K_elements(){


    int product = 1;

    //case 1

    if(value[n-1]==0 and k%2 != 0){
        return 0;
    }

    //case 2

    if(value[n-1]<0 and k%2 != 0){

//        reverse(value.begin(),value.end());
        for(int i=n-1; i>=n-k; i--){
            product *= value[i];
            product =  ((product%MOD)+MOD )%MOD;
        }

        return product;
    }

    //case 3

    int left_side  = 0;
    int right_side = n - 1;

    if(value[n-1]>0 and k%2 != 0){
        product = (product%MOD * value[n-1]%MOD)%MOD;
        k--;
        right_side--;
    }




     k = k/2;

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

          int left =  (value[left_side]%MOD * value[left_side+1]%MOD)%MOD;
          int right = (value[right_side]%MOD * value[right_side-1]%MOD)%MOD;



          if(left>right){
             product = ((product * left)%MOD + MOD)%MOD;
             left_side+=2;
          }
          else{
            product = ((product * right)%MOD + MOD)%MOD;
            right_side-=2;
          }

          //cout<<MOD<<endl;
          //product = (product%MOD)+MOD;
     }

     return product;





}


int32_t main()
{


    cin>>n>>k;

    for(int i=0; i<n; i++){
        cin>>a;
        value.push_back(a);
    }

    sort(value.begin(),value.end());

    cout<<productOf_K_elements()<<endl;

    return 0;

}



Compiler output:
a.cc:8:1: error: ISO C++ forbids declaration of 'productOf_K_elements' with no type [-fpermissive]
    8 | productOf_K_elements(){
      | ^~~~~~~~~~~~~~~~~~~~
Language: C++

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

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

  int a ; 
  
  for  (a=1 ; a<=10 ; a++){
   if (a*1000 - N >= 0 && (a-1)*1000 - N =< 0 ){
       cout << a*1000 - N  << endl;
   }
    
      
  }
   
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:43: error: expected primary-expression before '<' token
   11 |    if (a*1000 - N >= 0 && (a-1)*1000 - N =< 0 ){
      |                                           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before 'if'
    6 | int cnt=if(n%1000)?0:(n-(n%1000);
      |         ^~
Language: Java

public class Main{
 public static void main(String[] args){
  int sum = new java.util.Scanner(System.in).nextInt();
  
  while(){
   int i = 1;
   int pay = 1000*i;
   if(pay >= sum){
    int oturi = pay - sum;
    break;
   }else{
    i++;
   }
  }
 
  System.out.println(oturi);
 }
}

Compiler output:
Main.java:5: error: illegal start of expression
  while(){
        ^
1 error
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected '}' at end of input
    9 | else cout << A << endl;
      |                        ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

int solve(){
    int n;
    cin >> n;
    int ans=1000-n%1000;
    cout << ans;
}
int main()
{
/*
    string temp;
    int t;
    cin >> t;
    getline(cin, temp);
    while (t--){
        solve();
    }
*/
    solve();
}

Compiler output:
a.cc: In function 'int solve()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n;
      |     ^~~
a.cc:5:5: error: 'cout' was not declared in this scope
    5 |     cout << ans;
      |     ^~~~
a.cc:6:1: warning: no return statement in function returning non-void [-Wreturn-type]
    6 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: redeclaration of 'll l'
    8 |   ll l=1000-l;
      |      ^
a.cc:7:6: note: 'll l' previously declared here
    7 |   ll l=n%1000;
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define F(a,b,c) for(int a=b;a<c;++a) 
int main(){
	int n;cin>>n;
	cout<<1000-n%1000;19
}


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

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


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

#include<iostream>
using namespace std;
int main
{
 int n; cin>>n;
 cout<<(n+999 )/1000*1000-n<<endl;
}


Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main
      |     ^~~~
a.cc:5:2: error: expected primary-expression before 'int'
    5 |  int n; cin>>n;
      |  ^~~
a.cc:5:2: error: expected '}' before 'int'
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
a.cc:5:9: error: 'cin' does not name a type
    5 |  int n; cin>>n;
      |         ^~~
a.cc:6:2: error: 'cout' does not name a type
    6 |  cout<<(n+999 )/1000*1000-n<<endl;
      |  ^~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C++

#include<iostream>

int main
{
 int n; cin>>n;
 cout<<(n+999 )/1000*1000-n<<endl;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main
      |     ^~~~
a.cc:5:2: error: expected primary-expression before 'int'
    5 |  int n; cin>>n;
      |  ^~~
a.cc:5:2: error: expected '}' before 'int'
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
a.cc:5:9: error: 'cin' does not name a type
    5 |  int n; cin>>n;
      |         ^~~
a.cc:6:2: error: 'cout' does not name a type
    6 |  cout<<(n+999 )/1000*1000-n<<endl;
      |  ^~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C

include <stdio.h>

int main(void){
    int N,sum;

    scanf("%d",&N);

    sum = 1000-N;

    printf("%d",sum);
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected '}' at end of input
   14 |   cout<<result;
      |                ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n,result,rem;
  cin>>n;
  rem=n%1000;
  result=1000-rem;
  cout<<result;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected '}' at end of input
    9 |   cout<<result;
      |                ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

#include <iostream>
using namespace std;
int main()
{
  int n,result,rem;
  cin>>n;
  rem=n%1000;
  result=1000-rem;
  cout<<result;

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>
using namespace std;
int main(){
  int n;
cin>>n;
  n%=1000;
  if(n ==0){cout<<'0';}
  else {cout(1000 - n);}
  return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    8 |   else {cout(1000 - n);}
      |         ~~~~^~~~~~~~~~
Language: C

#include<iostream>
using namespace std;
int main()
{
  int n,result,rem;
  cin>>n;
  rem=n%1000;
  result=1000-rem;
  cout<<result;
}

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

#include<stdio.h>
int main(){
    int a;
    cin>>a;
    if(a<=1000){
        cout<<1000-a<<endl;
    }
    else
        cout<<0<<endl;
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:5: error: 'cin' undeclared (first use in this function)
    4 |     cin>>a;
      |     ^~~
main.c:4:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:9: error: 'cout' undeclared (first use in this function)
    6 |         cout<<1000-a<<endl;
      |         ^~~~
main.c:6:23: error: 'endl' undeclared (first use in this function)
    6 |         cout<<1000-a<<endl;
      |                       ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

void arr_sort(int *a, int i)
{
  int tmp;
  int k;
  
  k = i;
  while (k > 0)
  {
    if (a[k] > a[k - 1])
    {
      tmp = a[k];
      a[k] = a[k - 1];
      a[k - 1] = a[k];
    }
    k--;
  }
}

int main(void)
{
  int n;
  int k;
  int i;
  int a*;
  long times;
  long res;
  
  if (!(scanf("%d %d", &n, &k)))
    return (0);
  a = (int *)malloc(n * sizeof(int));
  i = 0;
  while (i < n)
  {
    if (!(scanf("%d", &a[i])))
        return (0);
    arr_sort(a, i++);
  };
  i = 0;
  times = 1;
  while (i < k)
    times *= a[i++];
  free(a);
  printf("%d", times % (100000000 + 7));
  return (0);
}

Compiler output:
main.c: In function 'main':
main.c:27:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   27 |   int a*;
      |        ^
main.c:27:9: error: expected expression before ';' token
   27 |   int a*;
      |         ^
main.c:33:3: error: 'a' undeclared (first use in this function)
   33 |   a = (int *)malloc(n * sizeof(int));
      |   ^
main.c:33:3: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

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

Compiler output:
Main.java:1: error: class Test1 is public, should be declared in a file named Test1.java
public class Test1{
       ^
Main.java:3: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Test1
Main.java:3: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class Test1
Main.java:5: error: incompatible types: int cannot be converted to boolean
    if(N)
       ^
4 errors
Language: C++

#include<iostream>
#include<string>
using namespace std;
 
int main(){
  int n;
  int a = 0, b = 0, c = 0, d = 0;
  string s[10000];
  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> s[i];
  if(s[i] == AC){
    a++;
  }
    else if(s[i] == WA){
    b++;
    }
    else if(s[i] == TLE){
      c++;
    }
    else{
      d++:
    }
  }
  cout << "AC * "<<a<<endl;
  cout << "WA * "<<b<<endl;
  cout << "TLE * "<<c<<endl;
  cout << "RE * "<<d<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'AC' was not declared in this scope
   12 |   if(s[i] == AC){
      |              ^~
a.cc:15:21: error: 'WA' was not declared in this scope
   15 |     else if(s[i] == WA){
      |                     ^~
a.cc:18:21: error: 'TLE' was not declared in this scope
   18 |     else if(s[i] == TLE){
      |                     ^~~
a.cc:22:10: error: expected ';' before ':' token
   22 |       d++:
      |          ^
      |          ;
Language: C++

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

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

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

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

#include<stdio.h>
int main(void){
  int a;
  scanf("%d",&a);
  printf("%d",a%1000);
  retrurn 0;
}

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

#include<stdio.h>
int main(void){
  int a;
  scanf("%d",&a);
  printf("%d",a%1000);
  rerurn 0;
}

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

#include <iostream>
using namespace std;
int main()
{
    int N;
    cin >> N;
    cout << N-(N/1000)*1000
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected ';' before '}' token
    7 |     cout << N-(N/1000)*1000
      |                            ^
      |                            ;
    8 | }
      | ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (long int)'
    7 |   else {cout(1000 - n);}
      |         ~~~~^~~~~~~~~~
Language: C++

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

int main(){
	int n,ansA=0,ansW=0,ansT=0,ansR=0;
  	cin>>n;
  	string s[n]
  	for(int i=1;i<=n;i++){
    	cin>>s[i];
      	if(s[i]==AC) ansA++;
      	else if(s[i]==WA) ansW++;
      	else if(s[i]==TLE) ansT++;
      	else if(s[i]==RE) ansR++;
    }
  	cout<<"AC x"<<ansA<<endl<<"WA x"<<ansW<<endl<<"TLE x"<<ansT<<endl<<"RE x"<<ansR<<endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'for'
    8 |         for(int i=1;i<=n;i++){
      |         ^~~
a.cc:8:21: error: 'i' was not declared in this scope
    8 |         for(int i=1;i<=n;i++){
      |                     ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |   else {cout(1000 - n);}
      |         ~~~~^~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |   else {cout(1000 - n);}
      |         ~~~~^~~~~~~~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class code {
	public static void main(String[] args)throws IOException {
		FastReader sc = new FastReader();
		PrintWriter pw = new PrintWriter(System.out);
		int n = sc.nextInt();
		int m = (int)Math.ceil(n * 1.0 / 1000.0);
		System.out.println(1000 * m - n);

	}
}





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());
	}

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

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

import java.util.Scanner;
public class B {
    int A=0,W=0,T=0,R=0;
    void main(){
        Scanner scan = new Scanner(System.in);
        String txt = new String();
        int N = scan.nextInt();
        for(int i = 0;i < N;i++){
            txt = scan.next;
            if(txt == "AC"){
                A++;
            }else if(txt == "WA"){
                W++;
            }else if(txt == "TLE"){
                T++;
            }else if(txt == "RE"){
                R++;
            }
        }
        System.out.println("AC x " + A);
        System.out,println("WA x " + W);
        System.out.println("TLE x " + T);
        System.out.println("RE x " + R);
    }
    
}

Compiler output:
Main.java:21: error: not a statement
        System.out,println("WA x " + W);
              ^
Main.java:21: error: ';' expected
        System.out,println("WA x " + W);
                  ^
2 errors
Language: Java

import java.util.Scanner;
public class B {
    int A=0,W=0,T=0,R=0;
    void main(){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        for(int i = 0;i < N;i++){
            String txt = scan.next;
            if(txt == "AC"){
                A++;
            }else if(txt == "WA"){
                W++;
            }else if(txt == "TLE"){
                T++;
            }else if(txt == "RE"){
                R++;
            }
        }
        System.out.println("AC x " + A);
        System.out.println("WA x " + W);
        System.out.println("TLE x " + T);
        System.out.println("RE x " + R);
    }
    
}

Compiler output:
Main.java:2: error: class B is public, should be declared in a file named B.java
public class B {
       ^
Main.java:8: error: cannot find symbol
            String txt = scan.next;
                             ^
  symbol:   variable next
  location: variable scan of type Scanner
2 errors
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |   else {cout(1000 - d);}
      |         ~~~~^~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |   else {cout(1000 - d);}
      |         ~~~~^~~~~~~~~~
Language: C++

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

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

import java.util.Scanner;
class abc
{
  public static void main(String args[])
  {
    Scanner s=new Scanner(System.in);
   int yen=1000,n,r;
    n=s.nextInt();
    r=n%yen;
    if(r==0)
      System.out.println("0");
    else
    {
     r=yen-r;
     System.oout.println(r);
    }
  }
}

Compiler output:
Main.java:15: error: cannot find symbol
     System.oout.println(r);
           ^
  symbol:   variable oout
  location: class System
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |   else {cout(1000 - d);}
      |         ~~~~^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  for(int i = 0;1000 * i <= n;i++){
  }
  cout << 1000 * i <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'i' was not declared in this scope
    9 |   cout << 1000 * i <<endl;
      |                  ^
Language: Java

class abc
{
  public static void main(String args[])
  {
    Scanner s=new Scanner(System.in);
   int yen=1000,n,r;
    n=s.nextInt();
    r=n%yen;
    if(r==0)
      System.out.println("0");
    else
    {
     r=yen-r;
     System.oout.println(r);
    }
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    Scanner s=new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class abc
Main.java:5: error: cannot find symbol
    Scanner s=new Scanner(System.in);
                  ^
  symbol:   class Scanner
  location: class abc
Main.java:14: error: cannot find symbol
     System.oout.println(r);
           ^
  symbol:   variable oout
  location: class System
3 errors
Language: Java

class
{
  public static void main(String args[])
  {
    Scanner s=new Scanner(System.in);
   int yen=1000,n,r;
    n=s.nextInt();
    r=n%yen;
    if(r==0)
      System.out.println("0");
    else
    {
     r=yen-r;
     System.oout.println(r);
    }
  }
}
    
    
                          

Compiler output:
Main.java:1: error: <identifier> expected
class
     ^
1 error
Language: Java

import math

n = int(input())
x = math.ceil(n/1000)
s = 1000*x

if n > m:
    result = n - m
else:
    result = m - n
    
print(result)

Compiler output:
Main.java:1: error: '.' expected
import math
           ^
Main.java:3: error: ';' expected
n = int(input())
 ^
2 errors
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int M = N - 2;
  int sum = 0;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
   sort(A.begin(),A.end());

  if(N >= 4){
  for (int i = N; i > 1; i--) {
    sum += A[i];
  }
  cout << sum - A[0] << endl;
}
  else{
  for (int i = N; i > 1; i--) {
    sum += A[i];
  }
    cout << sum - A[0] + A[M]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:30: error: expected ';' before '}' token
   25 |     cout << sum - A[0] + A[M]
      |                              ^
      |                              ;
   26 | }
      | ~                             
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout<<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:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout<<n%1000<<endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    final int price = new PriceReader().read();
    final int balance = new BalanceCalculator().pay(price);
    new BapancePrinter().write(balance);
  }
  
}

class BalanceCalculator {
  private static final int AMOUNT_PER_BILL = 1_000;
  public int pay(int price) {
    int bills = price / AMOUNT_PER_BILL;
    if (bills * AMOUNT_PER_BILL < price) {
      bills++;
    }
    return bills * AMOUNT_PER_BILL - price;
  }
}

class PriceReader {
  public int read() {
    Scanner scanner = new Scanner(System.in);
    return scanner.nextInt();
  }
}

class BalancePrinter {
  public void write(int balance) {
    System.out.println(balance);
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    new BapancePrinter().write(balance);
        ^
  symbol:   class BapancePrinter
  location: class Main
1 error
Language: C++

#include<iostream>
int main()
{
	int N,c;
  	cin>>N;
  	c=n%1000;
   	cout<<c;
return 0;
}

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:11: error: 'n' was not declared in this scope
    6 |         c=n%1000;
      |           ^
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<c;
      |         ^~~~
      |         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);

        Integer N = sc.nextInt();

        Integer ans = 0;
        if (N%1000 != 0) {// N が1000で割り切れないとき
            ans = (N/1000 + 1)*1000 - N;
        }

        System.out.println(ans);
    }
}

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

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    final int proce = new PriceReader().read();
    final int balance = new BalanceCalculator().pay(price);
    new BapancePrinter().write(balance);
  }
  
}

class BalanceCalculator {
  private static final int AMOUNT_PER_BILL = 1_000;
  public int pay(int price) {
    int bills = price / AMOUNT_PER_BILL;
    if (bills * AMOUNT_PER_BILL < price) {
      bills++;
    }
    return bills * AMOUNT_PER_BILL - price;
  }
}

class PriceReader {
  public int read() {
    Scanner scanner = new Scanner(System.in);
    return scanner.nextInt();
  }
}

class BalancePrinter {
  public void write(int balance) {
    System.out.println(balance);
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    final int balance = new BalanceCalculator().pay(price);
                                                    ^
  symbol:   variable price
  location: class Main
Main.java:7: error: cannot find symbol
    new BapancePrinter().write(balance);
        ^
  symbol:   class BapancePrinter
  location: class Main
2 errors
Language: Java

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

  Integer N = sc.nextInt();

  Integer ans = 0;
  if (N%1000 != 0) {// N が1000で割り切れないとき
      ans = (N/1000 + 1)*1000 - N;
  }

  System.out.println(ans);
}

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

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

Compiler output:
main.c: In function 'main':
main.c:14:7: error: 'i' undeclared (first use in this function)
   14 |   for(i=0;i<N;i++){
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

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

public class atcoder{
  public static void main(String[] args)throws IOException{
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    String line;
	int Line=Integer.parseInt(br.readLine());
    	while(Line>1000){
      		Line-=1000;
			if(Line<1000){System.out.print(Line);}
      	}
		if(Line==1000){System.out.print("0");}
  }
}

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

#include "stdio.h"

void main()
{
	int nedan, maisu, okane;

	scanf_s("%d", &nedan);
	maisu = nedan / 1000;
	okane = nedan - (maisu * 1000);
	okane = 1000 - okane;

	if (okane == 0)
		printf("0");

	else
		printf("%d", okane);



}

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

#include "iostream"
#include "vector"
#include "string"
#include <iomanip>
#include <algorithm>
#define rep(i,n) for (int i= 0; i < (n); ++i)
using ll = long long;
using namespace std;
const double PI = 3.14159265358979323846;

int vector_finder(std::vector<int> vec, int number) {
	auto itr = std::find(vec.begin(), vec.end(), number);
	size_t index = std::distance(vec.begin(), itr);
	if (index != vec.size()) { // 発見できたとき
		return 1;
	}
	else { // 発見できなかったとき
		return 0;
	}
}

int main() {
	double N;
	cin >> N;
	
	double cN = std::ceil(N / 1000) * 1000;

	cout << cN - N << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: 'ceil' is not a member of 'std'
   26 |         double cN = std::ceil(N / 1000) * 1000;
      |                          ^~~~
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] var0) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int ans = 0;

        if (N < 1000) {
            ans = 1000 - N;
        } else if (N % 1000 == 0){
            System.out.println(0);
            System.exit(0);
        } else {
            String t = String.valueOf(N);
            char c = t.charAt(0);
            int thousand = Character.getNumericValue(c)*1000;
            ans = 1000 - (N - thousand);
        }

        System.out.println(ans);
    }
}


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

#include "iostream"
#include "vector"
#include "string"
#include <iomanip>
#include <algorithm>
#define rep(i,n) for (int i= 0; i < (n); ++i)
using ll = long long;
using namespace std;
const double PI = 3.14159265358979323846;

int vector_finder(std::vector<int> vec, int number) {
	auto itr = std::find(vec.begin(), vec.end(), number);
	size_t index = std::distance(vec.begin(), itr);
	if (index != vec.size()) { // 発見できたとき
		return 1;
	}
	else { // 発見できなかったとき
		return 0;
	}
}

int main() {
	double N;
	cin >> N;
	
	double cN = ceil(N / 1000) * 1000;

	cout << cN - N << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:21: error: 'ceil' was not declared in this scope
   26 |         double cN = ceil(N / 1000) * 1000;
      |                     ^~~~
Language: Java

public class Payment{
  public static void main(String[] args){
    int n = new java.util.Scanner(System.in).nextInt();

    for (int i=0; ;i++){
      int tmp = (i+1)*1000 - n;
      if (tmp >= 0){
        System.out.println(tmp);
        break;
      }
    }
  }
}


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

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

int main(){
  int n;
  cin>>n;
  if(n%1000==0){
    return 0;}
  int a=n%1000;
  int b=n/1000;
  if(a==500)
    return 1000-a;
  else if(a<500){
    return a;
  }else{
    b++;
    return b*1000-a;
  }
  
  }
return 0;}


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

#include "stdio.h"

void main()
{
int nedan,maisu,okane;

scanf_s("%d",&nedan);
maisu=nedan / 1000;
okane=nedan-(maisu *1000);

if(okane==0)
printf("0");

else
printf("%d",okane);



}

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

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

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

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
 
int main(){
	char num[256], str[256];
	int i, nums;
  	int AC = 0;
  	int WA = 0;
  	int TLE = 0;
  	int RE = 0;
	fgets(num, sizeof(num), stdin);
  	nums = atoi(num);
  	for(i = 0; i < nums; i++){
      fgets(str, sizeof(str), stdin);
      if(strcmp(str, "AC\n") == 0){
        	AC++;
      }
      else if(strcmp(str, "WA\n") == 0){
        	WA++;
      }
      else if(strcmp(str, "TLE\n") == 0){
        	TLE++;
      }
      else if(strcmp(str, "RE\n") == 0){
        	RE++;
      }
      else if(strcmp(str, "AC") == 0){
        	AC++;
      }
      else if(strcmp(str, "WA") == 0){
        	WA++;
      }
      else if(strcmp(str, "TLE") == 0){
        	TLE++;
      }
      else if(strcmp(str, "RE") == 0){
        	RE++;
      }
    }  	
  	printf("AC × %d\n", AC);
  	printf("WA × %d\n", WA);
  	printf("TLE × %d\n", TLE);
  	printf("RE × %d", RE);
	return 0;
}

    }  	
  	printf("AC × %d\n", AC);
  	printf("WA × %d\n", WA);
  	printf("TLE × %d\n", TLE);
  	printf("RE × %d", RE);
	return 0;
}

Compiler output:
main.c:48:5: error: expected identifier or '(' before '}' token
   48 |     }
      |     ^
main.c:49:16: error: expected declaration specifiers or '...' before string constant
   49 |         printf("AC × %d\n", AC);
      |                ^~~~~~~~~~~
main.c:49:29: error: unknown type name 'AC'
   49 |         printf("AC × %d\n", AC);
      |                             ^~
main.c:50:16: error: expected declaration specifiers or '...' before string constant
   50 |         printf("WA × %d\n", WA);
      |                ^~~~~~~~~~~
main.c:50:29: error: unknown type name 'WA'
   50 |         printf("WA × %d\n", WA);
      |                             ^~
main.c:51:16: error: expected declaration specifiers or '...' before string constant
   51 |         printf("TLE × %d\n", TLE);
      |                ^~~~~~~~~~~~
main.c:51:30: error: unknown type name 'TLE'
   51 |         printf("TLE × %d\n", TLE);
      |                              ^~~
main.c:52:16: error: expected declaration specifiers or '...' before string constant
   52 |         printf("RE × %d", RE);
      |                ^~~~~~~~~
main.c:52:27: error: unknown type name 'RE'
   52 |         printf("RE × %d", RE);
      |                           ^~
main.c:53:9: error: expected identifier or '(' before 'return'
   53 |         return 0;
      |         ^~~~~~
main.c:54:1: error: expected identifier or '(' before '}' token
   54 | }
      | ^