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

#include<iostream>
2.2.using namespace std;
3.3.int main(){
4.4.int a,b;
5.5.cin>>a>>b;
6.6.if (input_number=b/a){
7.7.  cout<<a+b<<endl;
8.8.}else if(input_nmber!b/a){
9.9.    cout<<a-b<<endl;
10.10.}
11.11.break;
12.12.return0;
13.13.}


Compiler output:
a.cc:2:1: error: too many decimal points in number
    2 | 2.2.using namespace std;
      | ^~~~~~~~~
a.cc:3:1: error: too many decimal points in number
    3 | 3.3.int main(){
      | ^~~~~~~
a.cc:4:1: error: too many decimal points in number
    4 | 4.4.int a,b;
      | ^~~~~~~
a.cc:5:1: error: too many decimal points in number
    5 | 5.5.cin>>a>>b;
      | ^~~~~~~
a.cc:6:1: error: too many decimal points in number
    6 | 6.6.if (input_number=b/a){
      | ^~~~~~
a.cc:7:1: error: too many decimal points in number
    7 | 7.7.  cout<<a+b<<endl;
      | ^~~~
a.cc:8:1: error: too many decimal points in number
    8 | 8.8.}else if(input_nmber!b/a){
      | ^~~~
a.cc:9:1: error: too many decimal points in number
    9 | 9.9.    cout<<a-b<<endl;
      | ^~~~
a.cc:10:1: error: too many decimal points in number
   10 | 10.10.}
      | ^~~~~~
a.cc:11:1: error: too many decimal points in number
   11 | 11.11.break;
      | ^~~~~~~~~~~
a.cc:12:1: error: too many decimal points in number
   12 | 12.12.return0;
      | ^~~~~~~~~~~~~
a.cc:13:1: error: too many decimal points in number
   13 | 13.13.}
      | ^~~~~~
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.2.using namespace std;
      | ^~~~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.3.int main(){
      | ^~~~~~~
Language: Java

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());
    
    if(a/b==0){
      System.out.println(a+b);
    }else{
      System.out.println(b-a);
    }
  }
}

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:2: error: 'c' was not declared in this scope
    8 |  c = a+b;
      |  ^
a.cc:9:3: error: 'd' was not declared in this scope
    9 |   d = b-a;
      |   ^
Language: C++

#include<iostream>
2.using namespace std;
3.intmain(void){
4.int a,b;
5.cin>>a>>b;
6.if (input_number=b/a){
7.  cout<<a+b<<endl;
8.}else if(input_nmber!b/a){
9.    cout<<a-b<<endl;
10.}
11.break;
12.return0;
13.}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.using namespace std;
      | ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.intmain(void){
      | ^~~~~~~~~
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;

  return 0;

}

Compiler output:
a.cc:17:12: error: extended character – is not valid in an identifier
   17 |   else ans=b–a;
      |            ^
a.cc: In function 'int main()':
a.cc:17:12: error: 'b\U00002013a' was not declared in this scope
   17 |   else ans=b–a;
      |            ^~~
Language: Java

    import java.util.Scanner;
    import java.util.InputMismatchException;
    public class Main{
      public static void main(String... args){
        try(Scanner scan = new Scanner(System.in)) {
          	String message = scan.next();
          	int a = Integer.valueOf(message.split(" ")[0]);
          	int b = Integer.valueOf(message.split(" ")[1]);
        }catch(InputMismatchException e) {
            System.out.println("0～9までの数値を入力してください");
            break;
         }
      }
      public static boolean isYakusuu(int a,int b){
        return b%a == 0;
      }
    }

Compiler output:
Main.java:11: error: break outside switch or loop
            break;
            ^
1 error
Language: Java

import java.util.*;

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

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

#include<iostream>
using namespace std;(void){
intmain(void){
int a,b;
cin>>a>>b;
if (input_number=b/a){
  cout<<a+b<<endl;
}else if(input_nmber!b/a){
    cout<<a-b<<endl;
}
break;
return0;
}

Compiler output:
a.cc:2:22: error: expected unqualified-id before 'void'
    2 | using namespace std;(void){
      |                      ^~~~
a.cc:2:22: error: expected ')' before 'void'
    2 | using namespace std;(void){
      |                     ~^~~~
      |                      )
Language: Java

import java.util.Scanner;
import java.util.InputMismatchException;
public class Main{
  public static void main(String... args){
    try(Scanner scan = new Scanner(System.in)) {
      	String message = scan.next();
      	int a = Integer.valueOf(message.split(" ")[0]);
      	int b = Integer.valueOf(message.split(" ")[1]);
    }catch(InputMismatchException e) {
        System.out.println("0～9までの数値を入力してください");
        break;
     }
  }
  public static boolean isYakusuu(int a,int b){
    return b%a == 0;
  }

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

public class Main {

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

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

import java.util.Scanner;
public class Main{
  public static void main(String... args){
    try(Scanner scan = new Scanner(System.in)) {
      	String message = scan.next();
      	int a = Integer.valueOf(message.split(" ")[0]);
      	int b = Integer.valueOf(message.split(" ")[1]);
    }catch(InputMismatchException e) {
        System.out.println("0～9までの数値を入力してください");
        break;
     }
  }
  public static boolean isYakusuu(int a,int b){
    return b%a == 0;
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    }catch(InputMismatchException e) {
           ^
  symbol:   class InputMismatchException
  location: class Main
Main.java:10: error: break outside switch or loop
        break;
        ^
2 errors
Language: Java

public class AandB {
        public static void main(String args[]) {
                int a = Integer.parseInt(args[0]);
                int b = Integer.parseInt(args[1]);

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

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

import java.util.Scanner;

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

       int a = scan.nextInt();
       int b = scan.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:4:13: error: expected ':' before 'static'
    4 |       public static void main(String args[]){
      |             ^~~~~~~
      |             :
a.cc:4:31: error: 'String' has not been declared
    4 |       public static void main(String args[]){
      |                               ^~~~~~
a.cc:16:5: error: expected ';' after class definition
   16 |    }
      |     ^
      |     ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:8: error: 'Scanner' was not declared in this scope
    5 |        Scanner scan = new Scanner(System.in);
      |        ^~~~~~~
a.cc:7:16: error: 'scan' was not declared in this scope
    7 |        int a = scan.nextInt();
      |                ^~~~
a.cc:11:11: error: 'System' was not declared in this scope
   11 |           System.out.println(a+b);
      |           ^~~~~~
a.cc:13:11: error: 'System' was not declared in this scope
   13 |           System.out.println(b-a);
      |           ^~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std‪;‬

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

Compiler output:
a.cc:2:19: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
    2 | using namespace std<U+202A>;<U+202C>
      |                    ~~~~~~~~ 
      |                    |       |
      |                    |       end of bidirectional context
      |                    U+202A (LEFT-TO-RIGHT EMBEDDING)
a.cc:2:17: error: 'std\U0000202a' is not a namespace-name
    2 | using namespace std‪;‬
      |                 ^~~
a.cc:2:21: error: '\U0000202c' does not name a type
    2 | using namespace std‪;‬
      |
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:8:14: error: extended character – is not valid in an identifier
    8 |   else cout<<b–a;
      |              ^
a.cc: In function 'int main()':
a.cc:8:14: error: 'b\U00002013a' was not declared in this scope
    8 |   else cout<<b–a;
      |              ^~~
Language: C++

#include <stdio.h>

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

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

return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'cout' was not declared in this scope
   10 | cout << b-a;
      | ^~~~
a.cc:12:1: error: 'cout' was not declared in this scope
   12 | cout << a+b;
      | ^~~~
Language: C++

program test
implicit none
integer::a,b,d
real(8)::c

read*,a,b

c=a/b

if c==0 then
d=a+b
else
d=b-a
end if

write*,d

Compiler output:
a.cc:1:1: error: 'program' does not name a type
    1 | program test
      | ^~~~~~~
Language: C++

#include "pch.h"

int main() {
    int A, B;
    std::cin >> A >> B;
    std::cout << (B + ((B % A) ? -A : A)) << std::endl;
}


Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'count' was not declared in this scope
   13 |         count << B - A << 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",B - A);
  }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d%d",&A &B);
      |                ~~ ^
      |                |
      |                int *
main.c:6:12: error: lvalue required as left operand of assignment
    6 |   if(B % A = 0){
      |            ^
Language: C++

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
)

var (
	readString func() string
	stdout     *bufio.Writer
)

func init() {
	readString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func readInt() int {
	return int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readInt()
	}
	return b
}

func readLengthAndSlice() (int, []int) {
	n := readInt()
	return n, readIntSlice(n)
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(stdout, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(stdout, args...)
}

func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// readString() string
// readInt() int
// readIntSlice(n int) []int
// readLengthAndSlice() []int

// -----------------------------------------------------------------------------

func main() {
	defer stdout.Flush()
	a := readInt()
	b := readInt()
	if b%a == 0 {
		println(a + b)
	} else {
		println(b - a)
	}
}

// -----------------------------------------------------------------------------


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:21:1: error: 'func' does not name a type
   21 | func newReadString(ior io.Reader) func() string {
      | ^~~~
a.cc:34:1: error: 'func' does not name a type
   34 | func readInt() int {
      | ^~~~
a.cc:38:1: error: 'func' does not name a type
   38 | func readInt64() int64 {
      | ^~~~
a.cc:46:1: error: 'func' does not name a type
   46 | func readIntSlice(n int) []int {
      | ^~~~
a.cc:54:1: error: 'func' does not name a type
   54 | func readLengthAndSlice() (int, []int) {
      | ^~~~
a.cc:59:1: error: 'func' does not name a type
   59 | func printf(f string, args ...interface{}) (int, error) {
      | ^~~~
a.cc:59:42: error: expected unqualified-id before ')' token
   59 | func printf(f string, args ...interface{}) (int, error) {
      |                                          ^
a.cc:63:1: error: 'func' does not name a type
   63 | func println(args ...interface{}) (int, error) {
      | ^~~~
a.cc:63:33: error: expected unqualified-id before ')' token
   63 | func println(args ...interface{}) (int, error) {
      |                                 ^
a.cc:67:1: error: 'func' does not name a type
   67 | func eprintln(args ...interface{}) (int, error) {
      | ^~~~
a.cc:67:34: error: expected unqualified-id before ')' token
   67 | func eprintln(args ...interface{}) (int, error) {
      |                                  ^
a.cc:78:1: error: 'func' does not name a type
   78 | func main() {
      | ^~~~
Language: Java

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

import java.util.*;

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

       int n = 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:10: error: cannot find symbol
       if(b % a == 0)   System.out.println(a+b);
              ^
  symbol:   variable a
  location: class Main
Main.java:10: error: cannot find symbol
       if(b % a == 0)   System.out.println(a+b);
                                           ^
  symbol:   variable a
  location: class Main
Main.java:11: error: cannot find symbol
       else System.out.println(b-a);
                                 ^
  symbol:   variable a
  location: class Main
3 errors
Language: C

#include<stdio.h>
int main(){
  int A,B;
  scanf("%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:4:20: error: expected expression before '%' token
    4 |   scanf("%d %d",&A,%B);
      |                    ^
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", b-a);

}

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

#include <bits/stdc++.h>
#define inf 1000000000
#define maxs(x,y) (x = max(x , y))
#define mins(x,y) (x = min(x , y))
using namespace std;
typedef long long int ll;

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected initializer before 'cin'
   12 |   cin >> A >> B;
      |   ^~~
a.cc:14:6: error: 'B' was not declared in this scope
   14 |   if(B%A == 0){
      |      ^
Language: C++

#include <iostream>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: 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:9: 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:26: 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:10:9: error: 'count' was not declared in this scope
   10 |         count << B - A << endl;
      |         ^~~~~
a.cc:10:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         count << 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++

a, b = (int(i) for i in input().split())  
  
if a/b == 0:
	c = a + b
else:
	c = b - a
    
print(c)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b = (int(i) for i in input().split())
      | ^
Language: Java

import java.math.BigInteger;
import java.util.*;

import library.Other.Edge;

public class Main {
	
	private void doit(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			if(b % a == 0){
				System.out.println(a + b);
			}
			else{
				System.out.println(b - a);
			}
		}
	}


	private void debug(Object... o) {
		System.out.println("debug = " + Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().doit();
	}

}


Compiler output:
Main.java:4: error: package library.Other does not exist
import library.Other.Edge;
                    ^
1 error
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#define ll long long

int main(void){
	ll a, b;

	scanf("%lld%lld", &a, &b);

	if(b%a==0){
		printf("%lld\n", a+b);
	} else {
		peintf("%lld\n", b-a);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:17: error: implicit declaration of function 'peintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   16 |                 peintf("%lld\n", b-a);
      |                 ^~~~~~
      |                 printf
Language: C++

package main
  
import (
    "fmt"
)

func main() {
    var a, b int
    fmt.Scan(&a, &b)

    if b%a == 0 {
        fmt.Println(a + b)
    } else {
        fmt.Println(b - a)
    }

}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
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();
    
    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*;
                ^
1 error
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:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(b%a==0) 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:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   if(b%a==0) 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:8:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else 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:8:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   else 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>
#pragma GCC_compile("Ofast")
using namespace std;
typedef long long ll;

int main(){
    int A,B;

    cin>>A>>B;;
    if(B%A==0)
   cout<<T+N;
    else cout<<B-A; 
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'T' was not declared in this scope
   11 |    cout<<T+N;
      |          ^
a.cc:11:12: error: 'N' was not declared in this scope
   11 |    cout<<T+N;
      |            ^
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#define ll long long

int main(void){
	ll a, b;

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

	if(b%a==0){
		printf("%d\n", a+b);
	} else {
		peintf("%d\n", b-a);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:17: error: implicit declaration of function 'peintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   16 |                 peintf("%d\n", b-a);
      |                 ^~~~~~
      |                 printf
Language: C++

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

using namespace std;

int main(){

    int A, B = 0;
    cin >> A >> B;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: expected ';' before '}' token
   15 |         cout << A-B
      |                    ^
      |                    ;
   16 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	scanf("%d%d",&a,&b);
	printf("%d",b%a==0?a+b:b-a);


Compiler output:
a.cc: In function 'int main()':
a.cc:7:37: error: expected '}' at end of input
    7 |         printf("%d",b%a==0?a+b:b-a);
      |                                     ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |         cout << (b%a==0)?(a+b): (b-a) << endl;
      |                                 ~~~~~~^~~~~~~
Language: C++

#define debug_interval ','
#define dump_interval ' '
#define debug_toggle 1

//{
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
using namespace std;
#define hi cerr<<"hi"<<endl;
#define int long long
#define INT_MAX LLONG_MAX
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define fi first
#define se second
#define mp make_pair
#define rev reverse
#define dans dump(ans)
#define MOD 1000000007
#define amp(v,n) (v).count(n)?v[n]++:v[n]=1
#define sysp system("pause")
#define PI acos(-1)
#define ins insert
#define aer(v) (v).erase((v).begin(),(v).end()) 

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cerr<<endl;}
template<class...A> inline void debug_rest() {cerr<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cerr<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cerr<<first,debug_rest(rest...);}
//}

typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
template<int m>class mint{private:int i;public:mint() : i(0){}mint(int i): i((i%m+m)%m){}mint operator+(const mint& o){return o.i+i;}mint operator*(const mint& o){return o.i*i;}mint operator-(){return -i;}operator int() {return i;}};

//}

int n,m,k;
string s;

main(){
	cin>>n>>m;
	if(b%a==0)dump(m+n);
	else dump(m-n);
}






Compiler output:
a.cc:12:9: warning: "INT_MAX" redefined
   12 | #define INT_MAX LLONG_MAX
      |         ^~~~~~~
In file included from /usr/include/c++/14/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38,
                 from a.cc:8:
/usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note: this is the location of the previous definition
  120 | #define INT_MAX __INT_MAX__
      |         ^~~~~~~
a.cc:56:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   56 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:58:12: error: 'b' was not declared in this scope
   58 |         if(b%a==0)dump(m+n);
      |            ^
a.cc:58:14: error: 'a' was not declared in this scope
   58 |         if(b%a==0)dump(m+n);
      |              ^
Language: Java

import java.util.*;

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

        int 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:14: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int a, b;
	string s, t;
	cin >> a >> b;
	cin >> s >> t;
	cout << (b%a) ? (b-a) : (a+b) << endl;
}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:11:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   11 |         cout << (b%a) ? (b-a) : (a+b) << endl;
      |                                 ~~~~~~^~~~~~~
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'B' was not declared in this scope
   10 |   {cout << B - A << endl;}
      |            ^
a.cc:10:16: error: 'A' was not declared in this scope
   10 |   {cout << B - A << endl;}
      |                ^
a.cc:12:12: error: 'A' was not declared in this scope
   12 |   {cout << A + B << endl;}
      |            ^
a.cc:12:16: error: 'B' was not declared in this scope
   12 |   {cout << A + B << endl;}
      |                ^
Language: C++

#include<iostream>
#include <string>
#include<algorithm>
#include <set>
#include <cmath>
using namespace std;

int main(void) {
	ios::sync_with_stdio(false);
	int A, B;
	cin >> <<B;
	if (B%A == 0) cout << A + B;
	else cout B - A;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected primary-expression before '<<' token
   11 |         cin >> <<B;
      |                ^~
a.cc:13:18: error: expected ';' before 'B'
   13 |         else cout B - A;
      |                  ^~
      |                  ;
Language: C++

#include<cstdio>

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:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before '}' token
   11 |         printf("%d\n", b-a)
      |                            ^
      |                            ;
   12 |     }
      |     ~
Language: C++

#include<iostream>
#include<math.h>
#include<algorithm>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)

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:14:9: error: lvalue required as left operand of assignment
   14 |     if(b%a = 0) cout << a+b << endl;
      |        ~^~
Language: C

#include<stdio.h>
  2 
  3 int main(){
  4         int a,b;
  5         scanf("%d%d",&a,&b);
  6         if(b%a==0)printf("%d\n",a+b);
  7         if(b%a!=0)printf("%d\n",b-a);
  8         return 0;
  9 }    

Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2
      |   ^
Language: C++

package main

import (
	"fmt"
	"os"
	"strconv"
	"bufio"
	"strings"
)

// define
var (
	sc = bufio.NewScanner(os.Stdin)
)

func bordersInt(in_map [][]int, invalid int) [][]int{
	H, W := len(in_map), len(in_map[0])
	out_map := make([][]int, H+2)
	for h:=0; h<H+2; h++ {
		out_map[h] = make([]int, W+2)
		for w:=0; w<W+2; w++ {
			out_map[h][w] = invalid
		}
	}
	for h:=0; h<H; h++{
		for w:=0; w<W; w++{
			out_map[h+1][w+1] = in_map[h][w] 
		}
	}
	return out_map
}

func bordersString(in_map [][]string, invalid string) [][]string{
	H, W := len(in_map), len(in_map[0])
	out_map := make([][]string, H+2)
	for h:=0; h<H+2; h++ {
		out_map[h] = make([]string, W+2)
		for w:=0; w<W+2; w++ {
			out_map[h][w] = invalid
		}
	}
	for h:=0; h<H; h++{
		for w:=0; w<W; w++{
			out_map[h+1][w+1] = in_map[h][w] 
		}
	}
	return out_map
}

func scanIntLine(len int) []int{
	arr := make([]int, len)
	for i:=0; i<len; i++{
		sc.Scan()
		tmp, err := strconv.Atoi(sc.Text())
		if err == nil{
			arr[i] = tmp
		}
	}
	return arr
}

func scanStringLine(len int) []string{
	arr := make([]string, len)
	for i:=0; i<len; i++{
		sc.Scan()
		arr[i] = sc.Text()
	}
	return arr
}

func scanIntSplit(len int) []int{
	arr := make([]int, len)
	sc.Scan()
	for i, v := range strings.Split(sc.Text(), " "){
		tmp, err := strconv.Atoi(v)
		if err == nil{
			arr[i] = tmp
		}
	}
	return arr
}

func main(){
	var A, B int
	fmt.Scan(&A, &B)
	if B%A == 0 {
		fmt.Println(A+B)
	} else {
		fmt.Println(B-A)
	}
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:33:1: error: 'func' does not name a type
   33 | func bordersString(in_map [][]string, invalid string) [][]string{
      | ^~~~
a.cc:50:1: error: 'func' does not name a type
   50 | func scanIntLine(len int) []int{
      | ^~~~
a.cc:62:1: error: 'func' does not name a type
   62 | func scanStringLine(len int) []string{
      | ^~~~
a.cc:71:1: error: 'func' does not name a type
   71 | func scanIntSplit(len int) []int{
      | ^~~~
a.cc:83:1: error: 'func' does not name a type
   83 | func main(){
      | ^~~~
Language: Java

import java.util.Scanner;

public class Main {

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

}


Compiler output:
Main.java:9: error: cannot find symbol
		System.out.println((B %A == 0)?A + B:B- a);
		                                        ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

var toInt = x=>parseInt(x,10);
var toIntArr = arr=>arr.map(x=>toInt(x));
var abs = x=>x>0?x:-x;
function min(){var rest=arguments,v=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]<v)v=rest[i];return v}
function max(){var rest=arguments,v=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]>v)v=rest[i];return v}
function gcd(){var rest=arguments,v=rest[0],temp=(a,b)=>b?temp(b,a%b):a;for(var i=1;i<rest.length;i++)v=temp(v,rest[i]);return v}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
 
function Main(input){
	var input = input.split(' ');
	var a = toInt(input[0]);
	var b = toInt(input[1]);
	var ans = b%a===0? a+b : b-a;

	console.log(ans);

	return 0;
}



Compiler output:
a.cc:1:1: error: 'var' does not name a type
    1 | var toInt = x=>parseInt(x,10);
      | ^~~
a.cc:2:1: error: 'var' does not name a type
    2 | var toIntArr = arr=>arr.map(x=>toInt(x));
      | ^~~
a.cc:3:1: error: 'var' does not name a type
    3 | var abs = x=>x>0?x:-x;
      | ^~~
a.cc:4:1: error: 'function' does not name a type; did you mean 'union'?
    4 | function min(){var rest=arguments,v=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]<v)v=rest[i];return v}
      | ^~~~~~~~
      | union
a.cc:5:1: error: 'function' does not name a type; did you mean 'union'?
    5 | function max(){var rest=arguments,v=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]>v)v=rest[i];return v}
      | ^~~~~~~~
      | union
a.cc:6:1: error: 'function' does not name a type; did you mean 'union'?
    6 | function gcd(){var rest=arguments,v=rest[0],temp=(a,b)=>b?temp(b,a%b):a;for(var i=1;i<rest.length;i++)v=temp(v,rest[i]);return v}
      | ^~~~~~~~
      | union
a.cc:7:5: error: expected constructor, destructor, or type conversion before '(' token
    7 | Main(require("fs").readFileSync("/dev/stdin", "utf8"));
      |     ^
a.cc:9:1: error: 'function' does not name a type; did you mean 'union'?
    9 | function Main(input){
      | ^~~~~~~~
      | union
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
#include <deque>
#include <numeric>
#include <bits/stdc++.h>
#include <utility>
#include <iomanip>

#define ALL(obj) (obj).begin(), (obj).end()
#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a); (b) <= i; i--)
#define REP(i,n) for(int i = 0; i < (n); i++)
#define RREP(i,n) for(int i = n; n <= i; i--)
#define ABS(a) ((a < 0) ? ((-1)*(a)) : (a))
#define elif else if
#define MOD 1000000007
#define INF (1<<30)

using namespace std;

#define ld long double
#define ll long long

map <int ,int> mpa,mpb;
typedef pair<ll, ll> P;
priority_queue<P, vector<P>, greater<P>> pque;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll ans;
  ll x,y;
  cin >> x >> y;
  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:44:6: error: 'B' was not declared in this scope
   44 |   if(B%A==0){
      |      ^
a.cc:44:8: error: 'A' was not declared in this scope
   44 |   if(B%A==0){
      |        ^
Language: C++

#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int a, b;
	string s, t;
	cin >> a >> b;
	cin >> s >> t;
	cout << (b%a) ? (b-a) : (a+b)) << endl;
}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:11:38: error: expected ';' before ')' token
   11 |         cout << (b%a) ? (b-a) : (a+b)) << endl;
      |                                      ^
      |                                      ;
Language: C

#include <stdio.h>

int main(){
	int a,b
	
	scanf("%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:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |         scanf("%d %d",&a,%b);
      |         ^~~~~
main.c:8:12: error: 'b' undeclared (first use in this function)
    8 |         if(b%a==0)      printf("%d",a+b);
      |            ^
main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <utility>
#include <vector>
#include <queue>
#include <stack>
#include <array>
#include <algorithm>
#include <numeric>
#include <limits>
#include <string>
#include <regex>
#include <cstdio>
#include <cstring>
#include <cmath>
#define INF 2000000000
#define REP(i,b,n) for(int i = (b); i < n; i++)
#define rREP(i,b,n) for(int i = n; i >= b; i--)
using namespace std;
using ll = long long;
using pi = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
const string lowercase = "abcdefghijklmnopqrstuvwxyz";
const string uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int gcd(int a, int b){return b ? gcd(b, a % b): a;}
void yes(){cout << "Yes" << endl; return;}
void no(){coud << "No" << endl; return;}

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 'void no()':
a.cc:29:11: error: 'coud' was not declared in this scope
   29 | void no(){coud << "No" << endl; return;}
      |           ^~~~
Language: C++

#include<cstdio>

int main() {
    int a, b;

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

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before '}' token
   11 |         printf("%d\n", b-a)
      |                            ^
      |                            ;
   12 |     }
      |     ~
Language: C++

#define debug_interval ','
#define dump_interval ' '
#define debug_toggle 1

//{
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
using namespace std;
#define hi cerr<<"hi"<<endl;
#define int long long
#define INT_MAX LLONG_MAX
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define fi first
#define se second
#define mp make_pair
#define rev reverse
#define dans dump(ans)
#define MOD 1000000007
#define amp(v,n) (v).count(n)?v[n]++:v[n]=1
#define sysp system("pause")
#define PI acos(-1)
#define ins insert
#define aer(v) (v).erase((v).begin(),(v).end()) 

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cerr<<endl;}
template<class...A> inline void debug_rest() {cerr<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cerr<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cerr<<first,debug_rest(rest...);}
//}

typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
template<int m>class mint{private:int i;public:mint() : i(0){}mint(int i): i((i%m+m)%m){}mint operator+(const mint& o){return o.i+i;}mint operator*(const mint& o){return o.i*i;}mint operator-(){return -i;}operator int() {return i;}};

//}

int n,m,k;
string s;

int main(){
	cin>>n>>m;
	if(b%a==0)dump(m+n);
	else dump(m-n);
}






Compiler output:
a.cc:12:9: warning: "INT_MAX" redefined
   12 | #define INT_MAX LLONG_MAX
      |         ^~~~~~~
In file included from /usr/include/c++/14/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38,
                 from a.cc:8:
/usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note: this is the location of the previous definition
  120 | #define INT_MAX __INT_MAX__
      |         ^~~~~~~
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:58:12: error: 'b' was not declared in this scope
   58 |         if(b%a==0)dump(m+n);
      |            ^
a.cc:58:14: error: 'a' was not declared in this scope
   58 |         if(b%a==0)dump(m+n);
      |              ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <stdio.h>
using namespace std;

//typedefリスト
typedef vector<int> vint;
typedef vector<string> vstr;

int main(void) {
	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:15:15: error: expected initializer before 'B'
   15 |         int A B;
      |               ^
a.cc:16:16: error: 'A' was not declared in this scope
   16 |         cin >> A >> B;
      |                ^
a.cc:16:21: error: 'B' was not declared in this scope
   16 |         cin >> A >> B;
      |                     ^
Language: C

#include <stdio.h>

int main(){
	int a,b
	
	scanf("%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:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |         scanf("%d %d",&a,%b);
      |         ^~~~~
main.c:8:12: error: 'b' undeclared (first use in this function)
    8 |         if(b%a==0)      printf("%d",a+b);
      |            ^
main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:28: error: expected ')' before 'b'
    9 |         else    printf("%d"b-a);
      |                       ~    ^
      |                            )
Language: C++

#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int a, b;
	string s, t;
	cin >> a >> b;
	cin >> s >> t;
	cout << (A%B ? (B-A) : (A+B)) << endl;
}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:11:18: error: 'A' was not declared in this scope
   11 |         cout << (A%B ? (B-A) : (A+B)) << endl;
      |                  ^
a.cc:11:20: error: 'B' was not declared in this scope
   11 |         cout << (A%B ? (B-A) : (A+B)) << endl;
      |                    ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF LLONG_MAX
#define eps LDBL_EPSILON
#define moder 100000
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
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:
cc1plus: error: '::main' must return 'int'
Language: C++

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

int main()
{
  int n, m, cnt = 0;
  cin >> n >> m;
  
  vector<bool> res(m);
  for(int i=0; i<m; i++) res[i] = true;
  
  for(int i=0; i<n; i++)
  {
    vector<bool> res_tmp(m);
    for(int j=0; j<m; j++) res_tmp[j] = false;
    
    int k;
    cin >> k;
    
    for(int j=0; j<k; j++)
    {
      int a;
      cin >> a;
      res_tmp[a] = true;
    }
    
    for(int j=0; j<m; j++)
    {
      if(res_tmp[j] == false)
        res[j] = false;
    }
  }
  
  for(int i=0; i<m; i++)
  {
    if(res_tmp[i] == true)
      cnt++;
  }
  
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:8: error: 'res_tmp' was not declared in this scope
   37 |     if(res_tmp[i] == true)
      |        ^~~~~~~