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

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
 
typedef pair<ll,ll> pairs;
vector<pairs> p;
bool pairCompare(const pair<double,ll>& firstElof, const pair<double,ll>& secondElof){
    return firstElof.first < secondElof.first;
}
#define MAX_N 1000100
bool x[MAX_N];
ll num[MAX_N];
ll fibl[MAX_N]={0};
 
ll fib(ll a){
    if (fibl[a]!=0)return fibl[a];
    if (a==0){
        return 0;
    }else if (a==1){
        return 1;
    }
    return fibl[a]=fib(a-1)+fib(a-2);
}
 
ll eratosthenes(ll n) {
    int p = 0;
    for (ll i=0; i<=n; ++i) x[i] = true;
    x[0] = x[1] = false;
    for(int i=2; i<=n; ++i) {
        if(x[i]) {
            p++;
            for(int j=2*i; j<=n; j+=i) x[j] = false;
        }
        
        num[i] = p;
    }
    return p;
}
 
ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}
 
ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

int main(){
    ll 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:64:5: error: 'else' without a previous 'if'
   64 |     else cout << n*2 << endl;
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected primary-expression before ')' token
   12 |   for(int i=2;i<1000000000;i=++){
      |                                ^
Language: C++

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

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPl(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define REPRl(i, n) for(ll i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < (int)n; i++)
#define FORl(i, m, n) for(ll i = m; i < (ll)n; i++)
#define ALL(v) v.begin(), v.end()
ll gcd(ll a,ll b) {
  return b? gcd(b,a%b): a;  
}
ll lcm(ll a,ll b) {
  return a*b/gcd(a,b);
}
bool isLowerCase(char c){
  return (c>='a'&&c<='z');
}
int main() {
  ll n;cin>>n;
  ll ans;
  for(ll i=2;i*i<N+1;i+=2){
    if(n%i==0){
      ans=i;
      break;
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:18: error: 'N' was not declared in this scope
   24 |   for(ll i=2;i*i<N+1;i+=2){
      |                  ^
Language: C++

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

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPl(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define REPRl(i, n) for(ll i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < (int)n; i++)
#define FORl(i, m, n) for(ll i = m; i < (ll)n; i++)
#define ALL(v) v.begin(), v.end()
ll gcd(ll a,ll b) {
  return b? gcd(b,a%b): a;  
}
ll lcm(ll a,ll b) {
  return a*b/gcd(a,b);
}
bool isLowerCase(char c){
  return (c>='a'&&c<='z');
}
int main() {
  ll n;cin>>n;
  ll ans;
  for(ll i=2,i*i<N+1,i+=2){
    if(n%i==0){
      ans=i;
      break;
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: expected ';' before '*' token
   24 |   for(ll i=2,i*i<N+1,i+=2){
      |               ^
      |               ;
a.cc:24:15: error: invalid type argument of unary '*' (have 'll' {aka 'long long int'})
   24 |   for(ll i=2,i*i<N+1,i+=2){
      |               ^~
a.cc:24:18: error: 'N' was not declared in this scope
   24 |   for(ll i=2,i*i<N+1,i+=2){
      |                  ^
a.cc:24:26: error: expected ';' before ')' token
   24 |   for(ll i=2,i*i<N+1,i+=2){
      |                          ^
      |                          ;
Language: C++

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

int main()
{
  int n;
  cin >> n;
  int min = 0, max = 0;
  for (int i=0; i<n; i++) {
    int a;
    cin >> a;
    if (min > ary[i]) min = a;
    if (max < ary[i]) max = a;
  }
  cout << max - min << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'ary' was not declared in this scope
   13 |     if (min > ary[i]) min = a;
      |               ^~~
a.cc:14:15: error: 'ary' was not declared in this scope
   14 |     if (max < ary[i]) max = a;
      |               ^~~
Language: C++

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

int main()
{
  int n;
  cin >> n;
  int ary[n];
  int min = 0, max = 0;
  for (int i=0; i<n i++) {
    cin >> ary[i];
    if (min > ary[i]) min = ary[i];
    if (max < ary[i]) max = ary[i];
  }
  cout << max - min << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'i'
   11 |   for (int i=0; i<n i++) {
      |                    ^~
      |                    ;
Language: C++

/*
このコード、と～おれ!
Be accepted!
∧＿∧　
（｡･ω･｡)つ━☆・*。
⊂　　 ノ 　　　・゜+.
　しーＪ　　　°。+ *´¨)
 　　　　　　　　　.· ´¸.·*´¨) ¸.·*¨)
		  　　　　　　　　　　(¸.·´ (¸.·'* ☆
					*/

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>

#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define rep2(i, n) for(int i = 2; i < (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.50lf\n", a)//少数出力
#define printdbd(a) printf("%.16lf\n", a)//少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str())//string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2)//等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg)/360.0)*2.0*PI)
#define rad_to_deg(rad) (((rad)/2.0/PI)*360.0)
#define Please return
#define AC 0

using ll = long long;

constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const double PI = acos(-1);

using namespace std;

void scans(string& str) {
	char c;
	str = "";
	scanf("%c", &c);
	if (c == '\n')scanf("%c", &c);//最初の改行対策
	while (c != '\n' && c != -1) {
		str += c;
		scanf("%c", &c);
	}
}

void scanc(char& str) {
	char c;
	scanf("%c", &c);
	if (c == -1)return;
	while (c == '\n') {
		scanf("%c", &c);
	}
	str = c;
}

double acot(double x) {
	return PI / 2 - atan(x);
}

/*-----------------------------------------ここからコード-----------------------------------------*/


int main() {
	
	int n;
	scanf("%d", &n);
	primtf("%d\n", n * max((n & 1) * 2, 1));
	
	Please AC;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:91:9: error: 'primtf' was not declared in this scope; did you mean 'printf'?
   91 |         primtf("%d\n", n * max((n & 1) * 2, 1));
      |         ^~~~~~
      |         printf
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected ')' before numeric constant
    6 |     printf("%d"2*a);
      |           ~    ^
      |                )
Language: C

#include <stdio.h>
#include <stdlib.h>

int main()
{
  int aa;
  while(~scanf("%d",&aa))
  {
      if(a%2==0)
        printf("%d\n",aa);
      else
        printf("%d\n",aa*2);
  }
}


Compiler output:
main.c: In function 'main':
main.c:9:10: error: 'a' undeclared (first use in this function); did you mean 'aa'?
    9 |       if(a%2==0)
      |          ^
      |          aa
main.c:9:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int x;
    cin>>X;
    if(x%2==0){cout<<x;}
    else
    {cout<<x;}
    return 0;
}
 
 
 

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ';' before 'A'
   11 |     cout A*2 << endl;
      |         ^~
      |         ;
Language: C++

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

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

#include<stdio.h>
int main()
{
	int a,b=2,i=0;
	scanf("%d",&a);
	while(1){
		if(a%2==0)break;
		else{
			a*=2;
			i++;
	}
printf("%d\n",i);
}

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

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

Compiler output:
a.cc:11:2: error: 'cl' does not name a type
   11 | }cl
      |  ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected ';' before 'else'
    7 |                 if(b%2==0 && b%a==0)break
      |                                          ^
      |                                          ;
    8 |                 else b+=2;
      |                 ~~~~
Language: C

#include <bits/stdc++.h>

#define PI acos(-1)
#define all(a) a.begin(), a.end()
#define full(a, n) a, a + n
#define ma(type, size) (type *)malloc(sizeof(type) * size)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define MT make_tuple
#define f0n(i, n) for (i = 0; i < (n); i++)
#define f1n(i, n) for (i = 1; i <= (n); i++)
#define fab(i, a, b) for (i = (a); i <= (b); i++)
#define fr(i, b, a) for (i = (b); i >= (a); i--)

using namespace std;

/*
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
	tree_order_statistics_node_update> indexed_set;
//*/
typedef long long int ll;
typedef long int lo;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef tuple<int, int, int> ti;

typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tll;

//* utility function
inline bool compare(ll i, ll j)
{
    return i < j;
}
//*/

//* function prototypes
template< typename T>
T gcd(T a, T b);
//*/

//int row, column;
int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[8] = {0, -1, -1, -1, 0, 1, 1, 1};
#ifdef DEBUG
#endif // DEBUG

int main()
{
    //ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ll number_of_test_case = 1, test_case;
    //cin >> number_of_test_case;
    for (test_case = 1; test_case <= number_of_test_case; test_case++)
    {
        ll n;
        cin >> n;
        if (n&1)cout << n*2 << endl;
        else cout << n << endl;
    }
    return 0;
}
template< typename T>
T gcd(T a, T b)
{
    if (b == 0)
        return a;
    return gcd(b, a%b);
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before numeric constant
   10 |     else cout 2 * N;
      |              ^~
      |              ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before numeric constant
    8 |     else cout 2 * N;
      |              ^~
      |              ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int N;
    cnt >> N;
    cout << 2 * N;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
    6 |     cnt >> N;
      |     ^~~
      |     int
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n1=sc.nextInt();
		int count=0;
		for(int i=0;i<n1;i++){
		if(count%2==0 && n1%count==0){
			System.out.println(count);
			break;
		}
		count++;
	}
 
}

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

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

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

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

int main(){
  int a,i cin>>a;
  for(i=a;i<100000;i++){
    if(i%2==0 && i%a==0){
      cout<<i;
    }
  }
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected initializer before 'cin'
    7 |   int a,i cin>>a;
      |           ^~~
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=a;i<100000;i++){
      |       ^
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(ans(n));
    }
    public static int ans(int n) {
        if(n%2 == 0) {
            System.out.println(n);
        }
        else {
            System.out.println(n*2);
        }
        return ans;
    }
}


Compiler output:
Main.java:18: error: cannot find symbol
        return ans;
               ^
  symbol:   variable ans
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(ans(n));
    }
    public static int ans(int n) {
        if(n%2 == 0) {
            System.out.println(n);
        }
        else {
            System.out.println(n*2);
        }
    }
}


Compiler output:
Main.java:18: error: missing return statement
    }
    ^
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(ans(n));
    }
    public static int ans(int n) {
        if(n%2 == 0) {
            System.out.println(n);
        }
        else {
            System.out.println(n*2);
        }
        return;
    }
}

Compiler output:
Main.java:18: error: incompatible types: missing return value
        return;
        ^
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(ans(n));
    }
    public static int ans(int n) {
        if(n%2 == 0) {
            System.out.println(n);
        }
        else {
            System.out.println(n*2);
        }
    }
}

Compiler output:
Main.java:18: error: missing return statement
    }
    ^
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(ans(n);
    }
    public static int ans(int n) {
        if(n%2 == 0) {
            System.out.println(n);
        }
        else {
            System.out.println(n*2);
        }
    }
}

Compiler output:
Main.java:9: error: ')' or ',' expected
        System.out.println(ans(n);
                                 ^
1 error
Language: C++

# include<iostream>
using anmespace std;
int main (){
int a;
cin>>a;
if (a%2!=0)
cout<<a*2;
else
    cout<<a;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'anmespace'
    2 | using anmespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin>>a;
      | ^~~
      | 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:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout<<a*2;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<a;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include <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:7:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    7 |   scanf("%d",&N);
      |   ^~~~~
main.c:7:15: error: 'N' undeclared (first use in this function)
    7 |   scanf("%d",&N);
      |               ^
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

    return 0;


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

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

    return 0;


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |     cout<n*2<<endl;
      |          ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <cstdlib> //abs(int)
using namespace std;
int main(void){
  int a;
  cin >> a;
  if(a % 2 == 0){
    cout << a;
  } else {
    cout << a : 2;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected ';' before ':' token
   11 |     cout << a : 2;
      |              ^~
      |              ;
Language: C++

int main(){int a;std::cin>>a;std::cout<<((a%2==0)?a:2*a)<<'\n';}

Compiler output:
a.cc: In function 'int main()':
a.cc:1:23: error: 'cin' is not a member of 'std'
    1 | int main(){int a;std::cin>>a;std::cout<<((a%2==0)?a:2*a)<<'\n';}
      |                       ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){int a;std::cin>>a;std::cout<<((a%2==0)?a:2*a)<<'\n';}
a.cc:1:35: error: 'cout' is not a member of 'std'
    1 | int main(){int a;std::cin>>a;std::cout<<((a%2==0)?a:2*a)<<'\n';}
      |                                   ^~~~
a.cc:1:35: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
typedef long long ll;
int main(){
  int n;
  ll ans;

  cin >> n;

  if (n % 2 == 0){
    ans = n * 2;
  }else{
    ans = n;
  }

  cout << n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout << n;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

/**
 * @author derrick20
 * Easy
 */
import java.io.*;
import java.util.*;

public class MultipleOf2AndN {
    public static void main(String args[]) throws Exception {
        FastScanner sc = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int N = sc.nextInt();
        if (N % 2 == 0) {
            out.println(N);
        }
        else {
            out.println(2 * N);
        }

        out.close();
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        FastScanner(FileReader s) {
            br = new BufferedReader(s);
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        String nextLine() throws IOException { return br.readLine(); }

        double nextDouble() throws IOException { return Double.parseDouble(next()); }

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    6 |   if(n%2.0==0)cout<<n<<endl;
      |      ~^~~~
      |      | |
      |      | double
      |      double
a.cc:7:12: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    7 |   else if(n%2.0!=0)cout<<2*n<<endl;
      |           ~^~~~
      |           | |
      |           | double
      |           double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   if(n%2==0)cout<<n<<endl;
      |      ~^~
      |      | |
      |      | int
      |      double
a.cc:7:12: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   else if(n%2!=0)cout<<2*n<<endl;
      |           ~^~
      |           | |
      |           | int
      |           double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    6 |   if(n%2==0)cout<<n<<endl;
      |      ~^~
      |      | |
      |      | int
      |      float
a.cc:7:12: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    7 |   else if(n%2!=0)cout<<2*n<<endl;
      |           ~^~
      |           | |
      |           | int
      |           float
Language: C++

b=b+1;
		if(b%a==0&&b%2==0) {
			printf("%d\n",b);
			break;
		}
	}
	
	return 0;
}
	

Compiler output:
a.cc:1:1: error: 'b' does not name a type
    1 | b=b+1;
      | ^
a.cc:2:17: error: expected unqualified-id before 'if'
    2 |                 if(b%a==0&&b%2==0) {
      |                 ^~
a.cc:6:9: error: expected declaration before '}' token
    6 |         }
      |         ^
a.cc:8:9: error: expected unqualified-id before 'return'
    8 |         return 0;
      |         ^~~~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  ll n;
  cin >> n;
  if(!n%2) cout << n << endl;
  else cout << 2*n << endl;
}


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

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

int main()
{
	long i,N,temp,sum=0;
	vector<long> A;
	cin>>N;
	if(N%2==0){
		cout<<N;
	}else{
		cout<<N*2;
	{
}


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

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

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

}


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

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

int main() {
      int n;
      cin>>n;

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

      int mn=a[0],mx=a[0];

      for(int i=1; i<n i++){
            if(mn>a[i]) mn=a[i];
            if(mx<a[i]) mx=a[i];
      }

      cout<<mx-mn<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected ';' before 'i'
   14 |       for(int i=1; i<n i++){
      |                       ^~
      |                       ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int a,;
      |         ^
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main()
{
  int n;
  cin >> n;
  int a[n];
  int k=0;
  int l=100000;
  for(int i=0;i<=n;i++)
  {
    cin >> a[i];
    if(k<a[i]){k=a[i];
    if(l>a[i]){l=a[i];}
  }
  cout << k-l << endl;
}

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

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main()
{
  int n;
  cin >> n;
  int a[n];
  int saidai;
  int k=0;
  int l=100000;
  for(int i=0;i<=n;i++)
  {
    cin >> a[i];
    if(k<a[i]){k=a[i];
    if(l>a[i]){l=a[i];}
  }
  saidai=k-l;
  cout << saidai << endl;
}

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

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main()
{
  int n;
  cin >> n;
  int a[n];
  int saidai;
  int k=0;
  int l=0;
  for(int i=0;i<=n;i++)
  {
    cin >> a[i];
    if(k>a[i]){k=a[i];}
    if(l<a[i]){l=a[i]}
  }
  saidai=k-l;
  cout << saidai << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected ';' before '}' token
   17 |     if(l<a[i]){l=a[i]}
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int n;
  cin >> n;
  int a[n];
  int saidai=0;
  int k;
  for(int i=0;i<=n;i++)
  {
    cin >> a[i];
  }
  for(int i=0;i<n;i++)
  {
    for(int l=1;l<=n;l++)
    {
      k=a[l]-a[i]
      if(saidai<k)
      {
        saidai=k;
      }
    }
  }
  cout << saidai << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before 'if'
   19 |       k=a[l]-a[i]
      |                  ^
      |                  ;
   20 |       if(saidai<k)
      |       ~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int n;
  cin >> n;
  int a[n];
  int saidai=0;
  int k;
  for(int i=0;i<=n;i++)
  {
    cin >> a[i];
  }
  for(int i=0;i<n;i++)
  {
    for(int l=1;l<=n;l++)
    {
      k=a[l]-a[i]
      if(saidai<k)
        saidai=k;
    }
  }
  cout << saidai << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before 'if'
   19 |       k=a[l]-a[i]
      |                  ^
      |                  ;
   20 |       if(saidai<k)
      |       ~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  
  int x;
  x=2*n;
  
  for(int i=1;i=<n*2;i++){
  if(i/n==0 && i/2==0){
    x=i;
    break;
  }
  }
  
  cout << x << endl;
	return 0;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected primary-expression before '<' token
   11 |   for(int i=1;i=<n*2;i++){
      |                 ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int n;
  cin >> n;
  if(n%2==0) {
    cout << n << emdl;
  }
  else {
    cout << n*2 << endl;
  }
}

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

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include<algorithm>

using namespace std;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++)
typedef long long ll;

int main()
{
    ll N,res,T,A;
    cin >> N;

    if( N % 2 = 0)res = N;
    else res = N * 2;


    cout << res << endl;

}



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

#include <iostream>

using namespace std;

int lcm(int a, int b)
{
  return a * b / gcd(a, b);
}

int main()
{
    int n;
    cin >> n;

    cout << lcm(n, 2) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int lcm(int, int)':
a.cc:7:18: error: 'gcd' was not declared in this scope
    7 |   return a * b / gcd(a, b);
      |                  ^~~
Language: C++

#include <iostream>
#include <thread>
#include <chrono>
#include <random>
#include <fstream>
#include <time.h>


int main()
{
    int n;
    std::cin >> n;

    if(n%2==0){
        return n;
    }
    else{
        n = n*2
        return n
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: expected ';' before 'return'
   18 |         n = n*2
      |                ^
      |                ;
   19 |         return n
      |         ~~~~~~
Language: Java

import java.util.*;

public class coder1{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());

    if(n%2==0){
      System.out.println(n);
    }else{
      System.out.println(2*n);
    }
  }
}

Compiler output:
Main.java:3: error: class coder1 is public, should be declared in a file named coder1.java
public class coder1{
       ^
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:25: error: expected ';' before '}' token
   10 |         printf("%d",n*2)
      |                         ^
      |                         ;
   11 |   }
      |   ~
Language: C++

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

template <class T> using V = vector<T>;

using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;


#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(b);i>(ll)(a);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) __lcm(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;


ll sum(ll n) {
  ll m=0;
  FOR(i,0,12){
    m+=n%10;
    n/=10;
  }
  return m;
}


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/


signed main() {
  ll n;
  ci(n);
  co(2*n/gcd(2,n))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:23: error: no matching function for call to '__gcd(int, ll&)'
   30 | #define gcd(a,b) __gcd(a,b)
      |                  ~~~~~^~~~~
a.cc:32:21: note: in definition of macro 'co'
   32 | #define co(a) cout<<a<<endl;
      |                     ^
a.cc:56:10: note: in expansion of macro 'gcd'
   56 |   co(2*n/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:30:23: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
   30 | #define gcd(a,b) __gcd(a,b)
      |                  ~~~~~^~~~~
a.cc:32:21: note: in definition of macro 'co'
   32 | #define co(a) cout<<a<<endl;
      |                     ^
a.cc:56:10: note: in expansion of macro 'gcd'
   56 |   co(2*n/gcd(2,n))
      |          ^~~
Language: C++

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

template <class T> using V = vector<T>;

using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;


#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(b);i>(ll)(a);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) __lcm(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;


ll sum(ll n) {
  ll m=0;
  FOR(i,0,12){
    m+=n%10;
    n/=10;
  }
  return m;
}


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/


signed main() {
  
  ll n;
  ci(n);
  co(2*n/gcd(2,n))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:23: error: no matching function for call to '__gcd(int, ll&)'
   30 | #define gcd(a,b) __gcd(a,b)
      |                  ~~~~~^~~~~
a.cc:32:21: note: in definition of macro 'co'
   32 | #define co(a) cout<<a<<endl;
      |                     ^
a.cc:57:10: note: in expansion of macro 'gcd'
   57 |   co(2*n/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:30:23: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
   30 | #define gcd(a,b) __gcd(a,b)
      |                  ~~~~~^~~~~
a.cc:32:21: note: in definition of macro 'co'
   32 | #define co(a) cout<<a<<endl;
      |                     ^
a.cc:57:10: note: in expansion of macro 'gcd'
   57 |   co(2*n/gcd(2,n))
      |          ^~~
Language: C++

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

template <class T> using V = vector<T>;

using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;


#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(b);i>(ll)(a);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) __lcm(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;


ll sum(ll n) {
  ll m=0;
  FOR(i,0,12){
    m+=n%10;
    n/=10;
  }
  return m;
}


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/


signed main() {
  
  ll n;
  ci(n);
  co(lcm(2,n))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: '__lcm' was not declared in this scope
   31 | #define lcm(a,b) __lcm(a,b)
      |                  ^~~~~
a.cc:32:21: note: in definition of macro 'co'
   32 | #define co(a) cout<<a<<endl;
      |                     ^
a.cc:57:6: note: in expansion of macro 'lcm'
   57 |   co(lcm(2,n))
      |      ^~~
Language: C++

#include<iostream>
#include<utility>
using namespace std;
 
int main(){
 	 
  int a[3];
  int sum=0;
  cin >> a[0] >> a[1] >> a[2];
  sort(a,a+3);
  sum += a[2]-a[1];
  sum += a[1]-a[0];
  cout << sum << endl;
}

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

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

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

//#include <stdio.h>
#include <bits/stdc++.h>
int main(){
int n;
cin >> n;
cout << ((n&1==0)?n:2*n) << endl;
  return 0;
}

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

#include <stdio.h>
#include <bits/stdc++.h>
int main(){
int n;
scanf("%d",&n);
cout<< ((n&1==0)?n:2*n) << endl;
  return 0;
}

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

#include <stdio.h>
int main(){
int n;
scanf("%d",&n);
cout<< ((n&1==0)?n:2*n) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cout' was not declared in this scope
    5 | cout<< ((n&1==0)?n:2*n) << endl;
      | ^~~~
a.cc:5:28: error: 'endl' was not declared in this scope
    5 | cout<< ((n&1==0)?n:2*n) << endl;
      |                            ^~~~
Language: C

#include <stdio.h>

int mian(){
  int N;
  scanf("%d",&N);
  if(N % 2 == 0){
    printf("%d",N);
  }else{
    printf("%d",N + N);
  }
}

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

#include <stdio.h>

int mian(){
  int N;
  scanf("%d",&N);
  if(N % 2 == 0){
    printf("%d",N);
  }else{
    printf("%d",N * 2);
  }
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
/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 <stdio.h>

int mian(){
  int N;
  scanf("%d",&N);
  if(N%2==0){
    printf("%d",N);
  }else{
    printf("%d",N * 2);
  }
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
/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 <stdio.h>

int mian(){
  int N;
  scanf("%d",&N);
  if(N%2==0){
    printf("%d",N);
  }else{
    printf("%d",N*2);
  }
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
/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;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: unable to find numeric literal operator 'operator""a'
   11 |         cout << 2a << endl;
      |                 ^~
a.cc:12:6: error: expected '}' at end of input
   12 |     }
      |      ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: unable to find numeric literal operator 'operator""n'
   11 |     cout << (n%2==0?n:2n) << endl;
      |                       ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
// ABC098-A-
/*
int main(){
    int a, b;
    cin >> a >> b;
    cout << max(a + b, max(a - b, a * b)) << endl;
}
 */

// ABC099-A-
/*
int main(){
    int a;
    bool okey = true;
    cin >> a ;
    if (a > 999) {
        okey = false;
        a -= 1000;
    }
    
    if (okey) {
        cout << "ABC" << endl;
    }else{
        cout << "ABD" << endl;
    }
}
*/

//ABC100-A-
/*
int main(){
    int a, b;
    cin >> a >> b;
    if (a > 8 || b > 8) {
        cout << ":(" << endl;
    }else{
        cout << "Yay!" << endl;
    }
    
}
 */
//ABC101-A-
/*
int main(){
    int ans = 0;
    for (int i = 0; i < 4; i++) {
        char s;
        cin >> s;
        if(s == '+'){
            ans++;
        }else{
            ans--;
        }
    }
    cout << ans << endl;
}
*/
//ABC102-A-
/*
int main(){
    int n;
    cin >> n;
    if (n % 2 == 0) {
        cout << n << endl;
    }else{
        cout << n * 2 << endl;
    }
}
*/
//ABC102-A-

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    vector<int>task;
    task = {a, b, c};
    sort(task.begin(), task.end());
    cout << task.at(2) - task.at(0) << endl;
}
*/




Compiler output:
a.cc:82:2: error: expected unqualified-id before '/' token
   82 | */
      |  ^