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

import java.util.*;
public class Main {
	public static void main(String[] args)
	{
		// Input Example:
		//
		// N M
		// K1 A11 A12 ... A1k1
		// K2 A21 A22 ... A2k2
		// .
		// .
		// .
		// KN AN1 AN2 ... ANkN

		Scanner sc = new Scanner(System.in);
		// N people
		int N = sc.nextInt();
		
		// get two integers separated with half-width break
		// M kinds of foods
		int M = sc.nextInt(); 

		// Ki: the number of foods that No.i+1 person like
		int K;

		// map[M]: the table of the likeness of each foods 
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();

		for (int i=0; i<N; i++)
		{
			K = sc.nextInt();
			for (int j=0; j<K; j++)
			{
				int K_temp = sc.nextInt();
				if (map.containsKey(K_temp))
				{
					int val = map.get(K_temp); // food no. K_temp +1
					val++;
					map.put(K_temp, val);
				}
				else
				{
					map.put(K_temp, val);
				}
			}
		}
		sc.close();

		int ans = 0;
		for (int i=1;i<map.values();i++)
		{
			if (map.get(i) == N) //it means everyone (N people) likes it
			{
				ans++;
			}
		}
		System.out.println(ans);
		
	}

}

Compiler output:
Main.java:43: error: cannot find symbol
					map.put(K_temp, val);
					                ^
  symbol:   variable val
  location: class Main
Main.java:50: error: bad operand types for binary operator '<'
		for (int i=1;i<map.values();i++)
		              ^
  first type:  int
  second type: Collection<Integer>
2 errors
Language: Java

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int number1 = scanner.nextInt();
			int number2 = scanner.nextInt();
			if (0 == number2 % number1) {
				System.out.println(number1 + number2);
			} else {
				System.out.println(number2 - number1);
			}
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		try (Scanner scanner = new Scanner(System.in)) {
		     ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		try (Scanner scanner = new Scanner(System.in)) {
		                           ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

ublic class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int number1 = scanner.nextInt();
			int number2 = scanner.nextInt();
			if (0 == number2 % number1) {
				System.out.println(number1 + number2);
			} else {
				System.out.println(number2 - number1);
			}
		}
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
ublic class Main {
^
1 error
Language: C++

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

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

	int b;
	cin >>

	if(b % a == 0)
		cout << a + b;
	else
		cout << b - a;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected primary-expression before 'if'
   12 |         if(b % a == 0)
      |         ^~
a.cc:14:9: error: 'else' without a previous 'if'
   14 |         else
      |         ^~~~
Language: C

i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |   ^
main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int]
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |     ^~~~
main.c: In function 'main':
main.c:1:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
main.c:1:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |            ^~~~~
main.c:1:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:32: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |                                ^~~~~~
main.c:1:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:32: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:46: error: 'b' undeclared (first use in this function)
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |                                              ^
main.c:1:46: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:51: error: 'a' undeclared (first use in this function)
    1 | i,j;main(){scanf("%d%d",&i,&j);printf("%d\n",b+(b%a?-a:a));}
      |                                                   ^
Language: C++

#include <iostream>

int main(){
  int a, b;
  cin >> a >> b;
  
  cout << (b%a==0) ? a+b : a-b;
  return 0;
}

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

import java.util.*;

public class Main{
	public static void main(String args[]){
    	Scanner sc = new Scanner();
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        if(b%a == 0){
        	System.out.println(a+b);
        }else{
        	System.out.println(b-a);
        }
    }
}

Compiler output:
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
    	Scanner sc = new Scanner();
    	             ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.*

public class Main{
	public static void main(String []){
    	Scanner sc = new Scanner();
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        if(b%a == 0){
        	System.out.println(a+b);
        }else{
        	System.out.println(b-a);
        }
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:4: error: <identifier> expected
	public static void main(String []){
	                                 ^
2 errors
Language: C++

import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int a,b;
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(b%a==0) 
			System.out.println(a+b);
		else
			System.out.println(b-a);
	}
}


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

package AtCorder過去問;

import java.util.Scanner;
public class main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		
		if(B % A == 0) 
			System.out.println(A + B);
		else
			System.out.println(B - A);
		

	}


}


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

import java.util.Scanner;
public class ABC118A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		
		if(B % A == 0) 
			System.out.println(A - B);
		else
			System.out.println(B - A);
		

	}


}


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

public class ABC118A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		
		if(B % A == 0) 
			System.out.println(A - B);
		else
			System.out.println(B - A);
		

	}


}

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

/**
 - author : clones
**/

#include<bits/stdc++.h>

using namespace std;

int a, b;

int main() {
  cin >> a >> b;
  if (b % a == 0) cout << a+b << '\n';
  else cout << b-a << '\n';4 12
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected ';' before numeric constant
   14 |   else cout << b-a << '\n';4 12
      |                             ^~~
      |                             ;
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#define mkp(a, b) make_pair(a, b)
#define pb(t) push_back(t)
#define ft first
#define sc second
#define pt(num) cout << num << "\n"
#define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD
#define max(a, b) ((a)>(b) ? (a):(b))
#define min(a, b) ((a)<(b) ? (a):(b))
#define chmax(a, b) (a<b ? a=b : 0)
#define chmin(a, b) (a>b ? a=b : 0)
#define INF 1000000000000000000
#define MOD 1000000007LL
#define MAX 101010
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef map<ll, ll> Map;

ll gcd(ll a, ll b) {
    if(b==0) return a;
    else return gcd(b, a%b);
}

int main(void) {
    ll N;
    cin >> N;
    ll i;
    ll a[MAX];
    for(i=0; i<N; i++)　cin >> a[i];
  	sort(a, a+N);  
  
    ll ans=a[0];
    for(i=1; i<N; i++) {
        ans=gcd(ans, a[i]);
    }
    pt(ans);
}





Compiler output:
a.cc:42:23: error: extended character 　 is not valid in an identifier
   42 |     for(i=0; i<N; i++)　cin >> a[i];
      |                       ^
a.cc: In function 'int main()':
a.cc:42:23: error: '\U00003000cin' was not declared in this scope
   42 |     for(i=0; i<N; i++)　cin >> a[i];
      |                       ^~~~~
Language: C++

#include <iostream>
#include <iomanip>
// std::cout << std::setprecision(2) << 3.141; // "3.1"
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;

static const int giga = pow(10,9);
// double pi = 3.141592653589793238463;

int main(void){
  int a,b;
  cin >> a >> b;

  if(b%a == 0){
    cout << a + b << endl;
  } eles {
    cout << a - b << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: 'eles' was not declared in this scope
   29 |   } eles {
      |     ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:10: error: lvalue required as left operand of assignment
    5 |   if (b%a=0){
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int a,b;
  int c=0;
    cin >> a >> b;
  if(b%a=0){
    c=a+b;
  }
  else{
    c=b-a;
  }
    // 出力
    cout << c << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: lvalue required as left operand of assignment
    9 |   if(b%a=0){
      |      ~^~
Language: C++

#include<iostream>
using namespace std;
int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:51: error: expected ';' before '}' token
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}
      |                                                   ^
      |                                                   ;
a.cc: At global scope:
a.cc:3:52: error: expected unqualified-id before '<<' token
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}
      |                                                    ^~
a.cc:3:59: error: expected declaration before '}' token
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}
      |                                                           ^
Language: C++

#include<iostream>
using namespacce std;
int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespacce'
    2 | using namespacce std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:3:20: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}
      |                    ^~~
      |                    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:3:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<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: At global scope:
a.cc:3:52: error: expected unqualified-id before '<<' token
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}
      |                                                    ^~
a.cc:3:59: error: expected declaration before '}' token
    3 | int main(){int a,b;cin>>a>>b;cout<<b+(b%a==0?a:-a)}<<endl;}
      |                                                           ^
Language: C++

#include <iostream>

int main(){
	int A,B;
  cin >> A >> B;
  if(B%A ==0) cout << A + B;
  else cout << B - A;
}

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

import java.util.*;

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

int A=sc.nextInt();
int B=sc.nextInt();
  if((B%A)==0){
System.out.println(A+B);
  }else{
  System.out.println(B-A);
  }
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  scanf("%d %d",&a,&b);
  if(a%b==0||b%a==o)
    printf("%d",a+b);
  else
    printf("%d",b-a);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'o' was not declared in this scope
    7 |   if(a%b==0||b%a==o)
      |                   ^
Language: Java

public class A_B{
	public static void main(String args[]){
     Scanner s=new Scanner(System.in);
      int a=s.nextInt();
      int b=s.nextInt();
      if(a%b==0){
      System.out.println(a+b);
      }else{
        System.out.println(a-b);
      }
    }
}

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

import java.util.*;
public class Main {
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		// get a integer
		int A = sc.nextInt();
		// get two integers separated with half-width break
		int B = sc.nextInt();

		if (B % A) = 0
			System.out.println(A+B);
		else 
			System.out.println(B-A);
	}

}

Compiler output:
Main.java:11: error: illegal start of expression
		if (B % A) = 0
		           ^
Main.java:11: error: ';' expected
		if (B % A) = 0
		              ^
Main.java:13: error: 'else' without 'if'
		else 
		^
3 errors
Language: Java

public class abc118_a
{
  public static void main (String[] args)
  {
  	int A+B;
    System.out.println(A+B);
  }

}

Compiler output:
Main.java:5: error: ';' expected
  	int A+B;
  	     ^
Main.java:5: error: not a statement
  	int A+B;
  	      ^
2 errors
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
  int N,M;
  cin >> N >> M;
  int K[N+1];
  int A[N+1][31];
  for(int i=1; i<=N; ++i){
    cin >> K[i];
    for(int j=1; j<=K[i]; ++j){
      cin >> A[i][j];
    }
  }
  static int count[M+1];
  for(int i=1; i<=N; ++i){
    for(int j=1; j<=K[i]; ++j){
      count[A[i][j]] +=1;
    }
  }
  int ans=0;
  for(int i=1; i<=M; ++i){
    if(count[i]==N) ans += 1;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: storage size of 'count' isn't constant
   16 |   static int count[M+1];
      |              ^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
typedef long long int ll;
using namespace std;

//
int main()
{
  cin.tie(0);
 ios::sync_with_stdio(false);
    int N;
    cin >> N;
    vector<ll> A;
　　　ll common;
 　 cin>>common;
    for (int i = 1; i < N; i++)
    {
        ll ai;
        cin >> ai;
        common=__gcd(common,ai);
    }
    cout << common << endl;
}


Compiler output:
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　　　ll common;
      | ^
a.cc:15:1: error: extended character 　 is not valid in an identifier
a.cc:15:1: error: extended character 　 is not valid in an identifier
a.cc:16:2: error: extended character 　 is not valid in an identifier
   16 |  　 cin>>common;
      |  ^
a.cc: In function 'int main()':
a.cc:15:1: error: '\U00003000\U00003000\U00003000ll' was not declared in this scope
   15 | 　　　ll common;
      | ^~~~~~~~
a.cc:16:2: error: '\U00003000' was not declared in this scope
   16 |  　 cin>>common;
      |  ^~
a.cc:21:9: error: 'common' was not declared in this scope
   21 |         common=__gcd(common,ai);
      |         ^~~~~~
a.cc:23:13: error: 'common' was not declared in this scope
   23 |     cout << common << endl;
      |             ^~~~~~
Language: C

#include <stdio.h>
int main(void)
{
  int A,B;
  scanf("%d %d",&A,&B);
  if(B%A=0){
    printf("%d",A+B);
  }
  else{
    printf("%d",A-B);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: lvalue required as left operand of assignment
    6 |   if(B%A=0){
      |         ^
Language: C++

#include <bits/stdc++.h>
//#define int long long

using namespace std;
using LL = long long;

#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)

#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()

const int INF = (int)1e9;
const LL INFL = (LL)1e19;
const int MOD = (int)1e9 + 7;

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int a, b;
    cin >> a >> b;

    cout << (b % a == 0 ? a+b, b-a) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:35: error: expected ':' before ')' token
   24 |     cout << (b % a == 0 ? a+b, b-a) << endl;
      |                                   ^
      |                                   :
a.cc:24:35: error: expected primary-expression before ')' token
Language: C

#include <bits/stdc++.h>
// statics
using namespace std;
using int64 = int_fast64_t;
using PAIR = pair<int64, int64>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 3e5 + 1;

// init/input
#define int int64
#define INIT ios::sync_with_stdio(false);cin.tie(0);
#define VAR(type, ...) type __VA_ARGS__;MACRO_VAR_Scan(__VA_ARGS__);
template<typename T> void MACRO_VAR_Scan(T &t) {cin>>t;}
template<typename First, typename...Rest> void MACRO_VAR_Scan(First &first, Rest&...rest) {cin>>first;MACRO_VAR_Scan(rest...);}
#define VEC(type, c, n) vector<type> c(n);for(auto &&i:c)cin>>i;

// out
#define OUT(dist) cout<<(dist);
#define FOUT(n, dist) cout<<fixed<<setprecision(n)<<(dist);
#define SP cout<<" ";
#define BR cout<<endl;
#define zero(n) cout<<setfill('0')<<right<<setw(n)
#define debug(x) cerr<<#x<<":"<< (x);BR;

// utility
#define ALL(a) (a).begin(), (a).end()
#define EACH(i, a) for(auto &&i:(a))
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RFOR(i, a, b) for(int i=(b)-1;i>=0;--i)
#define REP(i, n) for(int i=0;i<(n);++i)
#define RREP(i, n) for(int i=(n)-1;i>=0;--i)

signed main() {
  INIT;
	VAR(int,a,b);
	OUT((b%a?b-a:a+b))BR;
  
  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 <ext/pb_ds/assoc_container.hpp> 	// Common file
#include <ext/pb_ds/tree_policy.hpp> 		// Including tree_order_statistics_node_update
#include<bits/stdc++.h>
#define int            		long long
#define x              		first
#define y              		second
#define all(aaa)       		(aaa).begin(),(aaa).end()
#define REP(i,sss,eee) 		for(int i=sss;i<=eee;++i)
#define pb             		push_back
#define pii            		pair<int,int>
#define vi             		vector<int>
#define speed          		ios_base::sync_with_stdio(0);cin.tie(0);
#define N              		1000000007
using namespace __gnu_pbds;
using namespace std;
template <class T>
T MAX(T a, T b){return ((a>b)?a:b);}
template <class T>
T MIN(T a, T b){return ((a<b)?a:b);}
template <class T>
T MOD(T a){return ((a>=0)?a:(-1*a));}
template <class T>
void SWAP(T &a,T &b){T temp=a;a=b;b=temp;}

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

long long ex(long long a, long long b){
	if(b==0||a==1){return 1;}
	if(a==0||b==1){return a;}
	long long tmp=ex(a,(b/2));
	if(b%2){return ((((tmp*tmp)%N)*a)%N);}
	else{return ((tmp*tmp)%N);}
}
long long inv(long long k){
	if(k==1){return 1;}
	else{return ex(k,N-2);}
}
/*****************default********************/
int solve()
{
	int A,B;cin>>A>>B;
	if(b%a==0){cout<<(A+B)<<"\n";}
	else{cout<<(A-B)<<"\n";}
	
}
signed main(){
	speed
	int tt=1;
	//cin>>tt;
	while(tt--)
	{
		solve();
	}
	return 0;
}

Compiler output:
a.cc: In function 'long long int solve()':
a.cc:48:12: error: 'b' was not declared in this scope
   48 |         if(b%a==0){cout<<(A+B)<<"\n";}
      |            ^
a.cc:48:14: error: 'a' was not declared in this scope
   48 |         if(b%a==0){cout<<(A+B)<<"\n";}
      |              ^
a.cc:51:1: warning: no return statement in function returning non-void [-Wreturn-type]
   51 | }
      | ^
Language: Java

import java.util.Scanner;

public class MyClass {
    public static void main(String args[]) {
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      if(a%b==0)
        System.out.println(a+b);
      else
        System.out.println(b-a);
    }
}

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

import java.util.Scanner;

public class main {
	public static void main(String[] abs) {
		Scanner x = new Scanner(System.in);
		
		int a = x.nextInt();
		int b = x.nextInt();
		
		if(b%a==0)
		{
			System.out.println(+(a+b));
		}
		
		else
			System.out.println(+(b-a));
	}
}


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

Scanner sc = new Scanner(System.in);
A = sc.nextInt();
B = sc.nextInt();

if( A%B == 0 ) {
  System.out.println( A + B);
} else {
  System.out.println( A - B);
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
A = sc.nextInt();
^
Main.java:3: error: class, interface, enum, or record expected
B = sc.nextInt();
^
Main.java:5: error: class, interface, enum, or record expected
if( A%B == 0 ) {
^
Main.java:7: error: class, interface, enum, or record expected
} else {
^
Main.java:9: error: class, interface, enum, or record expected
}
^
6 errors
Language: Java

if( A%B == 0 ) {
  System.out.println( A + B);
} else {
  System.out.println( A - B);
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
if( A%B == 0 ) {
^
Main.java:3: error: class, interface, enum, or record expected
} else {
^
Main.java:5: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

/***
 *          ___           ___
 *         /\  \         /\  \                                     _____
 *         \:\  \        \:\  \                                   /::\  \       ___           ___
 *          \:\  \        \:\  \                                 /:/\:\  \     /\__\         /\__\
 *      _____\:\  \   ___  \:\  \   ___     ___   ___     ___   /:/ /::\__\   /:/__/        /:/  /
 *     /::::::::\__\ /\  \  \:\__\ /\  \   /\__\ /\  \   /\__\ /:/_/:/\:|__| /::\  \       /:/__/
 *     \:\~~\~~\/__/ \:\  \ /:/  / \:\  \ /:/  / \:\  \ /:/  / \:\/:/ /:/  / \/\:\  \__   /::\  \
 *      \:\  \        \:\  /:/  /   \:\  /:/  /   \:\  /:/  /   \::/_/:/  /   ~~\:\/\__\ /:/\:\  \
 *       \:\  \        \:\/:/  /     \:\/:/  /     \:\/:/  /     \:\/:/  /       \::/  / \/__\:\  \
 *        \:\__\        \::/  /       \::/  /       \::/  /       \::/  /        /:/  /       \:\__\
 *         \/__/         \/__/         \/__/         \/__/         \/__/         \/__/         \/__/
 *
 *      @author      : Dylan Dsouza (dsouzadyn@gmail.com)
 *      @created     : Saturday Feb 16, 2019 22:47:36 IST
 */
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);

  #ifndef ONLINE_JUDGE
  #freopen("in.txt", "rt", stdin);
  #endif

  int A, B;
  cin >> A >> B;
  if (B % A == 0) {
    cout << A + B << endl;
  } else {
    cout << B - A << endl;
  }

  return 0;
}



Compiler output:
a.cc:26:4: error: invalid preprocessing directive #freopen
   26 |   #freopen("in.txt", "rt", stdin);
      |    ^~~~~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            if (b % a) {
                out.println(b - a);
            } else {
                out.println(a + b);
            }
        }
    }

    public static void main(String argds[]) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}



Compiler output:
Main.java:14: error: incompatible types: int cannot be converted to boolean
            if (b % a) {
                  ^
1 error
Language: C

#inlcude<stdio.h>

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

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   scanf("%d %d",&a,&b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlcude<stdio.h>
main.c:7:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   scanf("%d %d",&a,&b);
      |   ^~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |     printf("%d\n",a-b);
      |     ^~~~~~
main.c:10:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 |     printf("%d\n",b-a);
      |     ^~~~~~
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

        if(b % a == 0){
            System.out.println(a + b);
        }else{
            System.out.println(b - a);
        }
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main{
      | ^~~~~~
Language: C

#include<stdio.h>

main(void){
  int a,b;
  
  scanf("%d",a);
  scanf("%d",b);
  x=b%a;
  if(x==0){
    y=a+b;
  }
  else{
    y=b-a;
  }
  printf("%d\n",y);
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(void){
      | ^~~~
main.c: In function 'main':
main.c:8:3: error: 'x' undeclared (first use in this function)
    8 |   x=b%a;
      |   ^
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:5: error: 'y' undeclared (first use in this function)
   10 |     y=a+b;
      |     ^
Language: C++

// #define __LOCAL_DEBUG__
#include<bits/stdc++.h>
using namespace std;
#ifdef __LOCAL_DEBUG__
# define _debug(x) { cerr << "\033[94m" << __func__ << " " << #x << ": " << (x) << "\n\033[0m"; }
#else
# define _debug(...) {((void) 0);}
#endif
#define REP(i, n) for (int i = (0); i < (n); i++)
#define REPP(i, a, b) for (int i = (a); i < (b); i++)
#define EACH(x, arr) for (auto& x : arr) 
#define ITR(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define CLR(x, v) memset(x, v, sizeof (x))
#define ALL(x) x.begin(), x.end()
#define SZ(x) (int) x.size()
template<class T> inline void amin(T &x, const T &y) { if (y<x) x=y; }
template<class T> inline void amax(T &x, const T &y) { if (x<y) x=y; }
using LL = long long;
using PII = pair<int, int>;
using VI = vector<int>;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int MAXN = 5005;

int n, m;
void MAIN() {
    int a, b;
    cin >> a >> b;
    if (b % a == 0) cout << (a + b) << endl;
    esle cout <<  b - a << endl;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int TC = 1;
    // cin >> TC;
    REP(tc, TC) {
        // cout << "Case " << tc + 1 << ": ";
        MAIN();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void MAIN()':
a.cc:30:5: error: 'esle' was not declared in this scope
   30 |     esle cout <<  b - a << endl;
      |     ^~~~
Language: C++

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

Compiler output:
a.cc:16:5: error: expected declaration before '}' token
   16 |     }
      |     ^
Language: C++

#include<bits/stc++.h>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  cout << (b%a==0?a+b:b-a) << endl;
}

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

#include<stdio.h>

int main(void)
{
  int A,B;
     scanf("%d%d",&A,&B);
       if(B % A = 0)
      {
       printf("%d¥n",A+B)
      }
      else
      {
      printf("%d¥n",A-B);
       }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: lvalue required as left operand of assignment
    7 |        if(B % A = 0)
      |                 ^
main.c:9:26: error: expected ';' before '}' token
    9 |        printf("%d¥n",A+B)
      |                          ^
      |                          ;
   10 |       }
      |       ~
Language: C

#include<stdio.h>

int main(void)
{
  int A,B;
     scanf("%d%d",&A&B);
       if(B % A = 0)
      {
       printf("%d¥n",A+B)
      }
      else
      {
      printf("%d¥n",A-B);
       }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: invalid operands to binary & (have 'int *' and 'int')
    6 |      scanf("%d%d",&A&B);
      |                   ~~^
      |                   |
      |                   int *
main.c:7:17: error: lvalue required as left operand of assignment
    7 |        if(B % A = 0)
      |                 ^
main.c:9:26: error: expected ';' before '}' token
    9 |        printf("%d¥n",A+B)
      |                          ^
      |                          ;
   10 |       }
      |       ~
Language: Java

#!/usr/bin/env python3
x = list(map(int, input().split(' ')))
A = x[0]
B = x[1]

if B % A == 0:
    print(A+B)
else:
    print(B-A)


Compiler output:
Main.java:1: error: illegal character: '#'
#!/usr/bin/env python3
^
Main.java:1: error: class, interface, enum, or record expected
#!/usr/bin/env python3
  ^
2 errors
Language: Java

import java.util.*;
public class HelloWorld{

     public static void main(String []args){
         Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        if(b%a==0)
        System.out.println(a+b);
        else
        System.out.println(b-a);
     }
}

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

#include <bits/stdc ++.h>

void main(){
  intA, B; cin  >> A >> B;
  if(A%B==0){
    cout << A+B << endl;
  }else{
    cout << A-B <<endl;
  }
}

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

#include<iostream>
using namespace std;

int Main()
{
	int a, b, c;
	cin >> a >> b;
	c = b/a;
	c = c*a;
	if(c == b)
	{
		cout << a+b;
	}else{
		cout << b-a;
	}
	return 0;
}
	 

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

	

int main()
{
int A,B;

cin >> A >> B;

bool judge = 0;

for(int i=1;i<21;i++)
{
	if(A*i == B)
	{
		judge = 1;
	}
}

if(judge == 1)
{
	cout << A + B;
}
else
{
	cout << B - A;
}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin >> A >> B;
      | ^~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << A + B;
      |         ^~~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << B - A;
      |         ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define rep(i,n)for(ll i=0;i<n;i++)
#define ll long long
#define double long double
int gcd(int x, int y) {
	if (y == 0)return x;
	else return gcd(y, x%y);
}
using namespace std;
ll a[35]; ll b[35][35]; ll c[35];
signed main() {
	ll n, m, ans = 0;
	cin >> n >> m;
	rep(i, n)cin >> a[i];
		for (int k = 0; k < a[i]; k++) {
			cin >> b[i][k];
        }
	rep(i, m)c[i] = 0;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < a[i]; j++) {
			c[b[i][j] - 1]++;
		}
	}
	rep(i, m) {
		if (c[i] == n)ans++;
	}
	cout << ans << endl;
	getchar(); getchar(); return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:39: error: 'i' was not declared in this scope
   24 |                 for (int k = 0; k < a[i]; k++) {
      |                                       ^
Language: C++

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

int main(){

int n;
cin >> n;

vector<int> vec(n);
int i,j;
int min;

for(i=0;i<n;i++)
cin >> vec.at(i);

while(vec.at(n-1)==0){
sort(vec.begin(), vec.end());
for(i=0;i<n;i++) if(vec.at(i)!=0) break;
for(j=i+1;j<n,j++){
vec.at(j) = vec.at(j)%vec.at(i);
  }
}

cout << vec.at(n);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before ')' token
   19 | for(j=i+1;j<n,j++){
      |                  ^
      |                  ;
Language: C++

#include "bits/stdc++.h"

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)

typedef long long LL;
typedef unsigned long UL;

using namespace std;


int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;

	scanf_s("%d", &n);

	vector<int> a(n);

	int mina = INT_MAX;

	REP(i, n)
	{
		scanf_s("%d", &a[i]);
		mina = min(mina, a[i]);
	}



	for (int i = mina; i != 1; --i)
	{
	loop_start:


		REP(j, n)
		{
			if (a[j] % i != 0)
			{
				--i;
				goto loop_start;
			}
		}

		printf("%d", i);
		return 0;
	}

	printf("%d", 1);

	return 0;
}

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

#include<iostream>
#include<string>

int main(void)
{
  int a, b;
  int input_number;
  std::cin >> a >> b;
  
  if(input_number==b/a){
    cout<<a+b<<endl;
  }if(input_number!b/a){
      cout<<a-b<<endl;
  }
    return0;
 }






Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout<<a+b<<endl;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     cout<<a+b<<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:12:19: error: expected ')' before '!' token
   12 |   }if(input_number!b/a){
      |      ~            ^
      |                   )
a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |       cout<<a-b<<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:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |       cout<<a-b<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:5: error: 'return0' was not declared in this scope
   15 |     return0;
      |     ^~~~~~~
Language: C++

#include "bits/stdc++.h"

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)

typedef long long LL;
typedef unsigned long UL;

using namespace std;


int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;

	scanf("%d", &n);

	vector<int> a(n);

	int mina = INT_MAX;

	REP(i, n)
	{
		scanf("%d", &a[i]);
		mina = min(mina, a[i]);
	}



	for (int i = mina; i != 1; --i)
	{
	loop_start:


		REP(j, n)
		{
			if (a[j] % i != 0)
			{
				--i
				goto loop_start;
			}
		}

		printf("%d", i);
		return 0;
	}

	printf("%d", 1);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:36: error: expected ';' before 'goto'
   42 |                                 --i
      |                                    ^
      |                                    ;
   43 |                                 goto loop_start;
      |                                 ~~~~
Language: C

#include<stdio.h>
int main(void){
  double a;
  double b;
  scanf("%lf",&a);
  scanf("%lf",&b);
  if(b%a==0){
    printf("%f",a+b);
  }
  else{
    printf("%f",a-b);
  }
  return (0);
}


Compiler output:
main.c: In function 'main':
main.c:7:7: error: invalid operands to binary % (have 'double' and 'double')
    7 |   if(b%a==0){
      |       ^
Language: C

#include<stdio.h>
int main(void){
  double a,b;
  int x=0;
  scanf("%lf",&a);
  scanf("%lf",&b);
  if(b%a==0){
    x=a+b;
    printf("%f",x);
  }
  else{
    x=a-b;
    printf("%f",x);
  }
  return (0);
}


Compiler output:
main.c: In function 'main':
main.c:7:7: error: invalid operands to binary % (have 'double' and 'double')
    7 |   if(b%a==0){
      |       ^
Language: C++

#include<iostream>
#include<string>

int main(void)
{
  int a, b;;
  int input_number
    std::cin>>input_number;
  std::cin>>a>>b;
  
  if(input_number=b/a){
    cout<<a+b<<endl;
  }if(input_number==b/a){
      cout<<a-b<<endl;
  }
    return0;
 }





Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'std'
    8 |     std::cin>>input_number;
      |     ^~~
a.cc:11:6: error: 'input_number' was not declared in this scope
   11 |   if(input_number=b/a){
      |      ^~~~~~~~~~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<a+b<<endl;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<a+b<<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:13:7: error: 'input_number' was not declared in this scope
   13 |   }if(input_number==b/a){
      |       ^~~~~~~~~~~~
a.cc:14:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |       cout<<a-b<<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:14:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |       cout<<a-b<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:5: error: 'return0' was not declared in this scope
   16 |     return0;
      |     ^~~~~~~
Language: C

#include<stdio.h>
int main(void){
  double a,b;
  scanf("%lf",&a);
  scanf("%lf",&b);
  if(b%a==0){
    printf("%f",a+b);
  }
  else{
    printf("%f",a-b);
  }
  return (0);
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: invalid operands to binary % (have 'double' and 'double')
    6 |   if(b%a==0){
      |       ^
Language: C

#include<stdio.h>
int main(void){
  double a,b;
  scanf("%f",&a);
  scanf("%f",&b);
  if(b%a==0){
    printf("%f",a+b);
  }
  else{
    printf("%f",a-b);
  }
  return (0);
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: invalid operands to binary % (have 'double' and 'double')
    6 |   if(b%a==0){
      |       ^