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

#include<stdio.h>
void main()
{
  int i,j,k=0,a,b,c,d,e;
  scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
 if(k==a)
   printf(1);
   if(k==b)
   printf(2);
   if(k==c)
   printf(3);
   if(k==d)
   printf(4);
   if(k==e)
}

Compiler output:
main.c: In function 'main':
main.c:7:11: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    7 |    printf(1);
      |           ^
      |           |
      |           int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:9:11: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    9 |    printf(2);
      |           ^
      |           |
      |           int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:11:11: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   11 |    printf(3);
      |           ^
      |           |
      |           int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:13:11: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   13 |    printf(4);
      |           ^
      |           |
      |           int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:15:1: error: expected expression before '}' token
   15 | }
      | ^
Language: Java

import java.util.Scanner;
import java.lang.*;

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

      Scanner scan = new Scanner(System.in);
	int array[]  = new int[5];
	int array[0] = sc.nextInt();
	int array[1] = sc.nextInt();
	int array[2] = sc.nextInt();
	int array[3] = sc.nextInt();
	int array[4] = sc.nextInt();



      for(int num : array){
      	if(num == 0){
        	System.out.println(num );
        }
      
      
      }
      
      
      
    }      
}

Compiler output:
Main.java:10: error: ']' expected
	int array[0] = sc.nextInt();
	          ^
Main.java:11: error: ']' expected
	int array[1] = sc.nextInt();
	          ^
Main.java:12: error: ']' expected
	int array[2] = sc.nextInt();
	          ^
Main.java:13: error: ']' expected
	int array[3] = sc.nextInt();
	          ^
Main.java:14: error: ']' expected
	int array[4] = sc.nextInt();
	          ^
5 errors
Language: C++

#include<stdio.h>
#include<bits/stdc++.h">
int main(){
int a[5];
  for(int i=0;i<5;i++)
  {
    cin>>a[i];
    if(a[i]==0)
cout<<a[i];
  }
return 0;
}


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

#include<stdio.h>
#include"bits/stdc++.h" 
int main(){
int a[5];
  for(int i=0;i<5;i++)
  {
    cin>>a[i];
    if(a[i]==0)
cout<<a[i];
  }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin>>a[i];
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | cout<<a[i];
      | ^~~~
      | 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>
int main(){
  int X,Y;
  scanf("%d %d",&X,&Y);
  
  if((Y-2*X)%2==0){
   if((4X-Y)%2==0){
     printf("Yes");
   }else{
   printf("No");
   }
  }else{    
  printf("No");
  }
 return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:7:8: error: invalid suffix "X" on integer constant
    7 |    if((4X-Y)%2==0){
      |        ^~
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    int pos;
    int[] a=new int[4];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
      if(a[i]==0)
        pos=i;
    }
    System.out.println(pos+1);
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    for(int i=0;i<n;i++){
                  ^
  symbol:   variable n
  location: class Main
Main.java:8: error: cannot find symbol
      a[i]=sc.nextInt();
           ^
  symbol:   variable sc
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
  ll arr[5];
  for(int i=0;i<5;i++){
    cin>>arr[i];
  }
  for(int i=0;i<5;i++){
    if(arr[i]==0){
      cout<<i+1;
      break;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.Scanner;
import java.lang.*;

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

      Scanner scan = new Scanner(System.in);
	int array[]  = new int[5]
	int array[0] = sc.nextInt();
	int array[1] = sc.nextInt();
	int array[2] = sc.nextInt();
	int array[3] = sc.nextInt();
	int array[4] = sc.nextInt();



      for(int num : array){
      	if(num == 0){
        	System.out.println(num );
        }
      
      
      }
      
      
      
    }      
}

Compiler output:
Main.java:9: error: ';' expected
	int array[]  = new int[5]
	                         ^
Main.java:10: error: ']' expected
	int array[0] = sc.nextInt();
	          ^
Main.java:11: error: ']' expected
	int array[1] = sc.nextInt();
	          ^
Main.java:12: error: ']' expected
	int array[2] = sc.nextInt();
	          ^
Main.java:13: error: ']' expected
	int array[3] = sc.nextInt();
	          ^
Main.java:14: error: ']' expected
	int array[4] = sc.nextInt();
	          ^
6 errors
Language: C

#include<stdio.h>
#include<conio.h>
void main()
{
  int i,j,k=0,a,b,c,d,e;
  scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
 if(k==a)
   printf(1);
   if(k==b)
   printf(2);
   if(k==c)
   printf(3);
   if(k==d)
   printf(4);
   if(k==e)
   printf(5);

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

#include<bits/c++.h>
suin namespace std;

int main(){
int a,b,c,d,e;
  if(a==o)
    cout<<"1"<<endl;
   if(b==o)
    cout<<"2"<<endl;
   if(c==o)
    cout<<"3"<<endl;
   if(d==o)
    cout<<"4"<<endl;
   if(e==o)
    cout<<"5"<<endl;
}

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

import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      int[] a=new int[5];
      int res=0;
      for(int i=0;i<5;i++){
      a[i]=sc.nextInt();
        if(a[i]==0)
          res=i+1;
      }
      Sytstem.out.println(res);
    }
}


Compiler output:
Main.java:12: error: package Sytstem does not exist
      Sytstem.out.println(res);
             ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      int[] a=new int[5];
      int res=0;
      for(int i=0;i<5;i++){
      a[i]=sc.nextInt();
        if(a[i]==0)
          res=i+1;
      }
      Sytstem.out.println(i);
    }
}


Compiler output:
Main.java:12: error: cannot find symbol
      Sytstem.out.println(i);
                          ^
  symbol:   variable i
  location: class Main
Main.java:12: error: package Sytstem does not exist
      Sytstem.out.println(i);
             ^
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {

		

	
		Scanner scanner = new Scanner(System.in);
		char [] ar = scanner.nextLine().toCharArray(); 
		
		for(int i=0; i<ar.length; i++) {
			if (ar[i] == '0') {
				System.out.println(i);
			}
		}

	}}

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

#include<iostream>
using namespace std;

int main()
{
	int a[5];
	for(int i=0;i<5;++i)
	{
		cin >> a[i];
		if(a[i]==0)
			int ind = i + 1;

	}
	cout << ind;
	exit(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'ind' was not declared in this scope; did you mean 'int'?
   14 |         cout << ind;
      |                 ^~~
      |                 int
Language: C++

#include<stdio.h>
int main(){
int a[5];
  for(int i=0;i<5;i++)
  {
    cin>>a[i];
    if(a[i]==0)
cout<<a[i];
  }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>a[i];
      |     ^~~
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout<<a[i];
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int i=5,x;
	if(i--)
	{
		cin>>x;
		if(x==0)
			break;
	}
	cout<<i;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: break statement not within loop or switch
   14 |                         break;
      |                         ^~~~~
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      int[] a=new int[5];
      int res=0;
      for(int i=0;i<5;i++){
      a[i]=sc.nextInt();
        if(a[i]==0)
          int res=i+1;
      }
      Sytstem.out.println(i);
    }
}

Compiler output:
Main.java:10: error: variable declaration not allowed here
          int res=i+1;
              ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define fast()    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mod   1000000007
int main()
{
	fast()
	int a[5];
    for(int i=0;i<5;i++)
    {
        cin>>a[i];
        if(a[i]==0)
        {cout<<i+1;
            break;}
    }

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

#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>

void a(std::istream& in)
{
    std::list<int> xList(5, 0);
    for (auto& x : xList)
    {
        in >> x;
    }

    xList.sort();
    int prev = -1;
    for (auto& x : xList)
    {
        if (prev + 1 != x)
        {
            std::cout << prev + 1;
            return;
        }
        prev = x;
    }
}

int main(int, char* [])
{
    a(std::cin);
    return 0;
}


Compiler output:
a.cc: In function 'void a(std::istream&)':
a.cc:9:10: error: 'list' is not a member of 'std'
    9 |     std::list<int> xList(5, 0);
      |          ^~~~
a.cc:6:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    5 | #include <algorithm>
  +++ |+#include <list>
    6 | 
a.cc:9:15: error: expected primary-expression before 'int'
    9 |     std::list<int> xList(5, 0);
      |               ^~~
a.cc:10:20: error: 'xList' was not declared in this scope
   10 |     for (auto& x : xList)
      |                    ^~~~~
a.cc:15:5: error: 'xList' was not declared in this scope
   15 |     xList.sort();
      |     ^~~~~
Language: Java

import java.util.*; 
public class Five_Variables{
public static void main(String[] args){
  Scanner input=new Scanner(System.in);
  int a=0,index=0;
  for(int i=0;i<5;i++){
    a=input.nextInt();
    if(a==0){
      index=i+1;
    }
  }
  System.out.print(index);
}
}

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

#intclude<bits/stdc++.h>
 
using namespace std;
 
int main()
{
      //fast;
     int t=1;
   
 
 
    while(t--)
    {
        int a[10];
      for(int i = 1; i <=5; i++) cin >> a[i];
      int res;
      for(int i  = 1; i<=5; i++){
        if(a[i]==0) res = i;
      }
      cout << res << endl;
    }
 
    return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #intclude; did you mean #include?
    1 | #intclude<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:15:34: error: 'cin' was not declared in this scope
   15 |       for(int i = 1; i <=5; i++) cin >> a[i];
      |                                  ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #intclude<bits/stdc++.h>
a.cc:20:7: error: 'cout' was not declared in this scope
   20 |       cout << res << endl;
      |       ^~~~
a.cc:20:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:22: error: 'endl' was not declared in this scope
   20 |       cout << res << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #intclude<bits/stdc++.h>
Language: C++

#include<bits/stdio.h>
using namespace std;
typedef long long int ll;
int main(){
  ll arr[5];
  for(int i=0;i<5;i++){
    cin>>arr[i];
  }
  for(int i=0;i<5;i++){
    if(arr[i]==0){
      cout<<i+1;
      break;
    }
  }


Compiler output:
In file included from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio.h:23:3: error: #error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
   23 | # error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
      |   ^~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>arr[i];
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<bits/stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout<<i+1;
      |       ^~~~
a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a[n];
  for(int i=0;i<5;++i)
  {
	cin >> a[i];
    if(a[i]==0)
      int ind = i;
  }
  cout << ind;
  exit(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'n' was not declared in this scope
    5 |   int a[n];
      |         ^
a.cc:8:16: error: 'a' was not declared in this scope
    8 |         cin >> a[i];
      |                ^
a.cc:12:11: error: 'ind' was not declared in this scope; did you mean 'int'?
   12 |   cout << ind;
      |           ^~~
      |           int
Language: C++

#include<iostream>
using namespace std;
int main()
{
   int a,counter=1;
   for(int i=0;i<5;i++)
   ( cin>>a;
      if(a==0)
      break;
      else
      counter++;
    }
    cout<<counter;
    return 0;
    }
      

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ')' before ';' token
    7 |    ( cin>>a;
      |    ~       ^
      |            )
a.cc:9:7: error: break statement not within loop or switch
    9 |       break;
      |       ^~~~~
a.cc: At global scope:
a.cc:13:5: error: 'cout' does not name a type
   13 |     cout<<counter;
      |     ^~~~
a.cc:14:5: error: expected unqualified-id before 'return'
   14 |     return 0;
      |     ^~~~~~
a.cc:15:5: error: expected declaration before '}' token
   15 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std; 
int main() {
	cin >> a >> b >> c >> d >> e; 
  if (a==0)
    cout << 1; 
  if (b == 0) cout << 2; if (c ==0) cout << 3; if (d == 0) cout << 4; 
  if (e == 0) cout << 5; return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: 'a' was not declared in this scope
    4 |         cin >> a >> b >> c >> d >> e;
      |                ^
a.cc:4:21: error: 'b' was not declared in this scope
    4 |         cin >> a >> b >> c >> d >> e;
      |                     ^
a.cc:4:26: error: 'c' was not declared in this scope
    4 |         cin >> a >> b >> c >> d >> e;
      |                          ^
a.cc:4:31: error: 'd' was not declared in this scope
    4 |         cin >> a >> b >> c >> d >> e;
      |                               ^
a.cc:4:36: error: 'e' was not declared in this scope
    4 |         cin >> a >> b >> c >> d >> e;
      |                                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	//頭数　足
	int X,Y;
	
	cin >> X >> Y;
	int N = X;

	if (4 * X => Y && (4 * X - Y) % 2 == 0) {
		cout << "Yes" << endl;
	}
	else  {
		cout << "No" << endl;
	}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected primary-expression before '>' token
   11 |         if (4 * X => Y && (4 * X - Y) % 2 == 0) {
      |                    ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,n) for(int i=1;i<n;i++)
#define PI 3.14159265358979323846
double tick(){static clock_t oldt,newt=clock();double diff=1.0*(newt-oldt)/CLOCKS_PER_SEC;oldt=newt;return diff;}

using namespace std;

void solve(){
	f(i,5){
    cin>>temp;
      if(temp==0){ cout<<i+1; break;}
    }
	//cout<<tick()<<endl;	
}

int32_t main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL); cout.tie(NULL);
  int t;
  // cin>>t;
  // while(t--)
    solve();
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:13:10: error: 'temp' was not declared in this scope; did you mean 'tm'?
   13 |     cin>>temp;
      |          ^~~~
      |          tm
Language: Java

import java.util.*; 
public class c{
public static void main(String[] args){
  Scanner input=new Scanner(System.in);
  int a=0,index=0;
  for(int i=0;i<5;i++){
    a=input.nextInt();
    if(a==0){
      index=i+1;
    }
  }
  System.out.print(index);
}
}

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


#intclude <bits/stdc++.h>

using namespace std;

int main()
{
      //fast;
     int t=1;
   


    while(t--)
    {
        int a[10];
      for(int i = 1; i <=5; i++) cin >> a[i];
      int res;
      for(int i  = 1; i<=5; i++){
        if(a[i]==0) res = i;
      }
      cout << res << endl;
    }

    return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #intclude; did you mean #include?
    2 | #intclude <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:16:34: error: 'cin' was not declared in this scope
   16 |       for(int i = 1; i <=5; i++) cin >> a[i];
      |                                  ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:21:7: error: 'cout' was not declared in this scope
   21 |       cout << res << endl;
      |       ^~~~
a.cc:21:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:22: error: 'endl' was not declared in this scope
   21 |       cout << res << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

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

int main() {

 int x_1,x_2,x_3,x_4,x_5;

  for (int i = 0; i < 5; i++) { 
   cin>> x_i;
   if(x_i == 0){
   cout << i <<endl;
  }
 }
}


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


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

#define froop1(a,n) for(int i = a;i < n;i++)
#define froop2(a,n) for(int i = a;i > n;i--)
int main(){
	int a;
  froop1(1,6){
    cin >> a;
    if(a == 0){
      cout << i:
    }else{
      cout << a;
    }
  }
  cout << endl;
    

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before ':' token
   12 |       cout << i:
      |                ^
      |                ;
Language: Java

import java.util.*; 
private class c{
public static void main(String[] args){
  Scanner input=new Scanner(System.input);
  int a=0,index=0;
  for(int i=0;i<5;i++){
    a=input.nextInt();
    if(a==0){
      index=i+1;
    }
  }
  System.out.print(index);
}
}

Compiler output:
Main.java:2: error: modifier private not allowed here
private class c{
        ^
Main.java:4: error: cannot find symbol
  Scanner input=new Scanner(System.input);
                                  ^
  symbol:   variable input
  location: class System
2 errors
Language: C

#include <iostream>
using namespace std;

int main()
{
	int a[6];
	
	for (int i=1; i<5;i++)
		cin >> a[i];
	
	for (int i=0; i<6;i++)
	{
		if(a[i]==0)
		{
			cout << i << endl;
			break; 
		}
		continue;
	}
	return 0;
}

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

import java.util.Scanner;
import java.lang.*;

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

      Scanner scan = new Scanner(System.in);
      int num0 = scan.nextInt();
      int num1 = scan.nextInt();
      int num2 = scan.nextInt();
      int num3 = scan.nextInt();
      int num4 = scan.nextInt();
      
      
      for(i =0; i<4; i++){
      	if(num i  == 0){
        	System.out.println(num i);
        }
      
      
      }
      
      
      
    }      
}


Compiler output:
Main.java:17: error: ')' expected
      	if(num i  == 0){
      	      ^
Main.java:17: error: not a statement
      	if(num i  == 0){
      	          ^
Main.java:17: error: ';' expected
      	if(num i  == 0){
      	              ^
Main.java:18: error: ')' or ',' expected
        	System.out.println(num i);
        	                      ^
Main.java:18: error: not a statement
        	System.out.println(num i);
        	                       ^
Main.java:18: error: ';' expected
        	System.out.println(num i);
        	                        ^
6 errors
Language: C++

#include<iostream>
using namaspace std;
int x1,x2,x3,x4,x5;
cin >>x1>>x2>>x3>>x4>>x5;
int x[5];
x[0]=x1:
x[1]=x2;
x[2]=x3;
x[3]=x4;
x[4]=x5
for(i=0;i<5;i++){
	if(x[i]==0){
		cout << i+1 ;
		break;
		}
	}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
    2 | using namaspace std;
      |       ^~~~~~~~~
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >>x1>>x2>>x3>>x4>>x5;
      | ^~~
a.cc:6:1: error: 'x' does not name a type
    6 | x[0]=x1:
      | ^
a.cc:8:1: error: 'x' does not name a type
    8 | x[2]=x3;
      | ^
a.cc:9:1: error: 'x' does not name a type
    9 | x[3]=x4;
      | ^
a.cc:10:1: error: 'x' does not name a type
   10 | x[4]=x5
      | ^
a.cc:11:9: error: 'i' does not name a type
   11 | for(i=0;i<5;i++){
      |         ^
a.cc:11:13: error: 'i' does not name a type
   11 | for(i=0;i<5;i++){
      |             ^
Language: Java

import java.util.*;
public class FiveVAr
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int x1=sc.nextInt();
    int x2=sc.nextInt();
    int x3=sc.nextInt();
    int x4=sc.nextInt();
    int x5=sc.nextInt();
    if(x1==0)
      System.out.println(1);
     if(x2==0)
      System.out.println(2);
      if(x3==0)
      System.out.println(3);
     if(x4==0)
      System.out.println(4);
     if(x5==0)
      System.out.println(5);
  }
}
 
    

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

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

int main{
  int a,b,c,d,e;
  cin >> a >> b >> c >> d >>e;
  
  if(a == 0);
  cout << 1;
  
  else if(b == 0);
  cout << 2;
  
  else if(c == 0);
  cout << 3;
  
  esle if(d == 0);
  cout << 4;
  
  else if(e == 0);
  cout << 5;
  
  return0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a,b,c,d,e;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> a >> b >> c >> d >>e;
      |   ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if(a == 0);
      |   ^~
a.cc:9:3: error: 'cout' does not name a type
    9 |   cout << 1;
      |   ^~~~
a.cc:11:3: error: expected unqualified-id before 'else'
   11 |   else if(b == 0);
      |   ^~~~
a.cc:12:3: error: 'cout' does not name a type
   12 |   cout << 2;
      |   ^~~~
a.cc:14:3: error: expected unqualified-id before 'else'
   14 |   else if(c == 0);
      |   ^~~~
a.cc:15:3: error: 'cout' does not name a type
   15 |   cout << 3;
      |   ^~~~
a.cc:17:3: error: 'esle' does not name a type
   17 |   esle if(d == 0);
      |   ^~~~
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << 4;
      |   ^~~~
a.cc:20:3: error: expected unqualified-id before 'else'
   20 |   else if(e == 0);
      |   ^~~~
a.cc:21:3: error: 'cout' does not name a type
   21 |   cout << 5;
      |   ^~~~
a.cc:23:3: error: 'return0' does not name a type
   23 |   return0;
      |   ^~~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: Java

public class c{
public static void main(String[] args){
  Scanner input=new Scanner(System.input);
  int a=0,index=0;
  for(int i=0;i<5;i++){
    a=input.nextInt();
    if(a==0){
      index=i+1;
    }
  }
  System.out.print(index);
}
}

Compiler output:
Main.java:1: error: class c is public, should be declared in a file named c.java
public class c{
       ^
Main.java:3: error: cannot find symbol
  Scanner input=new Scanner(System.input);
  ^
  symbol:   class Scanner
  location: class c
Main.java:3: error: cannot find symbol
  Scanner input=new Scanner(System.input);
                    ^
  symbol:   class Scanner
  location: class c
Main.java:3: error: cannot find symbol
  Scanner input=new Scanner(System.input);
                                  ^
  symbol:   variable input
  location: class System
4 errors
Language: Java

public c{
public static void main(String[] args){
  Scanner input=new Scanner(System.input);
  int a=0,index=0;
  for(int i=0;i<5;i++){
    a=input.nextInt();
    if(a==0){
      index=i+1;
    }
  }
  System.out.print(index);
}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
public c{
       ^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<iostream>
using namespace std;
main()
{
    int miss=0;
 //   cin >> n;
    int a[n];
    bool flg=false;
    for(int m=0;m<5;m++)
    cin >> a[m];
    for(int m=0;m<=5;m++)
    {
        flg = false;
        for(int k=0;k<5;k++)
        {
            if(a[k]==m)
            flg=true;
        }
        if(flg==false)
        {
            miss=m;
            break;
        }
    }
    cout << "Missing : " << miss << endl;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:11: error: 'n' was not declared in this scope
    7 |     int a[n];
      |           ^
a.cc:10:12: error: 'a' was not declared in this scope
   10 |     cin >> a[m];
      |            ^
a.cc:16:16: error: 'a' was not declared in this scope
   16 |             if(a[k]==m)
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  ll arr[5];
  for(int i=0;i<5;i++){
    cin>>arr[i];
  }
  for(int i=0;i<5;i++){
    if(arr[i]==0){
      cout<<i+1;
      break;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll arr[5];
      |   ^~
a.cc:6:10: error: 'arr' was not declared in this scope
    6 |     cin>>arr[i];
      |          ^~~
a.cc:9:8: error: 'arr' was not declared in this scope
    9 |     if(arr[i]==0){
      |        ^~~
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

// #include <bits/stdc++.h>

#include<stdlib.h>
#include<iostream>
#include<math.h>
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ll long long
#define INF 2000000000
#define Min(a,b) (a<b?a:b)
#define Max(a,b) (a>b?a:b)
#define PI 3.1415926535897932
using namespace std;






int main()
{
int a,b,c,d,e;
cin>>a>>b>>c>>d>>e;
cout<<15-(a+b+c+d+e);
return 0;

}



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

import java.util.*;

public final class Solution {

	static Scanner sc;

	static void solve() {
		int[] in = new int[5];

		int ans = 0;
		for (int i = 0; i < 5; ++i) {
			int tmp = sc.nextInt();
			if (tmp == 0) ans = i + 1;
		}

		System.out.println(ans);
	}
    
    public static void main(String args[]) throws Exception {
        sc = new Scanner(System.in);

		solve();
    }
}


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

public static void main(String[] args){
  Scanner input=new Scanner(System.input);
  int a=0,index=0;
  for(int i=0;i<5;i++){
    a=input.nextInt();
    if(a==0){
      index=i+1;
      break;
    }
  }
  System.out.print(index);
}

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<bits/stdc++.h>
using namespace std;

int main(){
  vector<int>A(5);
  for(int i=0;i<5;i++){
    cin>>A[i];
  }
  for(int i=0;i<5;i++){
    if(A[i]=="0"){
      cout<<i+1<<endl;
      
    }
  
  }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(A[i]=="0"){
Language: C

#include<bits/stdc++.h>
#include<math.h>
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ll long long
#define INF 2000000000
#define Min(a,b) (a<b?a:b)
#define Max(a,b) (a>b?a:b)
#define PI 3.1415926535897932
using namespace std;






int main()
{
int a,b,c,d,e;
cin>>a>>b>>c>>d>>e;
cout<<15-(a+b+c+d+e);
return 0;

}



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

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      int a,b,c,d,e;
      cin >> a,b,c,d,e;
      if( a == 0){
        cout << 1 << endl;
      }
      else if( b == 0){
        cout << 2 <<endl;
      }
      else if( c == 0){
        cout << 3 << endl;
      }
      else if( d == 0){
        cout << 4 << endl;
      }
      else {
        cout << 5 <<endl;
      }
    }

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

import java.util.Scanner;
import java.lang.*;

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

      Scanner scan = new Scanner(System.in);
      int num = scan.nextInt();
      int numbers[] = {1,2,3,4,5}; //配列の設定
      
      for(int num2 : numbers){
      	if(num2 == numbers){
        	System.out.println(nummbers);
        }
      
      
      }
      
      
      
    }      
}

Compiler output:
Main.java:13: error: bad operand types for binary operator '=='
      	if(num2 == numbers){
      	        ^
  first type:  int
  second type: int[]
Main.java:14: error: cannot find symbol
        	System.out.println(nummbers);
        	                   ^
  symbol:   variable nummbers
  location: class Main
2 errors
Language: C

#include <cstdio>
using namespace std;

int main(int argc, char** argv)
{
	for(int i=1; i<6; i++)
	{
		int x;
		scanf("%d", &x);
		if(x == 0)
		{
			printf("%d\n", i);
			return 0;
		}
	}
	return 0;
}

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

#include <iostream>
using namespace std;

int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  if(a==0){
    cout<<1<<endl;
  }
  else if(b==0){
    cout<<2<<endl;
  }
  else if(c==0){
    cout<<3<<endl;
  }
  else if(d==0){
    cout<<4<<endl;
  }
  else if(e==0){
    cout<<5<<endl;
  }
}

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<math.h>
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ll long long
#define INF 2000000000
#define Min(a,b) (a<b?a:b)
#define Max(a,b) (a>b?a:b)
#define PI 3.1415926535897932
using namespace std;






int main()
{
int a,b,c,d,e;
cin>>a>>b>>c>>d>>e;
cout<<15-(a+b+c+d+e);
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;
typedef long long ll;
typedef long double ld;
typedef long int li;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
typedef pair<ll, ll>P;
typedef tuple<ll, int, int>T;
#define PI 3.14159265358979


int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  if(a==0){cout<<1;}
  if(b==0){cout<<2;}
  if(c==0){cout<<3:}
  if(d==0){cout<<4;}
  if(e==0){cout<<5;}
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: expected ';' before ':' token
   17 |   if(c==0){cout<<3:}
      |                   ^
      |                   ;
Language: C

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

int main{
 int a,b,c,d,e;
 cin >> a >> b >> c >> d >> e;
 
 if(a == 0);
 cout << 1;
 
 else if(b == 0);
 cout << 2;
 
 else if(c == 0);
 cout << 3;
 
 else if(d == 0);
 cout << 4;
 
 else;
 cout << 5:
 
 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

package p1;

import java.util.Scanner;

public class FiveVariables {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a[]=new int[5];
		for(int i=0;i<5;i++) {
			a[i]=scan.nextInt();
		}
		for(int i=0;i<5;i++) {
			if(a[i]==0)System.out.println(i+1);
		}
	}

}


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

import java.util.Scanner;
import java.lang.*;

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

      Scanner scan = new Scanner(System.in);
      int num = scan.nextInt();
      int numbers[] = {1,2,3,4,5}; //配列の設定
      
      for(int num2 : numbers){
      	if(num2 == numbers){
        	System.out.println(i);
        }
      
      
      }
      
      
      
    }      
}

Compiler output:
Main.java:13: error: bad operand types for binary operator '=='
      	if(num2 == numbers){
      	        ^
  first type:  int
  second type: int[]
Main.java:14: error: cannot find symbol
        	System.out.println(i);
        	                   ^
  symbol:   variable i
  location: class Main
2 errors
Language: C++

#include<iostream>
int main(){
	int X[5]={0};
	for(int i=0;i<5;i++){
		cin>>X[i];
		if(X[i]==0)cout<<i<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |                 cin>>X[i];
      |                 ^~~
      |                 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:28: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |                 if(X[i]==0)cout<<i<<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:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |                 if(X[i]==0)cout<<i<<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<stdio.h>
void main()
{
  int x1,x2,x3,x4,x5;
  scanf("%d %d %d %d %d",&x1,&x2,&x3,&x4&x5);
  if(x1==0)
    printf("1");
  else if(x2==0)
    printf("2");
  else if(x3==0)
    printf("3");
  else if(x4==0)
    printf("4");
  else if(x5==0)
    printf("5");
}
  


Compiler output:
main.c: In function 'main':
main.c:5:41: error: invalid operands to binary & (have 'int *' and 'int')
    5 |   scanf("%d %d %d %d %d",&x1,&x2,&x3,&x4&x5);
      |                                      ~~~^
      |                                      |
      |                                      int *
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	//頭数　足
	int X,Y;
	
	cin >> X >> Y;
	int N = x;

	if (4 * X > Y) {
		cout << "No" << endl;
	}
	else if ((4 * X - Y) % 2 == 0) {
		cout << "Yes" << endl;
	}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'x' was not declared in this scope
    9 |         int N = x;
      |                 ^
Language: C

#include<stdio.h>

int main(){
    int a[5]={1,2,3,4,5},*h[5];
    h=&h;
    scanf("%d%d%d%d%d", h);
    for(int i=0;i<5;i++){
        if(a[i]!=h[i]){
            printf("%d",a[i]);
        }
    }

    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:5:6: error: assignment to expression with array type
    5 |     h=&h;
      |      ^
main.c:8:16: warning: comparison between pointer and integer
    8 |         if(a[i]!=h[i]){
      |                ^~
Language: C++

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll int128_t
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define eb emplace_back
#define pii pair<int, int>
#define endl '\n'
#define all(x) x.begin(),x.end()
#define f(i,j,l) for(i=j;i<l;i++)
#define smax(a,b) a=max(a,b)
// #if !defined(ONLINE_JUDGE)
// #include "debugging.h"
// #endif
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;
// erase,insert same as normal set

// int const mod = 7340033;
int const mod = 998244353;
int power(int a,int b,int m){
    int res = 1;
    while(b){
        if(b&1){
            res = res*a;
            res %= m;
        }
        a=a*a;
        a%=m;
        b=b/2;
    }
    return res;
}

int inverse(int x){
    return power(x,mod-2,mod);
}

int const N = 1e6+55;
int const inf = 2e16;
//int a[N];
int b[N];

void solve(){
    int i,j,l;  
    int a[5];
    for(i=0;i<n;i++){
        cin>>a[i];
    }
    for(i=0;i<5;i++){
        if(a[i] == 0) cout<<i+1<<endl;
    }
}               


int32_t main(){
    IOS;
    int t;
    t = 1;
    // precompute();
    // cin>>t;
    for(int tt=1;tt<=t;tt++){
        solve();
    }
    return 0;
}


/*


*/

Compiler output:
a.cc: In function 'void solve()':
a.cc:57:15: error: 'n' was not declared in this scope
   57 |     for(i=0;i<n;i++){
      |               ^
Language: Java

import java.util.*;
class Main{
  public static void main(String[] a){
    Scanner scan = new Scanner(System.in);
    int i=5;
    while(i-->0){
      if(scan.nextInt()==0){
        System.out.print(i);
      }
    }
  }
    

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

#include<iostream>
using namespace std;
void main()
{
    int n,miss=0;
    cin >> n;
    int a[n];
    bool flg=false;
    for(int m=0;m<n;m++)
    cin >> a[m];
    for(int m=0;m<=n;m++)
    {
        flg = false;
        for(int k=0;k<n;k++)
        {
            if(a[k]==m)
            flg=true;
        }
        if(flg==false)
        {
            miss=m;
            break;
        }
    }
    cout << "Missing : " << miss << endl;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: Java

import java.util.Scanner;
import java.lang.*;

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

      Scanner scan = new Scanner(System.in);
      int num = scan.nextInt();
      int numbers[] = {1,2,3,4,5}; //配列の設定
      
      for(int num2 : numbers){
      	if(num2 == numbers[i]){
        	System.out.println(i);
        }
      
      
      }
      
      
      
    }      
}

Compiler output:
Main.java:13: error: cannot find symbol
      	if(num2 == numbers[i]){
      	                   ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
        	System.out.println(i);
        	                   ^
  symbol:   variable i
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll int128_t
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define eb emplace_back
#define pii pair<int, int>
#define endl '\n'
#define all(x) x.begin(),x.end()
#define f(i,j,l) for(i=j;i<l;i++)
#define smax(a,b) a=max(a,b)
// #if !defined(ONLINE_JUDGE)
// #include "debugging.h"
// #endif
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;
// erase,insert same as normal set

// int const mod = 7340033;
int const mod = 998244353;
int power(int a,int b,int m){
    int res = 1;
    while(b){
        if(b&1){
            res = res*a;
            res %= m;
        }
        a=a*a;
        a%=m;
        b=b/2;
    }
    return res;
}

int inverse(int x){
    return power(x,mod-2,mod);
}

int const N = 1e6+55;
int const inf = 2e16;
//int a[N];
int b[N];

void solve(){
    int i,j,l;  
    int a[5];
    for(i=0;i<n;i++){
        cin>>a[i];
    }
    for(i=0;i<n;i++){
        if(a[i] == 0) cout<<i+1<<endl;
    }
}               


int32_t main(){
    IOS;
    int t;
    t = 1;
    // precompute();
    // cin>>t;
    for(int tt=1;tt<=t;tt++){
        solve();
    }
    return 0;
}


/*


*/

Compiler output:
a.cc: In function 'void solve()':
a.cc:57:15: error: 'n' was not declared in this scope
   57 |     for(i=0;i<n;i++){
      |               ^
a.cc:60:15: error: 'n' was not declared in this scope
   60 |     for(i=0;i<n;i++){
      |               ^
Language: C++

０２３４５　
１０３４５
１２０４５
１２３０５
１２３４０

Compiler output:
a.cc:1:1: error: extended character 　 is not valid in an identifier
    1 | ０２３４５　
      | ^
a.cc:1:1: error: '\U0000ff10\U0000ff12\U0000ff13\U0000ff14\U0000ff15\U00003000' does not name a type
    1 | ０２３４５　
      | ^~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int x1=0, x2=2, x3=3, x4=4, x5=5;
    cin >> x1 >> x2 >> x3 >> x4 >> x5;
  	// 解答の代入
  	int ans;
  	if (x1 == 0) {ans = 1};
  	if (x2 == 0) {ans = 2};
  	if (x3 == 0) {ans = 3};
  	if (x4 == 0) {ans = 4};
  	if (x5 == 0) {ans = 5};
    // 出力
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before '}' token
   10 |         if (x1 == 0) {ans = 1};
      |                              ^
      |                              ;
a.cc:11:30: error: expected ';' before '}' token
   11 |         if (x2 == 0) {ans = 2};
      |                              ^
      |                              ;
a.cc:12:30: error: expected ';' before '}' token
   12 |         if (x3 == 0) {ans = 3};
      |                              ^
      |                              ;
a.cc:13:30: error: expected ';' before '}' token
   13 |         if (x4 == 0) {ans = 4};
      |                              ^
      |                              ;
a.cc:14:30: error: expected ';' before '}' token
   14 |         if (x5 == 0) {ans = 5};
      |                              ^
      |                              ;
Language: C

#include<stdio.h>

int main(){
    int a[5]={1,2,3,4,5},h[5];
    h=&h;
    scanf("%d%d%d%d%d", *h);
    for(int i=0;i<5;i++){
        if(a[i]!=h[i]){
            printf("%d",a[i]);
        }
    }

    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:5:6: error: assignment to expression with array type
    5 |     h=&h;
      |      ^
Language: Java

import java.util.*;
public class Variable {
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int arr[]=new int[5];
		for(int i=0;i<5;i++)
		{
			arr[i]=sc.nextInt();
		}
		for(int i=0;i<5;i++)
		{
			if(arr[i]==0)
			{
				System.out.println(i+1);
				break;
			}
		}
	}

}


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