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();
     int n = sc.nextInt();
    //int n = 3;
    int max = 1000;
    int answer = 0;
    for(int i = 1;i<max;i++){
      if((i%n == 0) && (i%2 == 0)){
        answer = i;
        break;
      }
    }
  }
}


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

import java.util.Scanner;

public class main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int count = 1;
		
		while(true) {
			if(count%N==0 && count%2==0) {
				System.out.println(count);
				break;
			}
			count++;
		}
		

	}

}

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

import java.util.Scanner;

  public class Main{
    public static void main(String[] args){
     Scanner sc = new Scanner();
     int n = sc.nextInt();
    //int n = 3;
    int max = 1000;
    int answer = 0;
    for(int i = 1;i<max;i++){
      if((i%n == 0) && (i%2 == 0)){
        answer = i;
        break;
      }
    }
    System.out.println(answer);
  }

}


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

import java.util.Scanner

  public class Main{
    public static void main(String[] args){
     Scanner sc = new Scanner();
     int n = sc.nextInt();
    //int n = 3;
    int max = 1000;
    int answer = 0;
    for(int i = 1;i<max;i++){
      if((i%n == 0) && (i%2 == 0)){
        answer = i;
        break;
      }
    }
    System.out.println(answer);
  }

}


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

  public class Main{
    public static void main(String[] args){
     Scanner sc = new Scanner();
     int n = sc.nextInt();
    //int n = 3;
    int max = 1000;
    int answer = 0;
    for(int i = 1;i<max;i++){
      if((i%n == 0) && (i%2 == 0)){
        answer = i;
        break;
      }
    }
    System.out.println(answer);
  }

}


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

import java.util.Scanner;


public class main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int count =1;
		
		while(true) {
			if(count%2==0 && count%N==0) {
				System.out.print(count);
				break;
			}
		}
		

	}

}

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

import java.util.Scanner;
public class Problem1 {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a;
		if(n % 2 == 1){
			a = n * 2;
		}
		else{
			a = n;
		}
		System.out.println(a);
	}
}

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

  public class Main{
    public static void main(String[] args){
    // Scanner sc = new Scanner();
    // int n = sc.nextInt();
    int n = 55;
    int max = 1000;
    int answer;
    for(int i = 0;i<max;i++){
      if((i%n == 0) && (i%2 == 0)){
        answer = i;
      }
    }
    System.out.println(answer);
  }

}

Compiler output:
Main.java:13: error: variable answer might not have been initialized
    System.out.println(answer);
                       ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define all(a)a.begin(),a.end()
using ll=long long;
const int INF = 1<<30;
const ll INFll =1LL<<62;
const int mod= int(1e9)+7;
using P = pair<ll,ll>;
using ld=long double;

int main(){
   ll n;cin >>n;
   ll g=__gcd(2,n);
   ll lcm=n*2/g;
   cout <<lcm<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: no matching function for call to '__gcd(int, ll&)'
   14 |    ll g=__gcd(2,n);
      |         ~~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:14:14: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
   14 |    ll g=__gcd(2,n);
      |         ~~~~~^~~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
int  main(){
    int N;
    cin>>N;
    cout<<2*N/__gcd(2,N)<<endl;
}

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

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

int main() {
  int N;
  cin >> N;
  
  if ( N%2 = 0 ) {
    cout << N << endl;
  }
  else {
    cout << 2*N << endl;
  }
    
}


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

1#include <bits/stdc++.h>
#define rep(i,n); for(int i = 0;i < (n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
long double pi = acos(-1);
const int INF = 1001001001;


// 最小公倍数を求める
int euqlid (int a, int b){
  int temp;
  temp = a % b;
  if(temp == 0)return b;
  return euqlid(b,temp);
}
ll conbination(ll a,ll b){
  ll u = 1;
  ll d = 1;
  while(b != 0){
    u *= a;
    d *= b;
    a--;
    b--;
  }
  return u / d;
}
int strtoint(char s){
  return (int(s-'0'));
}
int fact(int n){
  if(n == 1)return 1;
  return n * fact(n-1);
  }


int main(){
  int n;int ans = 0;
  cin >> n;
  if(n % 2 == 0)ans = n;
  else ans = n * 2;
  cout << ans << endl;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | 1#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1#include <bits/stdc++.h>
      | ^
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<int,int> P;
      |         ^~~~
a.cc:6:18: error: 'acos' was not declared in this scope
    6 | long double pi = acos(-1);
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:39:3: error: 'cin' was not declared in this scope
   39 |   cin >> n;
      |   ^~~
a.cc:42:3: error: 'cout' was not declared in this scope
   42 |   cout << ans << endl;
      |   ^~~~
a.cc:42:18: error: 'endl' was not declared in this scope
   42 |   cout << ans << endl;
      |                  ^~~~
Language: C++

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

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

int main() {
  int n;
  cin>>n;
  if(n%2==0){
    cout<<n<<endl;
  }
  else{
    cout<<2*n<<endl;
  }
}

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

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

int main(){
  long long n; cin >> n;
  cout << 2 * n /__gcd(2, n) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: no matching function for call to '__gcd(int, long long int&)'
    6 |   cout << 2 * n /__gcd(2, n) << endl;
      |                  ~~~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:6:23: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
    6 |   cout << 2 * n /__gcd(2, n) << endl;
      |                  ~~~~~^~~~~~
Language: C++

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

int main() {
  int N;
  cin>>N;
  if(N%2==0){
    cout<<N<<endl;
  }
  else{
    cout<<2*n<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'n' was not declared in this scope
   11 |     cout<<2*n<<endl;
      |             ^
Language: C++

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

int main() {
  int A;
  cin >> A;
if(A % 2 == 0){
cout << A << endl;
}
  else{
cout << 2 * A << endl;
  }


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

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

int main() {
  int A;
  cin >> A;
if(A % 2 == 0){
cout << A << endl;
  else{
cout << 2 * A << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else{
      |   ^~~~
a.cc:7:15: note: to match this '{'
    7 | if(A % 2 == 0){
      |               ^
a.cc:11:4: error: expected '}' at end of input
   11 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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


int main() {
  int n;
  cin >> n;
  if(n%2 = 0) cout << n << endl;
  else cout << 2*n << endl;
  return 0;
}

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

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


int main() {
  int n;
  cin >> n;
  if(n%2 = 0) cout << n;
  else cout << 2*n << endl;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std ;
int main(){
int n ;
cin>>n ;
If(n%2) cout<<n*2<<endl ;
else cout<<n<<endl ;

return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'If' was not declared in this scope
    6 | If(n%2) cout<<n*2<<endl ;
      | ^~
a.cc:7:1: error: 'else' without a previous 'if'
    7 | else cout<<n<<endl ;
      | ^~~~
Language: C++

/* Author - thiolhub */

#include <bits/stdc++.h>

using namespace std;

#define ll              long long int
#define ld              long double
#define db              double
#define pi              3.1415926535897932384626
#define PI              acos(-1.0)
#define endl            "\n"
#define mod             1000000007
#define mk              make_pair
#define pb              push_back
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(t)            ll t; cin>>t; while(t--)
#define sc(a)	        scanf("%lld",&a);
#define pr(a)	        printf("%lld\n",a)
#define f(i,a,n)		for(ll i=a;i<n;i++)
#define m(a)		    memset(a,0,sizeof(a))
#define FastIO          ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)



int main(){ FastIO;

int n;cin>>n;
if(n%2==0) cout<<n;
else cout<<n*2



return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:15: error: expected ';' before 'return'
   37 | else cout<<n*2
      |               ^
      |               ;
......
   41 | return 0;
      | ~~~~~~
Language: Java

import util.java.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int [] A = new int[N];
    for(int  i= 0;i<N;i++){
      A[i] = sc.nextInt();
    }
    Arrays.sort(A);
    System.out.println(A[N-1]-A[0]);
  }
}
    


Compiler output:
Main.java:1: error: package util.java does not exist
import util.java.*;
^
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
Main.java:11: error: cannot find symbol
    Arrays.sort(A);
    ^
  symbol:   variable Arrays
  location: class Main
4 errors
Language: Java

import java.util.*;
 
class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.newInt();
      int [] A = new int[N];
      int ans = 0;
      for(int i=0;i<N;i++){
        A[i] = sc.nextInt();
      }
      int min = 100;
      int max = -1;
      for(int i=0;i<N;i++){
        if(A[i]>max){
          max = A[i];
        }
        if(A[i]<min){
          min = A[i];
        }
        System.out.println(max-min);
      }
    }
}


Compiler output:
Main.java:6: error: cannot find symbol
      int N = sc.newInt();
                ^
  symbol:   method newInt()
  location: variable sc of type Scanner
1 error
Language: C

#include<stdio.h>

int main(void)
{
	int n;
	scanf("%d",&n);
	if(n%2==0)
		printf("%d",n);
	else
		printf("%d"n*2);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:28: error: expected ')' before 'n'
   10 |                 printf("%d"n*2);
      |                       ~    ^
      |                            )
Language: C

#include <stdio.h>
int main (void)
{
    int R;
    scanf("%d",&R);
    if(R%2=0)
        printf("%d\n",R);
    else
        printf("%d\n",R*2);
    return 0 ;
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main() {
    int N;
    cin >> N;
    cout << a*b/gcd(2,N) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'a' was not declared in this scope
   11 |     cout << a*b/gcd(2,N) << endl;
      |             ^
a.cc:11:15: error: 'b' was not declared in this scope
   11 |     cout << a*b/gcd(2,N) << endl;
      |               ^
Language: C++

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


int main(){
       ll n;scanf("%lld",&n);
       if(n%2==0) printf("%lld",n);
       else printf("%lld",n*2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'll' was not declared in this scope
    6 |        ll n;scanf("%lld",&n);
      |        ^~
a.cc:6:27: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |        ll n;scanf("%lld",&n);
      |                           ^
      |                           yn
Language: C

#include <stdio.h>
int main(){
	int n, x;
	scanf("%d", &n);
	if(n % 2 == 0){
		x = n;
	printf("%d", x)
}
	else{
		x = n * 2;
			printf("%d", x);
	}	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:24: error: expected ';' before '}' token
    7 |         printf("%d", x)
      |                        ^
      |                        ;
    8 | }
      | ~
Language: C++

using namespace std;

​

int main()

{

    int N;

    cin >> N;


    if (N % 2 == 0)

        cout << N << endl;

    else

        cout << 2*N << endl;

​

    return 0;

}

Compiler output:
a.cc:3:1: error: '\U0000200b' does not name a type
    3 | ​
      |
Language: Java

import java.util.Scanner;

public class N {

	public static void main(String[] args) {
		
		 Scanner sc = new Scanner(System.in);
		 
		 int N, cont = 1;
		 
		 N = sc.nextInt();
		 
		 while (true) {
			 if (cont % 2 == 0 && cont % N == 0)
				 break;
			 
			 cont++;
		 }
		 
		 System.out.println(cont);

	}

}

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

#include<stdio.h>
int main(){
    int N,i=2;
    scanf("%d",&N);
    i=N;
    while(1){
        if(((i%2)==0) && ((i%N)==0)){
            break;
        }
        i=i*2
    }
    printf("%d",i);
    return 0;    
}

Compiler output:
main.c: In function 'main':
main.c:10:14: error: expected ';' before '}' token
   10 |         i=i*2
      |              ^
      |              ;
   11 |     }
      |     ~
Language: C

#include <iostream>

using namespace std;

int main()
{
    int r;
    
    cin>>r;
    if(r%2==0){
        cout<<r;
    }else{
        r=r*2;
        cout<<r;
    }

    return 0;
}

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

import java.util.Scanner;

public class RegistroDeNome {

	public static void main(String[] args) {
		
		 Scanner sc = new Scanner(System.in);
		 
		 int N, cont = 1;
		 
		 N = sc.nextInt();
		 
		 while (true) {
			 if (cont % 2 == 0 && cont % N == 0)
				 break;
			 
			 cont++;
		 }
		 
		 System.out.println(cont);

	}

}


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

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

int main(){

    int n, i=0, div=1, flag=0;
    cin >> n;
    while(!flag){
        if(i % n == 0 && i % 2 == 0){
            div = i;
            flag = 1;
        }
    }
    cout << div << endl;
    return 0;
}

Compiler output:
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include iostream
      |          ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | #include iostream
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << div << endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:20: error: 'endl' was not declared in this scope
   15 |     cout << div << endl;
      |                    ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | #include iostream
Language: C++

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

#define ll long long
#define ar array

int main() {

    ios::sync_with_stdio(false);
    
    int N;
    
    cin >> N;
    
    if (N%2 ==0){
    	cout << N << endl; 
	}else{
		cout << N*2 << endl;
	}
    
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected '}' at end of input
   21 |     return 0;
      |              ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <numeric>
 
#define rep(n) for(int i = 0; i < n; i++)
 
using namespace std;
 
int main () {
  long long N; cin >> N;
  vector<long long> a;
 
  rep(N) {
    long long b; cin >> b;
    a.push_back(b);
  }
 
  vector<long long> v;
  vector<long long> va;
 
  rep(N) {
    v.push_back(a[i] - (i + 1));
  }
 
  sort(v.begin(), v.end());
 
  int cet;
 
  if(N%2 != 0) {
    cet = v[(N - 1) / 2];
  } else {
    cet = (v[N / 2] + v[(N - 2) / 2]) / 2;
  }
 
 
  rep(N) {
    va.push_back(abs(a[i] - (i + 1 + cet)));
  }
 
  long long i = 0
    rep(N) {
    i += va[i];
  } 
  
  cout << i << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ',' or ';' before 'for'
    8 | #define rep(n) for(int i = 0; i < n; i++)
      |                ^~~
a.cc:44:5: note: in expansion of macro 'rep'
   44 |     rep(N) {
      |     ^~~
a.cc:8:41: error: expected ';' before ')' token
    8 | #define rep(n) for(int i = 0; i < n; i++)
      |                                         ^
a.cc:44:5: note: in expansion of macro 'rep'
   44 |     rep(N) {
      |     ^~~
Language: C++


//#include <iostream>
#include <algorithm>
#include <cstring>
//#include <set> //multiset  set<int,greater<int>>大到小
//#include <vector>// ::iterator it;
//#include <stack>
//#include <cmath> // auto &Name : STLName  Name.
//#include <utility>
//#include <sstream>
//#include <string>
#define mod 1000000007
#define mod9 998244353
typedef unsigned long long ull;
typedef long long ll;
typedef double db;
typedef long double ld;
const db eps=1e-10;
const int INF = 0x3f3f3f3f;
const ll inf=0x3f3f3f3f3f3f3f3f;
const int N=1e3+5;
using namespace std;
int n,m,k=0;
int main(){
    scanf("%d",&n);
    if(n%2) printf("%d\n",2*n);
    else printf("%d\n",n);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'scanf' was not declared in this scope
   25 |     scanf("%d",&n);
      |     ^~~~~
a.cc:26:13: error: 'printf' was not declared in this scope
   26 |     if(n%2) printf("%d\n",2*n);
      |             ^~~~~~
a.cc:5:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    4 | #include <cstring>
  +++ |+#include <cstdio>
    5 | //#include <set> //multiset  set<int,greater<int>>大到小
a.cc:27:10: error: 'printf' was not declared in this scope
   27 |     else printf("%d\n",n);
      |          ^~~~~~
a.cc:27:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
using namespace std;

__int64 gcd(__int64 a,__int64 b) {
	__int64 c;
	while(a%b) {
		c=a%b;
		a=b;
		b=c;
	}
	return c;
}

int main() {
	__int64 n,g,ans;
	cin>>n;
	g=gcd(n,2);
	ans=2*n/g;
	cout<<ans;
	return 0;
}

Compiler output:
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | __int64 gcd(__int64 a,__int64 b) {
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:15:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   15 |         __int64 n,g,ans;
      |         ^~~~~~~
      |         __int64_t
a.cc:16:14: error: 'n' was not declared in this scope
   16 |         cin>>n;
      |              ^
a.cc:17:9: error: 'g' was not declared in this scope
   17 |         g=gcd(n,2);
      |         ^
a.cc:17:11: error: 'gcd' was not declared in this scope
   17 |         g=gcd(n,2);
      |           ^~~
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |         ans=2*n/g;
      |         ^~~
      |         abs
Language: C

#include<stdio.h>
int main()
{
int a,b;
  scanf("%d",&a);
if(a|2==1)
  {
  b=a*2;
   }
else
  {
   b=a
   }
  printf("%d",b);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: expected ';' before '}' token
   12 |    b=a
      |       ^
      |       ;
   13 |    }
      |    ~
Language: C

#include<stdio.h>
int main ()
{
int n,A;
scanf ("%d",&n);
if(n%2==0)
{
printf("%d",&n);
}
else
{
A=n*2;
printf("%d",A);
}

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  
  if( N % 2 == 0 ){
    cout << N << enld;
  }else{
    cout << N * 2 << endl;
  }
  
}


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

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

}


Compiler output:
main.c: In function 'main':
main.c:14:5: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   14 |     getch();
      |     ^~~~~
      |     getc
Language: C++

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

int main(){
  ll n; cin >> n;
  cout<<(n%2==0?n:n*2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll n; cin >> n;
      |   ^~
a.cc:5:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   ll n; cin >> n;
      |                ^
      |                yn
Language: C++

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

int main(){
  ll cin >> n;
  cout<<(n%2==0?n:n*2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll cin >> n;
      |   ^~
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   cout<<(n%2==0?n:n*2);
      |          ^
      |          yn
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){ 
    int n;
    cin>>n;

    if(n%2==1)cout<<2*n;
    else cout<<n:
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before ':' token
    9 |     else cout<<n:
      |                 ^
      |                 ;
Language: C

#include<stdio.h>
int main(){
    int n;
    scanf("%d",&n);
    if(n%2) printf("%d\n",n*2);
    else printf("%d\n"n);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected ')' before 'n'
    6 |     else printf("%d\n"n);
      |                ~      ^
      |                       )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
long long a;
cin>>a;
cout<<2*a/__gcd(a,2)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: no matching function for call to '__gcd(long long int&, int)'
    6 | cout<<2*a/__gcd(a,2)<<endl;
      |           ~~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:6:16: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
    6 | cout<<2*a/__gcd(a,2)<<endl;
      |           ~~~~~^~~~~
Language: C++

#include its/stdc++.h>
using namespace std;
int n;
int main(){
    cin>>n;
    if(n%2==0)
		cout<<n;
    else
		cout<<n*2;
	cout<<endl;
    return 0;
}

Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include its/stdc++.h>
      |          ^~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include its/stdc++.h>
a.cc:7:17: error: 'cout' was not declared in this scope
    7 |                 cout<<n;
      |                 ^~~~
a.cc:7:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout<<n*2;
      |                 ^~~~
a.cc:9:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout<<endl;
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:15: error: 'endl' was not declared in this scope
   10 |         cout<<endl;
      |               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include its/stdc++.h>
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	cin>>a;
	printf(a%2==0?"%d",a : a*2);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    7 |         printf(a%2==0?"%d",a : a*2);
      |                ~~~~~~^~~~~~~~~~~~~
      |                      |
      |                      int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(String[] args);
    int n = sc.nextInt();
    int ans = n;
    if(!(ans % 2 == 0)){
      ans *= 2;
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:4: error: '.class' expected
    Scanner sc = new Scanner(String[] args);
                                      ^
Main.java:4: error: ';' expected
    Scanner sc = new Scanner(String[] args);
                                          ^
2 errors
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
   long int N,i;
    scanf("%ld",&N);
    for(i=1;;i++)
    {
        if(i%2==0&&i%N==0)
            break;
    }
    printf("%ld\n",i);

    return 0;


Compiler output:
main.c: In function 'main':
main.c:14:5: error: expected declaration or statement at end of input
   14 |     return 0;
      |     ^~~~~~
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
    long long int N,i;
    scanf("%lld",&N);
    while
    {
        if(i%2==0&&i%N==0)
            break;
    }
    printf("%lld\n",i);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:5: error: expected '(' before '{' token
    8 |     {
      |     ^
      |     (
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] x = new int[N];
    for(int i=0; i<N; i++)
      x[i] = sc.nextInt();
    int max = x[0];
    int min = x[0];
    for(int i = 1; i < x.length; i++){
      if(x[i] > max) max = x[i];
      if(x[i] < min) min = x[i];
    }
      
    }
    System.out.println(max - min);
  }
}


Compiler output:
Main.java:17: error: <identifier> expected
    System.out.println(max - min);
                      ^
Main.java:17: error: <identifier> expected
    System.out.println(max - min);
                          ^
Main.java:19: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int max = 0;
    int min = 0;
    for(int i=0; i<N; i++){
      int x = sc.nextInt();
      if(i == 0){ max = x; min = x}
      else{
        if(x > max) { max = x;}
        if(x < min) { min = x;}
      }
    }
    System.out.println(max - min);
  }
}

Compiler output:
Main.java:10: error: ';' expected
      if(i == 0){ max = x; min = x}
                                  ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] x = new int[N];
    int max = 0;
    int min = 0;
    for(int i=0; i<N; i++){
      x[i] = sc.nextInt();
      if(i == 0){ max = x[i]; min = x[i];}
      else{
        if(x[i] > max) { max = x[i];}
        if(x[i] < min) { min = x[i];}
      }
    }


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

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] x = new int[N];
    long max = 0;
    long min = 0;
    for(int i=0; i<N; i++){
      long x[i] = sc.nextLong();
      if(i == 0){ max = x[i]; min = x[i];}
      else{
        if(x[i] > max) { max = x[i];}
        if(x[i] < min) { min = x[i];}
      }
    }

Compiler output:
Main.java:10: error: ']' expected
      long x[i] = sc.nextLong();
             ^
Main.java:10: error: ';' expected
      long x[i] = sc.nextLong();
              ^
Main.java:16: error: reached end of file while parsing
    }
     ^
3 errors
Language: Java

import java.util.scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int max = 0;
    int min = 0;
    for(int i=0; i<N; i++){
      int x = sc.nextInt();
      if(i == 0){ max = x; min = x;}
      else{
        if(x > max) { max = x;}
        if(x < min) { min = x;}
      }
    }
    System.out.println( max - min);  
  }
}




Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:4: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

#include<iostream>
using namespace std;
int n;
int main()
{
cin>>n;
for(long long i=2;i<=9999999999999;i+=2;)
{if(i%n==0)
{cout<<i<<endl;
return 0;
}
}
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:40: error: expected ')' before ';' token
    7 | for(long long i=2;i<=9999999999999;i+=2;)
      |    ~                                   ^
      |                                        )
a.cc:7:41: error: expected primary-expression before ')' token
    7 | for(long long i=2;i<=9999999999999;i+=2;)
      |                                         ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include<map>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

int main() {
    int n;
    cin >> n;
        if (n % 2 == 0) cout << n << endl;
        else cout << 2 * n << endl;
    }
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n;
  cin>>n;
  long long int p=n;
  if(p%2==0 && p%n==0)
    {
		cout<<p<<endl;
    }
    else
      cout<<p*2<<endl;
  }
}


Compiler output:
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: Java

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

      int n = sc.nextInt();
      int[] data = new int[n];

      for (int i = 0;i<n ;i++ ) {
        data[i] = sc.nextInt();
      }
      Arrays.sort(data);

      System.out.println(data[n-1]-data[0]));

      }
    }


Compiler output:
Main.java:14: error: ';' expected
      System.out.println(data[n-1]-data[0]));
                                           ^
1 error
Language: Java

import java.util.*

public class Main {
	public static void main(String args[]) {
 		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int max = 0;
        int min = 0;
        int num = 0;
        for(int i=0;i<n;i++) {
        num = sc.nextInt();
        max = Math.max(max, num);
        min = Math.min(min, num);
        }
        
        System.out.println(max - min);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
 
using namespace std;
 
#define PB push_back
#define MP make_pairA
#define REP(i,n) for(int i=0;i<(n);i++)
int main()
{
    cin>>n;
    if(n%2==0)cout<<n<<endl;
    else cout<<n*2<<endl;
}

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

#include <iostream>

using namespace std;

int mian(){
    int n;
    cin >> n;
    if(n % 2 == 0){
        cout << n << endl;
    }
    else if(n % 2 == 1){
        cout << 2 * n << endl;
    }
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

#define int long long 

int main(){
  int n;
  cin>> n;
  
  int g = __gcd(2LL, n);
  cout << (2LL*n)/g << endl;
  
  return 0;
}
             

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <iostream>

using namespace std;

int arr[110];

int main() {
    int n, i;
    scanf("%d", &n);
    for(i = 0; i < n; i++)
        scanf("%d", &arr[i]);

    sort(arr, arr + n);
    cout << arr[n-1] - arr[0] << endl:
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(arr, arr + n);
      |     ^~~~
      |     short
a.cc:14:38: error: expected ';' before ':' token
   14 |     cout << arr[n-1] - arr[0] << endl:
      |                                      ^
      |                                      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v()  sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
/*    #ifndef ONLINE_JUDGE
      // for getting input from input.txt
      freopen("input.txt", "r", stdin);
      // for writing output to output.txt
      freopen("output.txt", "w", stdout);
  #endif*/
fast();
//ll  t;cin>>t;while(t--)
{
  ll a[3],n=3;
cin>>n;
ll ans= __gcd(n,2);
cout << ans << endl;
  

}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:14: error: no matching function for call to '__gcd(long long int&, int)'
   44 | ll ans= __gcd(n,2);
      |         ~~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:44:14: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   44 | ll ans= __gcd(n,2);
      |         ~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v()  sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
/*    #ifndef ONLINE_JUDGE
      // for getting input from input.txt
      freopen("input.txt", "r", stdin);
      // for writing output to output.txt
      freopen("output.txt", "w", stdout);
  #endif*/
fast();
//ll  t;cin>>t;while(t--)
{
  ll a[3],n=3;
cin>>n;
cout<< __gcd(n,2) << endl;
  

}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:13: error: no matching function for call to '__gcd(long long int&, int)'
   44 | cout<< __gcd(n,2) << endl;
      |        ~~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:44:13: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   44 | cout<< __gcd(n,2) << endl;
      |        ~~~~~^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int N;
  
  cin >> N;
  
  if(N%2==0)
    cout<<N
  else
    cout<<N*2
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before 'else'
   11 |     cout<<N
      |            ^
      |            ;
   12 |   else
      |   ~~~~