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

package curtain;
import java.util.Scanner;
public class Curtain {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int A = stdIn.nextInt();
		int B = stdIn.nextInt();

		int c = B *= 2; //両カーテンの長さの合計

		if(A-c>0)
		System.out.println(A-c);

		else {
			System.out.println(0);
		}
	}

}


Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package curtain;
      | ^~~~~~~
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.Scanner;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Curtain {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Curtain'
    3 | public class Curtain {
      |              ^~~~~~~
Language: Java

package curtain;
import java.util.Scanner;
public class Curtain {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int A = stdIn.nextInt();
		int B = stdIn.nextInt();

		int c = B *= 2; //両カーテンの長さの合計

		if(A-c>0)
		System.out.println(A-c);

		else {
			System.out.println(0);
		}
	}

}


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

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

		int A = stdIn.nextInt();
		int B = stdIn.nextInt();

		int c = B *= 2; //両カーテンの長さの合計

		if(A-c>0)
		System.out.println(A-c);

		else {
			System.out.println(0);
		}
	}

}


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

#include<stdio.h>
#include<stdlib.h>
void main()
{
  int a,b,c;
  scanf("%d",&a);
  scanf("%d",&b);
  c=a-2b;
  if(c<=0)
  c=0;
  printf("%d",c);
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: invalid suffix "b" on integer constant
    8 |   c=a-2b;
      |       ^~
Language: C++

#include <iostream>
using namespace.std;
int main()
{
  int a,b;
  scanf("%d%d",&a,&b);
  int c;
  c=a-2b;
  if(c>0)
    printf("%d",c);
  else cout<<0;
  return 0;
}

Compiler output:
a.cc:2:16: error: expected identifier before '.' token
    2 | using namespace.std;
      |                ^
a.cc:2:16: error: expected ';' before '.' token
    2 | using namespace.std;
      |                ^
      |                ;
a.cc:2:16: error: expected unqualified-id before '.' token
a.cc: In function 'int main()':
a.cc:8:7: error: unable to find numeric literal operator 'operator""b'
    8 |   c=a-2b;
      |       ^~
a.cc:11:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   else cout<<0;
      |        ^~~~
      |        std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main(
      |     ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
    5 |     int a,b;
      |     ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:3: note: to match this '{'
    4 |   {
      |   ^
a.cc:4:4: error: expected ')' before 'int'
    4 |   {
      |    ^
      |    )
    5 |     int a,b;
      |     ~~~
a.cc:3:9: note: to match this '('
    3 | int main(
      |         ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |     int a,b;
      |           ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin>>a>>b;
      |     ^~~
a.cc:7:5: error: 'cout' does not name a type
    7 |     cout<<max(a-2*b,0)<<endl;
      |     ^~~~
a.cc:8:4: error: expected unqualified-id before 'return'
    8 |    return 0;
      |    ^~~~~~
a.cc:9:3: error: expected declaration before '}' token
    9 |   }
      |   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before '>' token
    8 |   if(2*b=>a)
      |          ^
Language: C++

#incluce<bits/stdc++.h>
using namespaces std;
int main(
  {
    int a,b;
    cin>>a>>b;
    cout<<max(a-2*b,0)<<endl;
   return 0;
  }

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include?
    1 | #incluce<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main(
      |     ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
    5 |     int a,b;
      |     ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:3: note: to match this '{'
    4 |   {
      |   ^
a.cc:4:4: error: expected ')' before 'int'
    4 |   {
      |    ^
      |    )
    5 |     int a,b;
      |     ~~~
a.cc:3:9: note: to match this '('
    3 | int main(
      |         ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |     int a,b;
      |           ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin>>a>>b;
      |     ^~~
a.cc:7:5: error: 'cout' does not name a type
    7 |     cout<<max(a-2*b,0)<<endl;
      |     ^~~~
a.cc:8:4: error: expected unqualified-id before 'return'
    8 |    return 0;
      |    ^~~~~~
a.cc:9:3: error: expected declaration before '}' token
    9 |   }
      |   ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B,amari;
  cin>>A;
  cin>>B;
  amari=A-(2*B);
  if(A>2*B){
    printf("%d",amari);
  }
  if(A==(2*B)&&A<(2*B)){
    printf("0");
  }
    return 0;


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

import java.util.Scanner;

public class Curtain {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        // Codes for input goes here
        int A = scn.nextInt();
        int B = scn.nextInt();
        scn.close();
        B = 2 * B;
        int diff = A - B;
        if(diff<0)
            diff =0;
        System.out.println(diff);

    }
}

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

#include <stdio.h>
int main() {

  int A,B;
  if(scanf("%d", &A, &B)== 1);
   
  puts("%c", A - B);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: too many arguments to function 'puts'
    7 |   puts("%c", A - B);
      |   ^~~~
In file included from main.c:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
Language: Java

class Solution{
public static void main(String[] args) {
   Scanner scn = new Scanner(System.in);
   // Codes for input goes here
  int A = scn.nextInt();
  int B = scn.nextInt();
  scn.close();
  B = 2 * B;
  int diff = B-A;
  if(diff<0)
    diff =0;
  System.out.println(diff);
   
}
 
}

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

import java.util.Scanner;

public class Curtain {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        System.out.println(Math.max(0, a - (2 * b)));
    }
}


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

#include <iostream>

int main() {
 int a,b;
  cin >> a >> b;
  int c = max(0,a-2*b);
  cout << c;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
    6 |   int c = max(0,a-2*b);
      |           ^~~
      |           std::max
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << c;
      |   ^~~~
      |   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 <iostream>
#include <cmath>

using namespace std;

int main(){
  int a,b;
  cin>>a>>b;
  int ans = max(a-2*b,0);
  cout<<ans<<endl;
  retuern 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'retuern' was not declared in this scope
   11 |   retuern 0;
      |   ^~~~~~~
Language: Java

class Solution{
public static void main(String[] args) {
   Scanner scn = new Scanner(System.in);
   // Codes for input goes here
  int A = scn.nextInt();
  int B = scn.nextInt();
  scn.close();
  B = 2 * B;
  int diff = B-A;
  if(diff>0)
    return diff;
  return 0;
   
}

}

Compiler output:
Main.java:3: error: cannot find symbol
   Scanner scn = new Scanner(System.in);
   ^
  symbol:   class Scanner
  location: class Solution
Main.java:3: error: cannot find symbol
   Scanner scn = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Solution
Main.java:11: error: incompatible types: unexpected return value
    return diff;
           ^
Main.java:12: error: incompatible types: unexpected return value
  return 0;
         ^
4 errors
Language: C

#include<stdio.h>

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

int main(void) {
  int a, b;
  scanf("%d %d", &a, &b);
  int ans = a - 2 * b;
  if(ans < 0) {
    ans = 0;
  }
  printf("%d\n", ans);
  return 0;
}


Compiler output:
main.c:15:5: error: redefinition of 'main'
   15 | int main(void) {
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void) {
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B,amari;
  cin>>A;
  cin>>B;
  amari=A-(2*B);
  if(A>2*B){
    printf("%d",amari);
  if(A==(2*B)&&A<(2*B)){
    printf("0");
    return 0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:9:12: note: to match this '{'
    9 |   if(A>2*B){
      |            ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include <stdio.h>
int main()
{
  imt a, b, sp;
  printf("enter the value of window %d and size of curtain %d", a, b);
  scanf("%d%d", &a, &b);
  sp= a-2b;
  printf("uncovered space is :", sp);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'imt'; did you mean 'int'?
    4 |   imt a, b, sp;
      |   ^~~
      |   int
main.c:7:9: error: invalid suffix "b" on integer constant
    7 |   sp= a-2b;
      |         ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: unable to find numeric literal operator 'operator""\U0000ff0ab'
    7 |   if(a-2＊b>0) cout << a-2＊b << endl;
      |        ^~~~
a.cc:7:26: error: unable to find numeric literal operator 'operator""\U0000ff0ab'
    7 |   if(a-2＊b>0) cout << a-2＊b << endl;
      |                          ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector> //動的配列
#include <string>
#include <list> //双方向リスト
#include <map> //連想配列
#include <set> //集合
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <bitset>
#include <numeric>
#include <tuple>




typedef long long ll;


using namespace std;

typedef pair<int, int> P;
#define FOR(i,a,b) for(int i=(int)(a) ; i < (int) (b) ; ++i )
#define rep(i,n) FOR(i,0,n)
#define sz(x) int(x.size())


template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

//小さい順から取り出すヒープ
//priority_queue<ll, vector<ll>, greater<ll> > pque1;



int main(){
    int n,k;
    cin>>n,k;
    int ans=0;
    if (n>=2k) ans=n-2k;
    
    cout<<ans<<endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:12: error: fixed-point types not supported in C++
   48 |     if (n>=2k) ans=n-2k;
      |            ^~
a.cc:48:22: error: fixed-point types not supported in C++
   48 |     if (n>=2k) ans=n-2k;
      |                      ^~
Language: Java

package curtain;
import java.util.Scanner;
public class Curtain {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int a;
		do{
			System.out.print("窓の長さ:");
			a = stdIn.nextInt();
		}while(!(a>=1 && a<=100));

		int b;
		do {
			System.out.print("カーテンの長さ:");
			b = stdIn.nextInt();
		}while(!(b>=1 && b<=100));

		int c = b *= 2; //両カーテンの長さの合計

		if(a-c>0)
		System.out.println("カーテンで隠れていない部分の横方向の長さは"+(a-c)+"です。");

		else {
			System.out.println(0);
		}
	}

}


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

#include<stdio.h>
int main(void)

{
	int mado;
	int ka-ten;
	int i = 0;

	scanf("%d",&mado);
	scanf("%d",&ka-ten);

	ka-ten*=2;

	if(mado-ka-ten <=0)
		printf("%d",i);
	else
		printf("%d",mado - ka-ten);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
    6 |         int ka-ten;
      |               ^
main.c:6:16: error: 'ten' undeclared (first use in this function)
    6 |         int ka-ten;
      |                ^~~
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:21: error: 'ka' undeclared (first use in this function)
   10 |         scanf("%d",&ka-ten);
      |                     ^~
Language: C++

#include <iostream>
using namespace std;
int main() {
    int x;
    std::cin >> a >> b;
    int l = a - 2*b;
    if (l < 0) {
       cout << 0 << endl;
    } else {
       cout << l << endl;
  }
}

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

#include <iostream>

void main(void) {
	int a, b;
	std::cin >> a >> b;
	if (a > b * 2) {
		std::cout << a - b * 2 <<std::endl;
		
	}
	else {
		std::cout << 0 << std::endl;
		
	}
	return;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(void) {
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |         return;
      |         ^~~~~~
Language: C++

#include <iostream>

void main(void) {
	int a, b;
	std::cin >> a >> b;
	if (a > b * 2) {
		std::cout << a - b * 2 <<std::endl;
		
	}
	else {
		std::cout << 0 << std::endl;
		
	}
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(void) {
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a, b;
  cin >> a >> b;
  int answer = a - 2*b;
  if (c < 0) cout << 0 << endl;
  else cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'c' was not declared in this scope
    7 |   if (c < 0) cout << 0 << endl;
      |       ^
Language: C++

#include <iostream>
using namespace std;
int main() {
    int a,b;
    std::cin >> a >> b;
  int l = a - 2*b;
  if (l < 0) {
    cout << 0 << endl;
  } else {
      cout << l << endl;
  }
})

Compiler output:
a.cc:12:2: error: expected unqualified-id before ')' token
   12 | })
      |  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: unable to find numeric literal operator 'operator""b'
    6 |   if(a >= 2b)
      |           ^~
a.cc:7:13: error: unable to find numeric literal operator 'operator""b'
    7 |     cout<<a-2b<<endl;
      |             ^~
Language: C++


a, b = (int(i) for i in input().split())

if (a > 2*b):
    print(a - 2*b)
else:
    print(0)

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

#include <iostream>
using namespace std;
int main() {
	int x;
	cin >> a >> b;
  int l = a - 2*b;
  if (l < 0) {
	cout << 0 << endl;
  } else {
  	cout << l << endl;
  }
}

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

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

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

  if (2*b < a) {
    cout << "a-2*b" << endl;
  }
  else(){
  cout << "0" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected primary-expression before ')' token
   11 |   else(){
      |        ^
Language: C++

#include<stdio.h>
#define _CRT_SECURE_NO_WARNINGS

int main(void) {
	int A=0, B=0,C;
	scanf_s("%d%d", &A, &B);
	if (A <= B * 2)
		C = 0;
	else
		C=A-B*2;
	printf("%d", C);
	return 0;
}


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

#include<stdio.h>
int main(void)
{
	int a, b, c;
	scanf_s("%d %d", &a,&b);

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

	else{
		printf("0\n");
	}
  
  return 0;
}

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

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

		int a;
		do{
			System.out.print("窓の長さ:");
			a = stdIn.nextInt();
		}while(!(a>=1 && a<=100));

		int b;
		do {
			System.out.print("カーテンの長さ:");
			b = stdIn.nextInt();
		}while(!(b>=1 && b<=100));

		int c = b *= 2; //両カーテンの長さの合計

		if(a-c>0)
		System.out.println("カーテンで隠れていない部分の横方向の長さは"+(a-c)+"です。");

		else {
			System.out.println(0);
		}
	}

}


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

#include<stdio.h>
int main(void)
{

	int x,y;
	int i = 0;

	scanf("%d"&x);
	scanf("%d"&y);

	if(x<=y)
		printf("%d\n",i);
	else
		printf("%d\n",x-y*2);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:19: error: invalid operands to binary & (have 'char *' and 'int')
    8 |         scanf("%d"&x);
      |               ~~~~^
      |               |
      |               char *
main.c:9:19: error: invalid operands to binary & (have 'char *' and 'int')
    9 |         scanf("%d"&y);
      |               ~~~~^
      |               |
      |               char *
Language: C++

#include<iostream>
int main(void)
{
	int a, b, c;
	scanf_s("%d %d", &a,&b);

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

	else{
		printf("0\n");
	}
}

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

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

int main(){
  int a,b;
  cin >> a >>b;
　if(a>b){
    cout <<"0" <<endl;
 }
  else{
    cout << a-b*2<<endl;
  }
}

Compiler output:
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　if(a>b){
      | ^
a.cc: In function 'int main()':
a.cc:8:1: error: '\U00003000if' was not declared in this scope
    8 | 　if(a>b){
      | ^~~~
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected ';' before '{' token
   11 |   else(A>=B*2){
      |               ^
      |               ;
Language: Java

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

		int a;
		do{
			System.out.print("窓の長さ:");
			a = stdIn.nextInt();
		}while(!(a>=1 && a<=100));

		int b;
		do {
			System.out.print("カーテンの長さ:");
			b = stdIn.nextInt();
		}while(!(b>=1 && b<=100));

		int c = b *= 2; //両カーテンの長さの合計

		if(a-c>0)
		System.out.println("カーテンで隠れていない部分の横方向の長さは"+(a-c)+"です。");

		else {
			System.out.println(0);
		}
	}

}

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

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define P pair<int, int>
#define F first
#define S second
#define mod 1000000007
#define INF 9000000000000000000
signed main() {
    int a,b;cin>>a>>b;
    cout<<max(0,a-2*b)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: no matching function for call to 'max(int, long long int)'
   13 |     cout<<max(0,a-2*b)<<endl;
      |           ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:13:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   13 |     cout<<max(0,a-2*b)<<endl;
      |           ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:13:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |     cout<<max(0,a-2*b)<<endl;
      |           ~~~^~~~~~~~~
Language: C++

#include <iostream>
using std::cout;
using std::cin;
using std::endl;

int main()
{
    int A, B;
    cin >> A >> B;

    int result = A - B * 2;
    if (result < 0)
        cout << 0 << end;
    else
        cout << result << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'end' was not declared in this scope; did you mean 'std::end'?
   13 |         cout << 0 << end;
      |                      ^~~
      |                      std::end
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
Language: C++

#include <bits.stdc++.h>

int main(){

  int a, b;
  cin >> a >> b;
  
  cout << max(0, b - 2*a) << endl;
  
  
  return 0;
}

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

#include <iostream>
using namespace std;

int main(void)
{
    int A, B;
    cin >> A >> B;

    int total = A - 2 * b;
    if(total < 0)
	total = 0;

    cout << total << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'b' was not declared in this scope
    9 |     int total = A - 2 * b;
      |                         ^
Language: C

#include <stdio.h>
int main() {
  int A;
  scanf("%d", &A);
  
  int B;
  scanf("%d", &B);
  
  int ans
  ans = A - B

  printf(ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ans'
   10 |   ans = A - B
      |   ^~~
main.c:10:3: error: 'ans' undeclared (first use in this function)
main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:14: error: expected ';' before 'printf'
   10 |   ans = A - B
      |              ^
      |              ;
   11 | 
   12 |   printf(ans);
      |   ~~~~~~
Language: C++

#include<stdio.h>
int main(void)
{
	int a, b, c;
	scanf_s("%d %d", &a,&b);

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

	else{
		printf("0\n");
	}
}

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

#include <iostream>
using namespace std;
int main() {
	int a,b;
	cin >> a >> b;
    int l = a - 2*b;
    if(l<0) cout<< 0 <<endl;
	if(l => 0) cout << l << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '>' token
    8 |         if(l => 0) cout << l << endl;
      |               ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
	  	ll a,b;
	  	cin>>a>>b;
	  	cout<<max(0,(a-2b));
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: unable to find numeric literal operator 'operator""b'
    9 |                 cout<<max(0,(a-2b));
      |                                ^~
Language: C

#include<stdio.h>
int main(void)
{
	int a, b, c;
	scanf_s("%d %d", &a,&b);

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

	else{
		printf("0\n");
	}
}

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

#include <bits/stdc++.h>

using namespace std;
int main(){
    long long a, b;
    cout << max(0, b - (2*a)) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: no matching function for call to 'max(int, long long int)'
    6 |     cout << max(0, b - (2*a)) << endl;
      |             ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:6:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    6 |     cout << max(0, b - (2*a)) << endl;
      |             ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:6:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    6 |     cout << max(0, b - (2*a)) << endl;
      |             ~~~^~~~~~~~~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:29: error: expected ';' before '}' token
    6 |   if(2*b >= a){printf("0\n")}
      |                             ^
      |                             ;
main.c:7:31: error: expected ';' before '}' token
    7 |   else{printf("%d\n", a - 2*b)}
      |                               ^
      |                               ;
Language: C

#include <stdio.h>

int main(void)
{
  int A;
  int B;
  
  scanf("%d",&A);
  scanf("%d",&B);
  
  if(A <= B * 2){
    printf(0);
  }
  else{
    pritnf("%d",A - B * 2);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   15 |     pritnf("%d",A - B * 2);
      |     ^~~~~~
      |     printf
Language: C++

#include <iostream>
using namespace std;

int main() {
	int N;
  cin>>N;
  vector<int>vec(N);
  for(int i=0;i<N;i++){
    cin>>vec.at(i);
  }
  int ans=0;
  for(int ia=0 ;ia<N-1;ia++){
for(int ib=ia+1; ib<N ;ib++){
  ans+=vec.at(ia)*vec.at(ib);
}
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int>vec(N);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int>vec(N);
      |          ^~~
a.cc:9:10: error: 'vec' was not declared in this scope
    9 |     cin>>vec.at(i);
      |          ^~~
a.cc:14:8: error: 'vec' was not declared in this scope
   14 |   ans+=vec.at(ia)*vec.at(ib);
      |        ^~~
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
//	long long int t;
	//cin>>t;
	//while(t--)
	//{
	  	ll a,b;
	  	cin>>a>>b;
	  	cout<<max(0,(a-b));
	  	
	  //	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: no matching function for call to 'max(int, long long int)'
   13 |                 cout<<max(0,(a-b));
      |                       ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:13:26: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   13 |                 cout<<max(0,(a-b));
      |                       ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
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:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:13:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |                 cout<<max(0,(a-b));
      |                       ~~~^~~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>

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

Compiler output:
a.cc:9:30: error: stray '\' in program
    9 |         if(b+b>=a) printf("0"\n);
      |                              ^
a.cc:10:21: warning: missing terminating " character
   10 |         else printf("%d\",a-b-b);
      |                     ^
a.cc:10:21: error: missing terminating " character
   10 |         else printf("%d\",a-b-b);
      |                     ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:30: error: expected ')' before 'n'
    9 |         if(b+b>=a) printf("0"\n);
      |                          ~   ^~
      |                              )
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before '{' token
   14 |   else(A>B*2){
      |              ^
      |              ;
Language: C

#include <stdio.h>

int main(void)
{
  int A;
  int B;
  
  scanf("%d",&A);
  scanf("%d",%B);
  
  if(A <= B * 2){
    printf(0);
  }
  else{
    pritnf("%d",A - B * 2);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected expression before '%' token
    9 |   scanf("%d",%B);
      |              ^
main.c:15:5: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   15 |     pritnf("%d",A - B * 2);
      |     ^~~~~~
      |     printf
Language: C

#include <stdio.h>

int main(void)
{
  int A;
  int B;
  
  scanf("%d",&A);
  scanf("%d",%B);
  
  if(A =< B * 2){
    printf(0);
  }
  else{
    pritnf("%d",A - B * 2);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected expression before '%' token
    9 |   scanf("%d",%B);
      |              ^
main.c:11:9: error: expected expression before '<' token
   11 |   if(A =< B * 2){
      |         ^
main.c:15:5: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   15 |     pritnf("%d",A - B * 2);
      |     ^~~~~~
      |     printf
Language: C++

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

using namespace std;



int main(void){
    int A = 0,B =0,ans =0;

    cin >> hoge >> i;
    ans = a - (B * 2);

    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'hoge' was not declared in this scope
   11 |     cin >> hoge >> i;
      |            ^~~~
a.cc:11:20: error: 'i' was not declared in this scope
   11 |     cin >> hoge >> i;
      |                    ^
a.cc:12:11: error: 'a' was not declared in this scope
   12 |     ans = a - (B * 2);
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: unable to find numeric literal operator 'operator""B'
   10 |   A=2B+x;
      |     ^~
Language: Java

import java.util.Scanner;


public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
    	Scanner sc = new Scanner(System.in);
    	int a = sc.nextInt();
    	int b = sc.nextInt();
    	
    	int l = a-2*b;
    	int ans;
    	
    	if (l < 0) {
    		ans = 0;
    	} else {
    		ans = l;
    	}
    	return ans;
    	
    	sc.close(); 
    }
}


Compiler output:
Main.java:19: error: incompatible types: unexpected return value
    	return ans;
    	       ^
1 error
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:18: error: expected ';' before '{' token
    8 |   }else(A-B*2<=0){
      |                  ^
      |                  ;
Language: C

#include <stdio.h>

int main(){
    int a,b,ans;

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

    ans = a - 2b;
    if (ans <= 0){
        printf("0");
    }else{
        printf("%d",ans);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: invalid suffix "b" on integer constant
    8 |     ans = a - 2b;
      |               ^~
Language: Java


public class Curtain {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a;
		int yoko;
		int sum = 0;

		yoko= Integer.parseInt(args[0]);
		a = Integer.parseInt(args[1]);


		if(yoko - 2*a> 0) {
			sum = yoko - 2*a;
		}else {
			sum = 0;
		}

		System.out.println(sum);

	}

}


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

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(NULL);
    cin.tie(0);
    cout.tie(0);
    cin >> a >> b;
    cout << max(0, a - 2 * b);
    return 0;
}


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

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

void main()
{
  int a, b;
  cin >> a >> b;
  int result = max(0, a - b * 2);
  cout << result << endl;
}


Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main()
      | ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:18: error: expected ';' before '{' token
    8 |   }else(A-B*2<=0){
      |                  ^
      |                  ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:5: error: invalid suffix "B" on integer constant
   10 |   A=2B+x;
      |     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
  int a,b;
  cin >> a >> b;
  cout << max(0,a-2*b);
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:7:14: error: no matching function for call to 'max(int, long long int)'
    7 |   cout << max(0,a-2*b);
      |           ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:7:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    7 |   cout << max(0,a-2*b);
      |           ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:7:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |   cout << max(0,a-2*b);
      |           ~~~^~~~~~~~~
Language: Java

import java.util.Scanner;

public class tocoderA {
	
	static  Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		
		int a, b;
        a = in.nextInt();
        b = in.nextInt();
        int ans = 0;
        ans = a - b * 2;
        if(ans < 0) ans = 0;
        System.out.println(ans);
	}

}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before ':' token
    7 |     C=0:
      |        ^
      |        ;
Language: C++

#include<stdio.h>
using namespace std;
int main()
{
  int a=0;
  int b=0;
  int ans=0;
  cin>>a>>b;
  if(a<=2*b)
  {
    ans=2*b-a;
  }
  cout<<ans<<endl;
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>a>>b;
      |   ^~~
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 | using namespace std;
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<ans<<endl;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |   cout<<ans<<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 | using namespace std;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |   ans=a-b*2;
      |   ^~~
      |   abs
Language: C

#include<stdio.h>

int main(void)
{
	int a, b;
	//aはカーテンの横幅

	//入力
	scanf_s("%d %d", &a, &b);

	if (b * 2 >= a) {
		printf_s("0");
	}
	else {
		printf_s("%d\n", a - b * 2);
	}

	return 0;
}

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

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:6:14: error: expected expression before '%' token
    6 |   scanf("%d",%A);
      |              ^
main.c:9:5: error: invalid suffix "B" on integer constant
    9 |   A=2B+x;
      |     ^~