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

#input_f = "3 4 5\n2 1 2\n6 3 4\n1 1 1\n1 2 3"
def t_check(a,b,c):
    if a + b > c:
        if b + c > a:
            if a + c > b: return True
    return False



def f_check(a_, b_, c_):
    tmp = []
    tmp.append(a_)
    tmp.append(b_)
    tmp.append(c_)
    sqrts = []
    for i in range(3):
        sqrts.append(tmp[i]**2)
    m = max(sqrts)
    s = sum(sqrts)

    if m == (s - m): return(0)
    if m > (s - m): return(2)
    if m < (s - m): return(1)
    
    
counter=[0,0,0]
    
    
while(1):
    input_f = input()


    t = input_f.split("\n")[i].split()
    fn, sn, tn = int(t[0]),int(t[1]),int(t[2])
    if t_check(fn,sn,tn):
        counter[f_check(fn,sn,tn)] += 1
    else: break
    

print(sum(counter),counter[0], counter[1], counter[2])

        



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #input_f
    1 | #input_f = "3 4 5\n2 1 2\n6 3 4\n1 1 1\n1 2 3"
      |  ^~~~~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def t_check(a,b,c):
      | ^~~
Language: C++

#include<bits/stdc++.h>
#include <stdio.h>
#include<iostream.h>
#include<algorithm>
using namespace std;
int main()
{
	int a,b,c,right,obtuse,acute,tri;
	cin >> a,b,c;
	right,obtuse,acute,tri = 0;
	int sides[3] = {a,b,c};
	sort(sides[0],sides[2]);
	while (sides[2]<sides[0]+sides[1])
	{
		if (sides[2]*sides[2] == sides[0]*sides[0]+sides[1]*sides[1])
		{
			tri += 1;
			right += 1;
		}
		else if (sides[2]*sides[2] > sides[0]*sides[0]+sides[1]*sides[1])
		{
			tri += 1;
			obtuse += 1;
		}
		else
		{
			tri += 1;
			acute += 1;
		}
	}
	{
		printf("%d %d %d %d",tri,right,obtuse,acute);
	}	
}


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

#include <iostream>
#include<algorithm>
intp[3]
using namespace std;

int main() {
	int a=0,b=0,c=0,d=0;
	while (~scanf("%d%d%d",p,p+1,p+2))
	{
		std::sort(p,p+3);
		if(p[0]+p[1]<=p[2])
		{
			printf("%d %d %d %d¥n",a,b,c,d);
			return 0;
		}
		a ++
		if(p[0]*p[0]+p[1]*p[1]==p[2]*)p[2])b++;
		if(p[0]*p[0]+p[1]*p[1]>p[2]*)p[2])c++;
		if(p[0]*p[0]+p[1]*p[1]<p[2]*)p[2])d++;
	}
}


Compiler output:
a.cc:3:1: error: 'intp' does not name a type; did you mean 'int'?
    3 | intp[3]
      | ^~~~
      | int
a.cc: In function 'int main()':
a.cc:8:32: error: 'p' was not declared in this scope
    8 |         while (~scanf("%d%d%d",p,p+1,p+2))
      |                                ^
a.cc:16:21: error: expected ';' before 'if'
   16 |                 a ++
      |                     ^
      |                     ;
   17 |                 if(p[0]*p[0]+p[1]*p[1]==p[2]*)p[2])b++;
      |                 ~~   
a.cc:18:45: error: expected primary-expression before ')' token
   18 |                 if(p[0]*p[0]+p[1]*p[1]>p[2]*)p[2])c++;
      |                                             ^
a.cc:19:45: error: expected primary-expression before ')' token
   19 |                 if(p[0]*p[0]+p[1]*p[1]<p[2]*)p[2])d++;
      |                                             ^
Language: C++

#include <stdio.h>
#include <iostream.h>

const MAX = 10000;
int a[MAX];

BOOL IsRightAngle(int a, int b, int c){
    if(a*a == b*b + c*c) return TRUE;
    if(b*b == a*a + c*c) return TRUE;
    if(c*c == a*a + b*b) return TRUE;
    return FALSE;
}

BOOL IsOBTUSE(int a, int b, int c){
    if(a*a > b*b + c*c) return TRUE;
    if(b*b > a*a + c*c) return TRUE;
    if(c*c > b*b + a*a) return TRUE;
    return FALSE;
}

BOOL IsTriangle(int a, int b, int c){
    if(a+b > c) return TRUE;
    if(a+c > b) return TRUE;
    if(c+b > a) return TRUE;
    return FALSE;
}

void main(){
    for(int i = 0; i<MAX; i++){
        scanf( "%d" ,&a[i]):
    }
    int j = 0;]
    int tri = 0;
    int right = 0;
    int obtuse = 0;
    int acute = 0;
    for(;;){
        if( !IsTriangle(a[j],a[j+1],a[j+2]) ){
            break;
        }
        if( IsOBTUSE(a[j],a[j+1],a[j+2]) ){
            obtuse++;
            tri++;
        }
        else if(IsRightAngle(a[j],a[j+1],a[j+2]) ){
            right++;
            tri++;
        }
        else{
            acute++;
            tri++;
        }
        j += 3;
    }
    printf("%d %d %d %d\n",tri,right,acute,obtuse);
}


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

#include <iostream>
using namespace std;

int main(){
    
    int a,b,c;
    int s,c,e,d;
    s = c = e = d = 0;
    
    while(1){
        cin >> a >> b >> c;
        if(a==0) break;
        s++;
        a=a*a;
        b=b*b;
        c=c*c;
        int hantei;
        if(a>b){
            if(a>c){
                hantei=a-b-c;
            }else{
                hantei=c-a-b;
            }
        }else{
            if(b>c){
                hantei=b-a-c;
            }else{
                hantei=c-a-b;
            }
        }
        if(hantei>0){
            d++;
        }else if(hantei<0){
            e++;
        }else{
            c++;
        }
    }
    
    cout << s << " " << c << " " << e << " " << d << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: redeclaration of 'int c'
    7 |     int s,c,e,d;
      |           ^
a.cc:6:13: note: 'int c' previously declared here
    6 |     int a,b,c;
      |             ^
Language: C++

ans = [0 for i in range(4)]
while True:
  sides = sorted([int(inp) for inp in input().split()])
  if sides[2] >= sides[1] + sides[0]:
    print(ans[0], ans[1], ans[2], ans[3])
    break
  if sides[2]**2 > sides[1]**2 + sides[0]**2:
    ans[3]+=1
  elif sides[2]**2 == sides[1]**2 + sides[0]**2:
    ans[1]+=1
  else:
    ans[2]+=1
  ans[0]+=1


Compiler output:
a.cc:1:1: error: 'ans' does not name a type
    1 | ans = [0 for i in range(4)]
      | ^~~
Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main() {
	
	int Length[3];
	int Triangle[4] = {};
	bool flag = 0;
	
	while( cin >> Length[0] >> Length[1] >> Length[2]) ) {
	
	sort(Length, Length+3);
	
	if( Length[0] + Length[1] <= Length[2] ) flag = 1;
	if(flag == 1) continue;
	
	if( pow(Length[0], 2) + pow(Length[1], 2) == pow(Length[2], 2) )
	Triangle[1]++;
	
	else if( pow(Length[0], 2) + pow(Length[1], 2) < pow(Length[2], 2) )
	Triangle[2]++;
	
	else
	Triangle[3]++;
	
	}
	Triangle[0] += ( Triangle[1] + Triangle[2] + Triangle[3] );
	cout << Triangle[0] << " " << Triangle[1] << " "
		 << Triangle[2] << " " << Triangle[3] << "\n";
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:60: error: expected primary-expression before ')' token
   13 |         while( cin >> Length[0] >> Length[1] >> Length[2]) ) {
      |                                                            ^
Language: C++

#include <iostream>
using namespace  std;

bool exist(int a,int b,int c){
    bool flag=false;
    if(a>0&&b>0&&c>0&&a+b>c&&a+c>b&&c+b>a)flag=true;
    return flag;
}
int type_check(int a,int b,int c){
    if(a*a+b*b==c*c)return 0;
    else if(c*c<b*b+a*a)return 1;
    else if(c*c>a*a+b*b)return 2;
    else return 3;
}

int main(){
    //1:直角 2:鋭角 3: 鈍角 4:三角形
    int c1=0,c2=0,c3=0,c4=0;
    int t_side[3];
    while(true){
        cin >> t_side[0]>>t_side[1]>>t_side[2];
        sort(t_side, t_side + 3, greater<int>());
        if(!exist(t_side[0],t_side[1],t_side[2]))break;
        switch(type_check(t_side[0],t_side[1],t_side[2])){
            case 0: c1++; break;
            case 1: c2++; break;
            case 2: c3++; break;
        }
        c4++;
    }
    cout <<c4<<" "<<c1<<" "<<c2<<" "<<c3<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |         sort(t_side, t_side + 3, greater<int>());
      |         ^~~~
      |         short
Language: C++

#include <iostream>
using namespace  std;

bool exist(int a,int b,int c){
    bool flag=false;
    if(a>0&&b>0&&c>0&&a+b>c&&a+c>b&&c+b>a)flag=true;
    return flag;
}
int type_check(int a,int b,int c){
    if(a*a+b*b==c*c)return 0;
    else if(c*c<b*b+a*a)return 1;
    else if(c*c>a*a+b*b)return 2;
    else return 3;
}

int main(){
    int c1=0,c2=0,c3=0,c4=0;
    int t_side[3];
    while(true){
        cin >> t_side[0]>>t_side[1]>>t_side[2];
        sort(t_side, t_side + 3, greater<int>());
        if(!exist(t_side[0],t_side[1],t_side[2]))break;
        switch(type_check(t_side[0],t_side[1],t_side[2])){
            case 0: c1++; break;
            case 1: c2++; break;
            case 2: c3++; break;
        }
        c4++;
    }
    cout <<c4<<" "<<c1<<" "<<c2<<" "<<c3<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |         sort(t_side, t_side + 3, greater<int>());
      |         ^~~~
      |         short
Language: C++

#include <iostream>
using namespace  std;

bool exist(int a,int b,int c){
    bool flag=false;
    if(a>0&&b>0&&c>0&&a+b>c&&a+c>b&&c+b>a)flag=true;
    return flag;
}
int type_check(int a,int b,int c){
    if(a*a==c*c+b*b)return 0;
    else if(a*a<b*b+c*c)return 1;
    else if(a*a>c*c+b*b)return 2;
    else return 3;
}

int main(){
    int c1=0,c2=0,c3=0,c4=0;
    int t_side[3];
    while(true){
        cin >> t_side[0]>>t_side[1]>>t_side[2];
        sort(t_side, t_side + 3, greater<int>());
        if(!exist(t_side[0],t_side[1],t_side[2]))break;
        switch(type_check(t_side[0],t_side[1],t_side[2])){
            case 0: c1++; break;
            case 1: c2++; break;
            case 2: c3++; break;
        }
        c4++;
    }
    cout <<c4<<" "<<c1<<" "<<c2<<" "<<c3<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |         sort(t_side, t_side + 3, greater<int>());
      |         ^~~~
      |         short
Language: C++

#include <stdio.h>
#include <algorithm>

int main(){
    int inp[3], tyoku = 0, don = 0, ei = 0;
    for (int i = 0; i < 5; i++){
        scanf("%d %d %d",&inp[0], &inp[1], &inp[2]);
        sort(inp, inp + 3);
        
        if(inp[0] + inp[1] > inp[2]){
            int p = inp[0]*inp[0] + inp[1]*inp[1];
            int q = inp[2]*inp[2];
            if(p == q) tyoku++;
            else if(p < q) don++;
            else ei++;
        }
    }
    
    printf("%d %d %d %d¥n", tyoku +don +ei, tyoku,ei,don);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    8 |         sort(inp, inp + 3);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: C++

package main
// 三角形の形は辺の長さで決まる． 順番に３つの正整数が与えられたとき， 辺の長さがそれらの値と一致する三角形が存在するかどうかを調べ,
//  存在するなら鋭角三角形，直角三角形，鈍角三角形のいずれかを判定し， 次の入力へ進む． 三角形が存在しないとき， それまでに入力された，
// 三角形，直角三角形，鋭角三角形，鈍角三角形の 個数を空白で区切って出力し， それ以降の入力は無視して終了する
// 入力の中には必ず三角形が存在しないようなものがある と仮定してよい. 入力の行数は判らないが各行には３つの正整数が空白で区切って書かれている．
//  ただし，各整数は100 以下とする.

// return
// 三角形 直角三角形　鈍角三角形 鈍角三角形
import (
	"os"
	"fmt"
	"bufio"
)


var sc = bufio.NewScanner(os.Stdin)

func max(a, b, c int) (int, int, int) {
	if a > b {
		if b > c {
			return a, b, c
		} else {
			return a, c, b
		}
	} else {
		if a > c {
			return b, a, c
		} else {
			return b, c, a
		}
	}
}

func find_trianges(a, b, c int) string {
	a, b, c = max(a, b, c)
	r := b*b + c*c
	if a*a > r {
		return "obtuse_triangle"
	} else if a*a < r {
		return "sharped_triangle"
	} else {
		return "right_triangle"
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)
	var t, r_t, s_t, o_t int = 0, 0, 0, 0
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)
			a, b, c = max(a, b, c)
			if (a < b + c) {
				r := find_trianges(a, b, c)
				switch r {
				case "right_triangle":
					r_t++
				case "sharped_triangle":
					s_t++
				case "obtuse_triangle":
					o_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}



Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:35:1: error: 'func' does not name a type
   35 | func find_trianges(a, b, c int) string {
      | ^~~~
a.cc:47:1: error: 'func' does not name a type
   47 | func main() {
      | ^~~~
Language: C

#include<stdio.h>
int main()
{
  int i,a[3],max,n,;
  scanf("%d",&n);
  for(i=0;i<n;i++)scanf("%d",&a[i]);
  max=a[0];
  if(max<a[1])max==a[1];
  if(max<a[2]&&n==3)max=a[2];
    for(i=0;i<max;i++){
      if(n==2){
	if(a[0]%i==0&&a[1]%i==0)printf("%d",i);
      }
      else if(n==3){
	if(a[0]%i==0&&a[1]%i==0&&a[2]%i==0)printf("%d",i);
      }
    }
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:4:20: error: expected identifier or '(' before ';' token
    4 |   int i,a[3],max,n,;
      |                    ^
Language: C++

#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

template <class Type> Type GCD(Type a, Type b)
{
	if (a % b == 0) { return b; }
	if (b % a == 0) { return a; }

	if (a > b) { return gcd(b, a % b); }
	if (a < b) { return gcd(a, b % a); }

	return (Type)(-1);
}

template <class Type> Type GCD(vector<Type> v)
{
	Type ret = v[0];

	for (int i = 1; i < v.size(); i++)
	{
		ret = GCD(ret, v[i]);
	}

	return ret;
}

template <class Type> vector<Type> Divisors(Type n)
{
	vector<int> c;

	for (Type i = 1; i * i <= n; i++)
	{
		if (n % c == 0) { c.push_back(i); if (i * i != n) { c.push_back(n / i); } }
	}

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

	return c;
}

int main()
{
	int n;

	cin >> n;

	vector<int> v(n);

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

	vector<int> c = Divisors(GCD(v));

	for (int i = 0; i < c.size(); i++)
	{
		cout << c[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In instantiation of 'std::vector<Type> Divisors(Type) [with Type = int]':
a.cc:57:26:   required from here
   57 |         vector<int> c = Divisors(GCD(v));
      |                         ~~~~~~~~^~~~~~~~
a.cc:36:23: error: no match for 'operator%' (operand types are 'int' and 'std::vector<int>')
   36 |                 if (n % c == 0) { c.push_back(i); if (i * i != n) { c.push_back(n / i); } }
      |                     ~~^~~
a.cc: In instantiation of 'Type GCD(Type, Type) [with Type = int]':
a.cc:24:12:   required from 'Type GCD(std::vector<Type>) [with Type = int]'
   24 |                 ret = GCD(ret, v[i]);
      |                       ~~~^~~~~~~~~~~
a.cc:57:30:   required from here
   57 |         vector<int> c = Divisors(GCD(v));
      |                                  ~~~^~~
a.cc:12:32: error: 'gcd' was not declared in this scope
   12 |         if (a > b) { return gcd(b, a % b); }
      |                             ~~~^~~~~~~~~~
a.cc:13:32: error: 'gcd' was not declared in this scope
   13 |         if (a < b) { return gcd(a, b % a); }
      |                             ~~~^~~~~~~~~~
Language: C++

#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

template <class Type> Type GCD(Type a, Type b)
{
	if (a % b == 0) { return b; }
	if (b % a == 0) { return a; }

	if (a > b) { return GCD(b, a % b); }
	if (a < b) { return GCD(a, b % a); }

	return (Type)(-1);
}

template <class Type> Type GCD(vector<Type> v)
{
	Type ret = v[0];

	for (int i = 1; i < v.size(); i++)
	{
		ret = GCD(ret, v[i]);
	}

	return ret;
}

template <class Type> vector<Type> Divisors(Type n)
{
	vector<int> c;

	for (Type i = 1; i * i <= n; i++)
	{
		if (n % c == 0) { c.push_back(i); if (i * i != n) { c.push_back(n / i); } }
	}

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

	return c;
}

int main()
{
	int n;

	cin >> n;

	vector<int> v(n);

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

	vector<int> c = Divisors(GCD(v));

	for (int i = 0; i < c.size(); i++)
	{
		cout << c[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In instantiation of 'std::vector<Type> Divisors(Type) [with Type = int]':
a.cc:57:26:   required from here
   57 |         vector<int> c = Divisors(GCD(v));
      |                         ~~~~~~~~^~~~~~~~
a.cc:36:23: error: no match for 'operator%' (operand types are 'int' and 'std::vector<int>')
   36 |                 if (n % c == 0) { c.push_back(i); if (i * i != n) { c.push_back(n / i); } }
      |                     ~~^~~
Language: C++

#include<iostream>
using namespace std;
int n, a[10000], p;

void yakusuu(int p) {
	int cnt = 0;
	for (int i = 1; i <= p; i++) {
		if (p%i == 0) {
			if (cnt) { cout << ' '; } cout << i;
		}
	}
	cout << endl;
}

int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	for (int i = 1; i < n; i++) {
		p = __gcd(a[i - 1], a[i]);
	}
	yakusuu();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: '__gcd' was not declared in this scope
   21 |                 p = __gcd(a[i - 1], a[i]);
      |                     ^~~~~
a.cc:23:16: error: too few arguments to function 'void yakusuu(int)'
   23 |         yakusuu();
      |         ~~~~~~~^~
a.cc:5:6: note: declared here
    5 | void yakusuu(int p) {
      |      ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int n, a[10000], p;

void yakusuu(int p) {
	int cnt = 0;
	for (int i = 1; i <= p; i++) {
		if (p%i == 0) {
			if (cnt) { cout << ' '; } cout << i;
		}
	}
	cout << endl;
}

int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	p = a[0];
	for (int i = 1; i < n; i++) {
		p = __gcd(p, a[i]);
	}
	yakusuu(p);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:21: error: '__gcd' was not declared in this scope
   22 |                 p = __gcd(p, a[i]);
      |                     ^~~~~
Language: C++

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

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define sz(obj) ((int)(obj).size())
#define pf push_front
#define pb push_back

int main()
{
  int n;
  cin >> n;
  int a[3] = {0};
  REP(i, n) cin >> a[i];
  if (n == 2){
    FOR(i, 1, min(a[0], a[1]) + 1){
      if (a[0] % i == 0 && a[1] % i == 0) cout << i << endl;
    }
  }
  else {
    FOR(i, 1, min(min(a[0], a[1]), a[2]) + 1){
      if (a[0] % i == 0 && a[1] % i == 0 && a[2] % i == 0) cout << i << endl;
    }
  }
}#include <bits/stdc++.h>
using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define sz(obj) ((int)(obj).size())
#define pf push_front
#define pb push_back

int main()
{
  int n;
  cin >> n;
  int a[3] = {0};
  REP(i, n) cin >> a[i];
  if (n == 2){
    FOR(i, 1, min(a[0], a[1]) + 1){
      if (a[0] % i == 0 && a[1] % i == 0) cout << i << endl;
    }
  }
  else {
    FOR(i, 1, min(min(a[0], a[1]), a[2]) + 1){
      if (a[0] % i == 0 && a[1] % i == 0 && a[2] % i == 0) cout << i << endl;
    }
  }
}

Compiler output:
a.cc:27:2: error: stray '#' in program
   27 | }#include <bits/stdc++.h>
      |  ^
a.cc:27:3: error: 'include' does not name a type
   27 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:37:5: error: redefinition of 'int main()'
   37 | int main()
      |     ^~~~
a.cc:11:5: note: 'int main()' previously defined here
   11 | int main()
      |     ^~~~
Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

vector<long long int> divisor(long long int n) {
	vector<long long int> res;
	for (long long int i = 1; i * i <= n; ++i) {
		if (n % i == 0) {
			res.push_back(i);
			if (i * i != n) res.push_back(n / i);
		}
	}
	sort(begin(res), end(res));
	return res;
}
long long int gcd(long long int l, long long int r) {
	if (l > r)return gcd(r, l);
	else {
		if (r%l) {
			return gcd(l, r%l);

		}
		else {
			return l;
		}
	}
}
int main() {
	int N; cin >> N;
	vector<long long int>ns(N);
	for (int i = 0; i < N; ++i) {
		cin >> ns[i];
	}
	long long int a =  gcd(ns[0], ns[1];
	if (N == 3) {
		a =  gcd(a, ns[2]);
	}
	auto v(divisor(a));
	for (auto n : v) {
		cout << n << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:44: error: expected ')' before ';' token
   40 |         long long int a =  gcd(ns[0], ns[1];
      |                               ~            ^
      |                                            )
Language: C++

#include<iostream>
using namespace std;

int gcd(int a,int b){
  if(a==0) return b;

  return gcd(b,a%b);
}

int main(){

    int n,a,b,c;

    cin >> n;

    if(n == 2){
      cin >> a >> b;
      cout << gcb(a,b) << endl;
    }
    else{
      cin >> a >> b >> c;
      cout << gcb(a,gcb(b,c)) << endl;
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'gcb' was not declared in this scope; did you mean 'gcd'?
   18 |       cout << gcb(a,b) << endl;
      |               ^~~
      |               gcd
a.cc:22:21: error: 'gcb' was not declared in this scope; did you mean 'gcd'?
   22 |       cout << gcb(a,gcb(b,c)) << endl;
      |                     ^~~
      |                     gcd
a.cc:22:15: error: 'gcb' was not declared in this scope; did you mean 'gcd'?
   22 |       cout << gcb(a,gcb(b,c)) << endl;
      |               ^~~
      |               gcd
Language: C++

#include <iostream>

using namespace std;

void sort(int *val, int n) {
	for (int i = n - 1; i > 0; i--) {
		for (int j = 0; j < i; j++) {
			if (val[i] < val[j]) swap(val[i], val[j]);
		}
	}
}

bool judge(int *val, int n, int num) {
	for (int i = 0; i < n; i++) {
		if (val[i] % num != 0) return false;
	}
	return true;
}

int main() {
	int n, i, k, harf, count;
	int val[3], div[10000];

	cin >> n;

	for (i = 0; i < n; i++) cin >> val[i];
	sort(val, n);

	harf = (int)sqrt(val[0]);

	div[0] = count = 1;
	for (i = 2; i < harf; i++) {
		if (val[0] % i == 0) div[count++] = i;
	}

	cout << 1 << endl;
	for (i = 1; i < count; i++) {
		if (judge(&val[1], n - 1, div[i])) cout << div[i] << endl;
	}
	for (i = count - 1; i >= 0; i--) {
		k = (int)(val[0] / div[i]);
		if (judge(&val[1], n - 1, k)) cout << k << endl;
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:21: error: 'sqrt' was not declared in this scope; did you mean 'sort'?
   29 |         harf = (int)sqrt(val[0]);
      |                     ^~~~
      |                     sort
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin>>n;
  map<int, int> MAP;
  FOR(i,0,n){
      int a;cin>>a;
      for(int j = 1; j * j <= a; j++){
          if(a % j == 0) {
              MAP[j]++;
              if(j != a / j) MAP[a/j]++;
          }
      }
  }
  for(int m : MAP){
      if(m.second > 1) {
          cout << m.first << endl;
      }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:15: error: cannot convert 'std::pair<const int, int>' to 'int' in initialization
   40 |   for(int m : MAP){
      |               ^~~
a.cc:41:12: error: request for member 'second' in 'm', which is of non-class type 'int'
   41 |       if(m.second > 1) {
      |            ^~~~~~
a.cc:42:21: error: request for member 'first' in 'm', which is of non-class type 'int'
   42 |           cout << m.first << endl;
      |                     ^~~~~
Language: C++

#include<iostream>
#include<algorithm>

int main(void)
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }


	for(int i=1; i<=min; i++){
	if(a[0]%i==0 && a[1]%i==0 && a[2]%i==0)
	cout<<i<<endl
	}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:22:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |         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:22:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |         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<iostream>
#include<algorithm>

int main()
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }


	for(int i=1; i<=min; i++){
	if(a[0]%i==0 && a[1]%i==0 && a[2]%i==0)
	cout<<i<<endl
	}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:22:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |         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:22:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |         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<iostream>
#include<algorithm>

int main()
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }

	if(n==2){
	a[2]=a[1];
	}

	for(int i=1; i<=min; i++){
	if(a[1]%i==0 && a[2]%i==0 && a[3]%i==0){
	cout << i <<endl;
	}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:25:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |         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:25:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |         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)
      |     ^~~~
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
#include<algorithm>

int main()
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }

	if(n==2){
	a[2]=a[1];
	}

	for(int i=1; i<=min; i++){
	if((a[1]%i)==0 && (a[2]%i)==0 && (a[3]%i)==0){
	cout << i <<endl;
	}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:25:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |         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:25:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |         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)
      |     ^~~~
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
#include<algorithm>

int main()
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }

	if(n==2){
	a[2]=a[1];
	}

	for(int i=1; i<=min; i++){
	if((a[0]%i)==0 && (a[1]%i)==0 && (a[2]%i)==0){
	cout << i <<endl;
	}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:25:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |         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:25:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |         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)
      |     ^~~~
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }

	if(n==2){
	a[2]=a[1];
	}

	for(int i=1; i<=min; i++){
	if((a[0]%i)==0 && (a[1]%i)==0 && (a[2]%i)==0){
	cout << i <<endl;
	}

return 0;
}



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

#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
	int n, a[3], min ;

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

	min=a[0];
	for(int i=0; i<=n; i++){
	if(min >= a[i])
	min = a[i];
        }

  }
  for(int i=1;i<=min;i++){
    bool dotti=true;
    for(int j=0;j<n;j++){
      if(a[j] % i != 0) dotti = false;
    }
    if(dotti == true) cout << i << endl;
  }


return 0;
}



Compiler output:
a.cc:21:3: error: expected unqualified-id before 'for'
   21 |   for(int i=1;i<=min;i++){
      |   ^~~
a.cc:21:15: error: 'i' does not name a type
   21 |   for(int i=1;i<=min;i++){
      |               ^
a.cc:21:22: error: 'i' does not name a type
   21 |   for(int i=1;i<=min;i++){
      |                      ^
a.cc:30:1: error: expected unqualified-id before 'return'
   30 | return 0;
      | ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
	int n, a[3], max=0 ;

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


  }
  for(int i=1;i<=max;i++){
    bool dotti=true;
    for(int j=0;j<n;j++){
      if(a[j] % i != 0) dotti = false;
    }
    if(dotti == true) cout << i << endl;
  }


return 0;
}



Compiler output:
a.cc:18:3: error: expected unqualified-id before 'for'
   18 |   for(int i=1;i<=max;i++){
      |   ^~~
a.cc:18:15: error: 'i' does not name a type
   18 |   for(int i=1;i<=max;i++){
      |               ^
a.cc:18:22: error: 'i' does not name a type
   18 |   for(int i=1;i<=max;i++){
      |                      ^
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <cstring>
 
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define MP make_pair
#define X first
#define Y second
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()

using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> P;

const int INF = 1<<29;

int gcd(int m, int n){
	return (n==0?m:gcd(n, m%n));
}

int main(){
	int n, a, b;
	cin >> n >> a;
	rep(i, n-1){
		cin >> b;
		a = gcd(a, b);
	}

	vector<int> ans;
	FOR(i, 1, sqrt(1.*a)+1){
		if(a%i == 0){
			ans.push_back(i);
			ans.push_back(a/i);
		}
	}
	sort(all(ans));
	ans.erase(unique(all(ans)), ans.end());
	rep(i, ans.size()){
		cout << ans[i] << endl;
	}

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:19: error: 'sqrt' was not declared in this scope
   40 |         FOR(i, 1, sqrt(1.*a)+1){
      |                   ^~~~
a.cc:11:44: note: in definition of macro 'FOR'
   11 | #define FOR(i, a, b) for(int i = (a); i < (b); i++)
      |                                            ^
Language: C++

#include<iostream>

using namespace std;

unsigned long long int i, num[3];
int n;

int main(){

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

	fin = max(num[0], num[1], num[2]);

	if(n==2){
		for(i=0;i<fin;i++){
			if(!(num[0]%i) && !(num[1]%i)){
				cout << i << endl;
			}
		}
	}
	if(n==3){
		for(i=0;i<fin;i++){
			if(!(num[0]%i) && !(num[1]%i) && !(num[2]%i)){
				cout << i << endl;
			}
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'fin' was not declared in this scope
   15 |         fin = max(num[0], num[1], num[2]);
      |         ^~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long unsigned int; _Compare = long long unsigned int]':
a.cc:15:11:   required from here
   15 |         fin = max(num[0], num[1], num[2]);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<algorithm>
using namespace std;

int main()
{
  int n;
  for(;cin>>n;)
    {
      int data[n];
      int dmax=0;
      for(int i=0;i<n;i++)
	{
	  cin>>data[i];
	  dmax=max(dmax,data[i]);
	}
      for(int i=1;i<=dmax/2;i++)
	{
	  bool flag=true;
	  for(int j=0;j<n;j++)
	    {
	      if(data[j]%i!=0)
		{
		  flag=false;
		  break;
		}
	    }
	  if(flag)
	    cout<<i<<endl;
	}
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'cin' was not declared in this scope
    7 |   for(;cin>>n;)
      |        ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:28:13: error: 'cout' was not declared in this scope
   28 |             cout<<i<<endl;
      |             ^~~~
a.cc:28:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:22: error: 'endl' was not declared in this scope
   28 |             cout<<i<<endl;
      |                      ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: Java


import java.lang.reflect.Array;
import java.util.*;


public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[n+1];
		for(int i=1;i<=n;i++){
			a[i] = sc.nextInt();
		}
		LinkedList<Integer> ts = new LinkedList<Integer>();
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(i==j)continue;
				String str = String.valueOf(a[i])+String.valueOf(a[j]);
				ts.add(Integer.parseInt(str));
			}
		}
		ts.sort();
		ts.pollFirst();
		ts.pollFirst();
		System.out.println(ts.pollFirst());
		
	}
}


Compiler output:
Main.java:22: error: method sort in interface List<E> cannot be applied to given types;
		ts.sort();
		  ^
  required: Comparator<? super Integer>
  found:    no arguments
  reason: actual and formal argument lists differ in length
  where E is a type-variable:
    E extends Object declared in interface List
1 error
Language: Java

import java.util.Scanner

public class Main{
  public static void main(Strin[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.next();
    int min=Math.min(4, n);
    int[] list = new int[min];
    for (int i = 0; i < min; i++) {
      list[I] = sc.nextInt();
    }
  }
}


Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
1 error
Language: Java

import java.util.Scanner;
import 

public class Main{
  public static void main(Strin[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.next();
    int n2 =Math.min(4, n);
    int[] list = new int[n2];
    for (int i = 0; i < n2; i++) {
      list[i] = sc.nextInt();
    }
    int n3 = n2 * (n2-1);
    int[] list2 = new int[n3];
    for(i1 = 0; i1 < n2; i1++){
      for(i2 = 0; i2 < n2; i2++){
        String x1 = String.valueOf(list[i1]);
        String x2 = String.valueOf(list[i2]);
        list3[i] = Integer.parseInt(x1 + x2);
      }
    }
  }
}


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

import java.util.Scanner;

public class Main{
  public static void main(Strin[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.next();
    int n2 =Math.min(4, n);
    int[] list = new int[n2];
    for (int i = 0; i < n2; i++) {
      list[i] = sc.nextInt();
    }
    int n3 = n2 * (n2-1);
    int[] list2 = new int[n3];
    for(i1 = 0; i1 < n2; i1++){
      for(i2 = 0; i2 < n2; i2++){
        String x1 = String.valueOf(list[i1]);
        String x2 = String.valueOf(list[i2]);
        list3[i] = Integer.parseInt(x1 + x2);
      }
    }
  }
}


Compiler output:
Main.java:4: error: cannot find symbol
  public static void main(Strin[] args){
                          ^
  symbol:   class Strin
  location: class Main
Main.java:6: error: incompatible types: String cannot be converted to int
    int n = sc.next();
                   ^
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
        ^
  symbol:   variable i1
  location: class Main
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
                ^
  symbol:   variable i1
  location: class Main
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
                         ^
  symbol:   variable i1
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
          ^
  symbol:   variable i2
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
                  ^
  symbol:   variable i2
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
                           ^
  symbol:   variable i2
  location: class Main
Main.java:16: error: cannot find symbol
        String x1 = String.valueOf(list[i1]);
                                        ^
  symbol:   variable i1
  location: class Main
Main.java:17: error: cannot find symbol
        String x2 = String.valueOf(list[i2]);
                                        ^
  symbol:   variable i2
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
        ^
  symbol:   variable list3
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
              ^
  symbol:   variable i
  location: class Main
12 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.next();
    int n2 =Math.min(4, n);
    int[] list = new int[n2];
    for (int i = 0; i < n2; i++) {
      list[i] = sc.nextInt();
    }
    int n3 = n2 * (n2-1);
    int[] list2 = new int[n3];
    for(i1 = 0; i1 < n2; i1++){
      for(i2 = 0; i2 < n2; i2++){
        String x1 = String.valueOf(list[i1]);
        String x2 = String.valueOf(list[i2]);
        list3[i] = Integer.parseInt(x1 + x2);
      }
    }
  }
}


Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
    int n = sc.next();
                   ^
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
        ^
  symbol:   variable i1
  location: class Main
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
                ^
  symbol:   variable i1
  location: class Main
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
                         ^
  symbol:   variable i1
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
          ^
  symbol:   variable i2
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
                  ^
  symbol:   variable i2
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
                           ^
  symbol:   variable i2
  location: class Main
Main.java:16: error: cannot find symbol
        String x1 = String.valueOf(list[i1]);
                                        ^
  symbol:   variable i1
  location: class Main
Main.java:17: error: cannot find symbol
        String x2 = String.valueOf(list[i2]);
                                        ^
  symbol:   variable i2
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
        ^
  symbol:   variable list3
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
              ^
  symbol:   variable i
  location: class Main
11 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int n2 =Math.min(4, n);
    int[] list = new int[n2];
    for (int i = 0; i < n2; i++) {
      list[i] = sc.nextInt();
    }
    int n3 = n2 * (n2-1);
    int[] list2 = new int[n3];
    for(i1 = 0; i1 < n2; i1++){
      for(i2 = 0; i2 < n2; i2++){
        String x1 = String.valueOf(list[i1]);
        String x2 = String.valueOf(list[i2]);
        list3[i] = Integer.parseInt(x1 + x2);
      }
    }
  }
}


Compiler output:
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
        ^
  symbol:   variable i1
  location: class Main
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
                ^
  symbol:   variable i1
  location: class Main
Main.java:14: error: cannot find symbol
    for(i1 = 0; i1 < n2; i1++){
                         ^
  symbol:   variable i1
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
          ^
  symbol:   variable i2
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
                  ^
  symbol:   variable i2
  location: class Main
Main.java:15: error: cannot find symbol
      for(i2 = 0; i2 < n2; i2++){
                           ^
  symbol:   variable i2
  location: class Main
Main.java:16: error: cannot find symbol
        String x1 = String.valueOf(list[i1]);
                                        ^
  symbol:   variable i1
  location: class Main
Main.java:17: error: cannot find symbol
        String x2 = String.valueOf(list[i2]);
                                        ^
  symbol:   variable i2
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
        ^
  symbol:   variable list3
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
              ^
  symbol:   variable i
  location: class Main
10 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int n2 =Math.min(4, n);
    int[] list = new int[n2];
    for (int i = 0; i < n2; i++) {
      list[i] = sc.nextInt();
    }
    int n3 = n2 * (n2-1);
    int[] list2 = new int[n3];
    for(int i1 = 0; i1 < n2; i1++){
      for(int i2 = 0; i2 < n2; i2++){
        String x1 = String.valueOf(list[i1]);
        String x2 = String.valueOf(list[i2]);
        list3[i] = Integer.parseInt(x1 + x2);
      }
    }
  }
}


Compiler output:
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
        ^
  symbol:   variable list3
  location: class Main
Main.java:18: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
              ^
  symbol:   variable i
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int n2 =Math.min(4, n);
    int[] list = new int[n2];
    for (int i = 0; i < n2; i++) {
      list[i] = sc.nextInt();
    }
    int n3 = n2 * (n2-1);
    int[] list2 = new int[n3];
    int i = 0;
    for(int i1 = 0; i1 < n2; i1++){
      for(int i2 = 0; i2 < n2; i2++){
        String x1 = String.valueOf(list[i1]);
        String x2 = String.valueOf(list[i2]);
        list3[i] = Integer.parseInt(x1 + x2);
        i ++;
      }
    }
  }
}


Compiler output:
Main.java:19: error: cannot find symbol
        list3[i] = Integer.parseInt(x1 + x2);
        ^
  symbol:   variable list3
  location: class Main
1 error