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

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int T = sc.nextInt();
    int X = sc.nextInt();
    System.out.println((B % A == 0)?A+B:B-A);
  }
}

Compiler output:
Main.java:8: error: reference to println is ambiguous
    System.out.println((B % A == 0)?A+B:B-A);
              ^
  both method println(char[]) in PrintStream and method println(String) in PrintStream match
Main.java:8: error: cannot find symbol
    System.out.println((B % A == 0)?A+B:B-A);
                        ^
  symbol:   variable B
  location: class Main
Main.java:8: error: cannot find symbol
    System.out.println((B % A == 0)?A+B:B-A);
                            ^
  symbol:   variable A
  location: class Main
Main.java:8: error: cannot find symbol
    System.out.println((B % A == 0)?A+B:B-A);
                                    ^
  symbol:   variable A
  location: class Main
Main.java:8: error: cannot find symbol
    System.out.println((B % A == 0)?A+B:B-A);
                                      ^
  symbol:   variable B
  location: class Main
Main.java:8: error: cannot find symbol
    System.out.println((B % A == 0)?A+B:B-A);
                                        ^
  symbol:   variable B
  location: class Main
Main.java:8: error: cannot find symbol
    System.out.println((B % A == 0)?A+B:B-A);
                                          ^
  symbol:   variable A
  location: class Main
7 errors
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
int main(){
    int n, m;
    cin >> n >> m;
    if(m % n == 0) cout << a+b;
    else cout << b-a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: 'a' was not declared in this scope
   21 |     if(m % n == 0) cout << a+b;
      |                            ^
a.cc:21:30: error: 'b' was not declared in this scope
   21 |     if(m % n == 0) cout << a+b;
      |                              ^
a.cc:22:18: error: 'b' was not declared in this scope
   22 |     else cout << b-a;
      |                  ^
a.cc:22:20: error: 'a' was not declared in this scope
   22 |     else cout << b-a;
      |                    ^
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before 'return'
   10 |         cout << B - A << endl
      |                              ^
      |                              ;
   11 |     return 0;
      |     ~~~~~~
Language: Java

import java.util.Scanner;
public class act118A {
	public static void main(String[] args)
	{
		int a,b;

		Scanner sc = new Scanner(System.in);

		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 act118A is public, should be declared in a file named act118A.java
public class act118A {
       ^
1 error
Language: Java

public static void main(String[] args)
	{
		int a,b;

		Scanner scanner = new Scanner(System.in);

		a = Integer.parseInt(scanner.next());

		b = Integer.parseInt(scanner.next());


		if( b%a ==0)
			System.out.println(a+b);

		else
			System.out.println(b-a);

	}

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

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

int main()
{
  int a;
  int b;
  
  cin >> a;
  cin >> b;
  
  if(a % b == 0){
    cout<<a + b<<endl;
  }else{
    cout b - a<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: expected ';' before 'b'
   16 |     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){
    cout<<a+b;
  }
  else{
    cout<<b-a;
  }
  return 0;
}

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>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const ll mod = 1000000007;
const ll INF = mod * mod;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
typedef vector<int> vec;
typedef vector<string> svec;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
//#define int long long

void solve() {
	if(b % a == 0) {
    	cout << a + b << endl; return;
    } else {
    	cout << b - a << endl;
    }
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//init();
	solve();
	//cout << "finish" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:50:12: error: 'b' was not declared in this scope
   50 |         if(b % a == 0) {
      |            ^
a.cc:50:16: error: 'a' was not declared in this scope
   50 |         if(b % a == 0) {
      |                ^
Language: C++

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

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

//dp
#include<bits/stdc+++.h>
using namespace std;
 main()
 {
 	int a,b;
 	cin>>a>>b;
 	if(b%a==0)
 	{
 		cout<<a+b;
 	}
 	else
 	{
 		cout<<b-a;
 	}
 }

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

#include <iostream>
#include <map>
#include <algorithm>
#include <string>
#include <vector> 
#include <numeric>
#include <cmath>
#include <queue>


#define CHMAX(a,b) a = std::max(a,b)
#define CHMIN(a,b) a = std::min(a,b)
#define CHABS(a) a = std::abs(a) 
#define COUT(a) std::cout << a << std::endl
#define CERR(a) std::cerr << a << std::endl
#define FOR(n) for(lli i = 0; i < n; i++)

using namespace std;
using lli = long long int;
using pll = pair<lli, lli>;
using tlll = tuple<lli, lli, lli>;

lli mod197 = 1000000007LL;

// ax + by = gcd(a,b) 最大公約数
template< typename T >
T extgcd(T a, T b, T& x, T& y) {
	T d = a;
	if (b != 0) {
		d = extgcd(b, a % b, y, x);
		y -= (a / b) * x;
	}
	else {
		x = 1;
		y = 0;
	}
	return d;
}

int main(void) {

  int a,b
  if(a%b==0) COUT(b+a);
  else COUT(b-a);
  
  
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:3: error: expected initializer before 'if'
   43 |   if(a%b==0) COUT(b+a);
      |   ^~
a.cc:44:3: error: 'else' without a previous 'if'
   44 |   else COUT(b-a);
      |   ^~~~
a.cc:44:13: error: 'b' was not declared in this scope
   44 |   else COUT(b-a);
      |             ^
a.cc:14:30: note: in definition of macro 'COUT'
   14 | #define COUT(a) std::cout << a << std::endl
      |                              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'C' was not declared in this scope
    7 |   C = B % A;
      |   ^
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  if( b % a == 0 ) {
    cout << a+b << endl;
  } else {
  	cout << b-a << endl;
  }

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

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

using namespace std; 
int main(){
  int a,b,c,d,e;
  cin >>b >>a;
  if(b%a=0) cout <<a+b;
  else cout << b-a;
}

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

#include<iostream>
using namespace std;

int main(){
  inta,b;
  if(b%a==0){
    cout<<b+a<<endl;
  }else{
    cout<<b-a<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'inta' was not declared in this scope; did you mean 'int'?
    5 |   inta,b;
      |   ^~~~
      |   int
a.cc:5:8: error: 'b' was not declared in this scope
    5 |   inta,b;
      |        ^
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   if(b%a==0){
      |        ^
Language: C++

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(void){
    // Your code here!
    int A;
    int B;
    cin >> A;
    cin >> B;
    if (B % A=0){
        cout << A+B << endl;
    }else{
        cout << B-A << endl;
    }
}


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

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(void){
    // Your code here!
    int A;
    int B;
    cin >> A;
    cin >> B;
    if (B % A=0){
        cout << A+B << endl;
    }else{
        cout << A-B << endl;
    }
}


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

#include <iostream>
#include <string>
using namespace std;
int main(void){
    // Your code here!
    int A;
    int B;
    cin >> A;
    cin >> B;
    if (B % A=0){
        cout << A+B << endl;
    }else{
        cout << A-B << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: lvalue required as left operand of assignment
   10 |     if (B % A=0){
      |         ~~^~~
Language: C

#include<stdio.h>                                                    

int main(void)
{
   int a,b,c;
   scanf("%d %d",&a,&b);

   if((b%a)==0){
            c=b+a;
            printf("%d\n",c);}

   else {
         c=b-a;
         printf("%d\n",c);}

   return 0;
}
~                                                                    
~                  

Compiler output:
main.c:18:1: error: expected identifier or '(' before '~' token
   18 | ~
      | ^
Language: C

#include <stdio.h>

////HUKHJKJKHJKK
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:17:26: warning: missing terminating " character
   17 |         printf("%d\n",b-a");
      |                          ^
main.c:17:26: error: missing terminating " character
   17 |         printf("%d\n",b-a");
      |                          ^~~
main.c:17:26: error: expected ')' before '}' token
   17 |         printf("%d\n",b-a");
      |               ~          ^
      |                          )
   18 |     }
      |     ~                     
main.c:17:26: error: expected ';' before '}' token
   17 |         printf("%d\n",b-a");
      |                          ^
      |                          ;
   18 |     }
      |     ~
Language: Java


import java.util.Scanner;
public class MAIN {


    public static void main(String[] args) {
        int a,b;
        Scanner s=new Scanner(System.in);
        a=s.nextInt();
        b=s.nextInt();
        if(b%a==0)
    {
        System.out.println(a+b);
        System.out.println("As "+a+"is a divisor of "+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: C++

#include <bits/stdc++.h>
using namespace std;
  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:8:7: error: lvalue required as left operand of assignment
    8 |   if(B%A=0){
      |      ~^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'A' was not declared in this scope
    6 |   if(M%N==0)cout << A+B <<endl;
      |                     ^
a.cc:6:23: error: 'B' was not declared in this scope
    6 |   if(M%N==0)cout << A+B <<endl;
      |                       ^
a.cc:7:16: error: 'B' was not declared in this scope
    7 |   else cout << B-A << endl;
      |                ^
a.cc:7:18: error: 'A' was not declared in this scope
    7 |   else cout << B-A << endl;
      |                  ^
Language: C++

#include <iostream>
int a,b;main(){std::cin>>a>>b;if(a%b)std::cout<<a+b; else cout<<b-a;}

Compiler output:
a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int a,b;main(){std::cin>>a>>b;if(a%b)std::cout<<a+b; else cout<<b-a;}
      |         ^~~~
a.cc: In function 'int main()':
a.cc:2:59: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | int a,b;main(){std::cin>>a>>b;if(a%b)std::cout<<a+b; else cout<<b-a;}
      |                                                           ^~~~
      |                                                           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
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'else' without a previous 'if'
    8 |   else
      |   ^~~~
Language: Java

import java.util.Scanner;
 
public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.next();
    int B = scanner.next();
    int output = 0;
    if((B % A) == 0){
    	output = A + B;
    }
    else{
      output = B - A;
    }
    System.out.println(output);
  }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
    int A = scanner.next();
                        ^
Main.java:7: error: incompatible types: String cannot be converted to int
    int B = scanner.next();
                        ^
2 errors
Language: Java

public class Main {
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String text = scan.next();
    String[] num = text.split(" ");
    int A = Integer.parseInt(num[0]);
    int B = Integer.parseInt(num[1]);
    int output = 0;
    if((B % A) == 0){
    	output = A + B;
    }
    else{
      output = B - A;
    }
    System.out.println(output);
  }
}

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

public class Question {
  public static void main(String[] args){
    String text = args[0];
    String[] num = text.split(" ");
    int A = Integer.parseInt(num[0]);
    int B = Integer.parseInt(num[1]);
    int output = 0;
    if((B % A) == 0){
    	output = A + B;
    }
    else{
      output = B - A;
    }
    System.out.println(output);
  }
}

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

public class main {
  public static void main(String[] args){
    String text = args[0];
    String[] num = text.split(" ");
    int A = Integer.parseInt(num[0]);
    int B = Integer.parseInt(num[1]);
    int output = 0;
    if((B % A) == 0){
    	output = A + B;
    }
    else{
      output = B - A;
    }
    System.out.println(output);
  }
}

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

public class main(){
  public static void main(String[] args){
    String text = args[0];
    String[] num = text.split(" ");
    int A = Integer.parseInt(num[0]);
    int B = Integer.parseInt(num[1]);
    int output = 0;
    if((B % A) == 0){
    	output = A + B;
    }
    else{
      output = B - A;
    }
    System.out.println(output);
  }
}

Compiler output:
Main.java:1: error: '{' expected
public class main(){
                 ^
1 error
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)

int main(){
	int a,b;
	scanf("%d",&a);
	scanf("%d",&b);
	
	if(b%a == 0){
		cout << a+b << endl;
	}
	else{
		cout << a-b << endl;
	}
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 cout << a+b << endl;
      |                 ^~~~
      |                 std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |                 cout << a+b << endl;
      |                                ^~~~
      |                                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:17: 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:32: 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)
      |     ^~~~
Language: C++

#include <iostream>

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

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     std::cout << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

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

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;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     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:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     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
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: expected ';' before ':' token
    8 |     if (B % A == 0) cout << A + B << endl:
      |                                          ^
      |                                          ;
Language: C++

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

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

      

Compiler output:
a.cc:2:17: error: 'stdl' is not a namespace-name
    2 | using namespace stdl;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> A >> B;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |       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:9:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |       cout << A + B << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |       cout << B - 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:12:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |       cout << B - A << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define pf push_front

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:41: error: expected ';' before 'return'
   26 |   cout << (a%b == 0 ? a+b : a-b) << endl
      |                                         ^
      |                                         ;
   27 |     return 0;
      |     ~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:15: error: invalid operands to binary & (have 'char *' and 'int')
    4 |   scanf("%d%d"&a,&b);
      |         ~~~~~~^
      |         |
      |         char *
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(system.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = (int)b/a;
      if(c*a == b) System.out.println(a+b);
      else System.out.println(b-a);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
    	Scanner sc = new Scanner(system.in);
    	                         ^
  symbol:   variable system
  location: class Main
1 error
Language: C++

# include < bits / stdc ++. h >
using namespace std ;
int main () {
int N , M ; cin >> N >> M ;
vector <int > cnt (M , 0);
for ( int i = 0; i < N ; ++ i ) {
int K; cin >> K ;
for ( int j = 0; j < K ; ++ j ) {
int A; cin >> A ; --A ;
++ cnt [ A ];
}
}
int ans = 0;
for ( int i = 0; i < M ; ++ i ) {
if ( cnt [ i ] == N ) {
++ ans ;
}
}
cout << ans << endl ;
}

Compiler output:
a.cc:1:11: 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;
  	cin >> A >> B;
  	if(B%A == 0) cout << B+A;
  	else cout B-A;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before 'B'
    8 |         else cout B-A;
      |                  ^~
      |                  ;
Language: C++

#include <bits/stdc++.h>
#include <numeric>
using namespace std;
 
int main() {
  int N, ans;
  cin >> N >> ans;
  
  for (int i = 0; i < N-1; i++) {
    int a;
    cin >> a;
    ans = gcd(ans, a)
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before '}' token
   12 |     ans = gcd(ans, a)
      |                      ^
      |                      ;
   13 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int A,B,X; cin >> A >> B;
  for (int i=0;i < B;i++) {
    if (B/i==A) {
      cout << A+B << endl;
      int X =10
    }
  }
 if (X ==! 10) {
cout << B-A << endl;
 }
  else if (X==10){
    cout << A-B << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before '}' token
   10 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int A,B,X; cin >> A >> B;
  for (int i=0;i < B;i++) {
    if (B/i==A) {
      cout << A+B << endl;
      int X =10
    }
  }
 if (X ==! 10)
cout << B-A << endl;
  else if (X==10)
    cout << A-B << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before '}' token
   10 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int A,B,X; cin >> A >> B;
  for (int i=0;i < B;i++) {
    if (B/i==A) {
      cout << A+B << endl;
      int X =10
  break;
    }
  }
 if (X ==! 10)
cout << B-A << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'break'
   10 |   break;
      |   ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int A,B; cin >> A >> B;
  for (int i=0;i < B;i++) {
    if (B/i==A) {
      cout << A+B << endl;
      int X =10
  break;
    }
  }
 if (X ==! 10)
cout << B-A << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'break'
   10 |   break;
      |   ^~~~~
a.cc:13:6: error: 'X' was not declared in this scope
   13 |  if (X ==! 10)
      |      ^
Language: C++

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

int main(){
  int A, B;
  cin >> A >> B;
  
  if(A % B == 0){
    int ans = A + B;
  }

  else{
    int ans = B - A;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <cmath>
#include <map>
using namespace std;

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

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

import java.util.*

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


Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:16: error: reached end of file while parsing
	}
	 ^
2 errors
Language: C

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


Compiler output:
main.c: In function 'h':
main.c:4:11: error: expected expression before '{' token
    4 |    return {a + b};
      |           ^
main.c:6:11: error: expected expression before '{' token
    6 |    return {b - a};
      |           ^
Language: C

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


Compiler output:
main.c: In function 'h':
main.c:4:11: error: expected expression before '{' token
    4 |    return {a + b};
      |           ^
main.c:6:11: error: expected expression before '{' token
    6 |    return {b - a};
      |           ^
main.c: In function 'main':
main.c:10:14: error: 'a' undeclared (first use in this function)
   10 |  scanf("%d",&a);
      |              ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:14: error: 'b' undeclared (first use in this function)
   11 |  scanf("%d",&b);
      |              ^
Language: C

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


Compiler output:
main.c: In function 'h':
main.c:4:11: error: expected expression before '{' token
    4 |    return {a + b};
      |           ^
main.c:6:11: error: expected expression before '{' token
    6 |    return {b - a};
      |           ^
main.c: In function 'main':
main.c:10:14: error: 'a' undeclared (first use in this function)
   10 |  scanf("%d",&a);
      |              ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:14: error: 'b' undeclared (first use in this function)
   11 |  scanf("%d",&b);
      |              ^
Language: C

#include <stdio.h>
int main(){
 scanf("%d",/a);
 scanf("%d",/b);
 if(a % b = 0){
  retrun a + b;
 }else{
  retrun b - a;
 }
}


Compiler output:
main.c: In function 'main':
main.c:3:13: error: expected expression before '/' token
    3 |  scanf("%d",/a);
      |             ^
main.c:4:13: error: expected expression before '/' token
    4 |  scanf("%d",/b);
      |             ^
main.c:5:5: error: 'a' undeclared (first use in this function)
    5 |  if(a % b = 0){
      |     ^
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:9: error: 'b' undeclared (first use in this function)
    5 |  if(a % b = 0){
      |         ^
main.c:6:3: error: unknown type name 'retrun'
    6 |   retrun a + b;
      |   ^~~~~~
main.c:6:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
    6 |   retrun a + b;
      |            ^
main.c:8:3: error: unknown type name 'retrun'
    8 |   retrun b - a;
      |   ^~~~~~
main.c:8:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
    8 |   retrun b - a;
      |            ^
Language: C

include <stdio.h>
int main(){
scanf("%d",/a);
scanf("%d",/b);
if(a % b = 0){
  retrun a + b;
}else{
  retrun b - a;
}
}


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

#include<iostream>

int main(){
  int a, b;
  
  cin >> a >> b;
  int ans;
  if(b % a == 0)ans=a+b;
  else ans =b-a;
  
  cout << ans << endl;
  
  
  
  
}

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

#include<iostream>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    if(B%A==0){
        cout<<A+B<<endl;
    }else{
        cout<<A-B<<endl;
    }
return 0
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ';' before '}' token
   11 | return 0
      |         ^
      |         ;
   12 | }
      | ~
Language: C++

#include<iostream>

int main(){
  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: 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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     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:7:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<b-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:9:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<b-a<<endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected primary-expression before ')' token
   10 |     printf("%d",B-A-);
      |                     ^
Language: C++

#include <iostream>
using namespace std;

int main() {

    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: In function 'int main()':
a.cc:12:30: error: expected ';' before ':' token
   12 |         cout << b - a << endl:
      |                              ^
      |                              ;
Language: C++

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

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

    

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: 'B' was not declared in this scope
    5 |   if(B%A==0){
      |      ^
a.cc:5:8: error: 'A' was not declared in this scope
    5 |   if(B%A==0){
      |        ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'B' was not declared in this scope
    5 |   if (B % A == 0){
      |       ^
a.cc:5:11: error: 'A' was not declared in this scope
    5 |   if (B % A == 0){
      |           ^
a.cc:6:21: error: expected primary-expression before ';' token
    6 |     cout << A + B <<;
      |                     ^
a.cc:10:21: error: expected primary-expression before ';' token
   10 |     cout << B - A <<;
      |                     ^
Language: C++

import java.util.Scanner;

public class Main {

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

        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        System.out.println((b % a == 0) ? a + b : 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: C++

include <bits/stdc++.h>
using namespace std;
 
int gcd_euclid(int u, int v) {
  int r;
  while (0 != v) {
    r = u % v; u = v; v = r; /* swap */
  }
  return u;
}
 
int main() {
  int n;
  cin >> n;
  int a[n];
  for(i=0;i<n;i++){
    cin >> a[i];
  	}
  for(j=1;j<n;j++){
    a[j]=gcd_euclid(a[j],a[j-1]);
  }
  cout << a[n] << endl;
}
  
#include <bits/stdc++.h>
using namespace std;

int gcd_euclid(int u, int v) {
  int r;
  while (0 != v) {
    r = u % v; u = v; v = r; /* swap */
  }
  return u;
}

int main() {
  int n;
  cin >> n;
  int a[n];
  for(int i=0;i<n;i++){
    cin >> a[i];
  	}
  for(int j=1;j<n;j++){
    a[j]=gcd_euclid(a[j],a[j-1]);
  }
  cout << a[n] << endl;
}
  
提出情報



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope
   14 |   cin >> n;
      |   ^~~
a.cc:16:7: error: 'i' was not declared in this scope
   16 |   for(i=0;i<n;i++){
      |       ^
a.cc:19:7: error: 'j' was not declared in this scope
   19 |   for(j=1;j<n;j++){
      |       ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout << a[n] << endl;
      |   ^~~~
a.cc:22:19: error: 'endl' was not declared in this scope
   22 |   cout << a[n] << endl;
      |                   ^~~~
a.cc: At global scope:
a.cc:28:5: error: redefinition of 'int gcd_euclid(int, int)'
   28 | int gcd_euclid(int u, int v) {
      |     ^~~~~~~~~~
a.cc:4:5: note: 'int gcd_euclid(int, int)' previously defined here
    4 | int gcd_euclid(int u, int v) {
      |     ^~~~~~~~~~
a.cc:36:5: error: redefinition of 'int main()'
   36 | int main() {
      |     ^~~~
a.cc:12:5: note: 'int main()' previously defined here
   12 | int main() {
      |     ^~~~
a.cc:49:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   49 | 提出情報
      | ^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int A,B;
  cin>>A>>B;
  if(B%A==0){
   cout<<A+B<<endl;
  }
  else if(B%A!==0){
  cout<<A-B<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '=' token
    9 |   else if(B%A!==0){
      |                ^
Language: C++

>>+
[-<,----- -----[ >++++[-<----->]<-- 
  [>++++[-<---->]<<[->>+<<]>>[-<<++++++++++>>]<[-<+>]>+<]
  +>[-<->]< [- /* */ > ]>+<
]>]<

<[->+>+<<]
<[->+>>>+<<<<]
>>>
[->->+<[>]>[[-<+>]>>]<<<<]  >[-]>[-<<+>>]<<
>+<
[[-]>-<<<[->-<]>>]
>[-<<<[->+<]>>>]
<<

[->+<]>[>++++++++++<[->->+<[>]>[[-<+>]>>>+<]<<<<]>[-]>+[-<<+>>]>>>[-<<<<+>>>>]<<<<]
+<[>->++++++++++[-<+++++>]<---[<[+<]>[>]<-]<[.[-]<]]
>[>++++++++++[->+++++<]+>--.[[-]<]>]


Compiler output:
a.cc:1:1: error: expected unqualified-id before '>>' token
    1 | >>+
      | ^~
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude <bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> A >> B;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #iclude <bits/stdc++.h>
a.cc:9:7: error: 'cout' was not declared in this scope
    9 |       cout << A + B << endl;
      |       ^~~~
a.cc:9:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:24: error: 'endl' was not declared in this scope
    9 |       cout << A + B << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #iclude <bits/stdc++.h>
a.cc:12:7: error: 'cout' was not declared in this scope
   12 |       cout << A - B << endl;
      |       ^~~~
a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:24: error: 'endl' was not declared in this scope
   12 |       cout << A - B << endl;
      |                        ^~~~
a.cc:12:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'A'
    5 |   cin A,B;
      |      ^~
      |      ;
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;

const long long N = 3e6 + 17;
ll a[N], b[N], cnt = 1, ans, lnt, n, m, r1, r0, l1, l0, sum, mx, h, c[N], t[N], mn = N, x, y, k;
pair<ll,ll>pr[N];
vector<ll>v,v2;
map<ll,ll>mp;
bool used[N];
char ch[N];
ll prime[N] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53};

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin >> n >> m;
    if(a % b == 0 or b % a == 0)
    {
        cout << n + m;
    }
    else 
    {
        cout << m - n;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: invalid operands of types 'long long int [3000017]' and 'long long int [3000017]' to binary 'operator%'
   20 |     if(a % b == 0 or b % a == 0)
      |        ~ ^ ~
      |        |   |
      |        |   long long int [3000017]
      |        long long int [3000017]
a.cc:20:24: error: invalid operands of types 'long long int [3000017]' and 'long long int [3000017]' to binary 'operator%'
   20 |     if(a % b == 0 or b % a == 0)
      |                      ~ ^ ~
      |                      |   |
      |                      |   long long int [3000017]
      |                      long long int [3000017]
Language: C++

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

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

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

#include<stdio.h>
#include<string.h>
//abc120-A
/*
int main(void)
{
	int a, b, c,d;
	scanf("%d %d %d", &a, &b, &c);

	if (b >= a * c)
	{
		printf("%d", c);
	}

	else
	{
		d = b / a;
		printf("%d", d);
	}
	return 0;
}
//abc120-B
int main(void)
{
	int a, b, k, tmp;
	int ans = 0, i, j;

	scanf("%d %d %d", &a, &b, &k);

	if (a < b)
	{
		tmp = a;
		a = b;
		b = tmp;
	}

	for (i = b; i > 0; i--)
	{
		if ((a % i + b % i) == 0)
		{
			ans += 1;
		}
		if (ans == k)
		{
			break;
		}

	}
	printf("%d", i);
	return 0;
}
//abc119-A
int main(void)
{
	int a, b, c;
	scanf("%d/%d/%d", &a, &b, &c);
	if (b < 5)
	{
		printf("Heisei");
	}
	else
	{
		printf("TBD");
	}

	
	return 0;
}
//abc119-b
int main(void)
{
	int a, i;
	float sum = 0;
	char s[15];
	float y;

	scanf_s("%d", &a);
	for (i = 0; i < a; i++)
	{
		scanf_s("%f", &y);
		scanf_s("%s", s, 15);
		if (strcmp(s, "JPY") == 0)
		{
			sum += y;
		}

		else
		{
			sum += y * 380000;
		}
	}
	printf("%f", sum);
	return 0;
}*/

int main(void)
{
	int a, b;
	scanf_s("%d %d", &a, &b);
	if (b % a == 0)
	{
		printf("%d", a + b);
	}
	else
	{
		printf("%d", b - a);
	}

	return 0;
}

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