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

#include <iostream>

int main(){
  int a,b,c;
  cin >> a >> b;
 c = a - b*2
   if(c > 0){
     cout << c;
     return 0;
  }
  cout << 0;
  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:13: error: expected ';' before 'if'
    6 |  c = a - b*2
      |             ^
      |             ;
    7 |    if(c > 0){
      |    ~~        
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << 0;
      |   ^~~~
      |   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 <strong>

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

Compiler output:
a.cc:2:10: fatal error: strong: No such file or directory
    2 | #include <strong>
      |          ^~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.math.*;
import java.lang.*;

public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
    int a=s.nextInt();
    int b=s.nextInt();
    if(a>(2*b))
      System.out.println(a-(2*b));
    else
      System.out.println(0);
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
  public static void main(String args[]) throws IOException{
                                                ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

import java.io.*;
import java.math.*;
import java.lang.*;

public class Main{
  public static void main(String args[]){
    Scanner s=new Scanner(System.in);
    int a=s.nextInt();
    int b=s.nextInt();
    if(a>(2*b))
      System.out.println(a-(2*b));
    else
      System.out.println(0);
  }
}


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

#include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
  if(A>2*B){
  cout<<A-2*B;
}else{
    cout<<0;
}

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

#include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
  if(A>2*B){
  cout<<A-2*B;
}else{cout<<0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected '}' at end of input
    8 | }else{cout<<0;}
      |                ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

public class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		DecimalFormat df = new DecimalFormat("##,###.##");
		int a= sc.nextInt();
		int b= sc.nextInt();
		int c= a-(b*2);
		System.out.println(a+""+ c);
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		DecimalFormat df = new DecimalFormat("##,###.##");
		^
  symbol:   class DecimalFormat
  location: class Main
Main.java:4: error: cannot find symbol
		DecimalFormat df = new DecimalFormat("##,###.##");
		                       ^
  symbol:   class DecimalFormat
  location: class Main
4 errors
Language: Java

import java.util.*;
import java.text.*;
public class main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = a - (b*2);
		if(c <= 0){
			System.out.println("0");
		}
		else{
			System.out.println(c);
		}
	}
}

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

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner();
		
		int width = sc.nextInt();
		int cWidth = sc.nextInt()*2;
		int left = width-cWidth;
		if(cWidth <= width);
			left = 0;
		System.out.println();
	}
}

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

import java.util.*;
import java.text.*;

public class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		DecimalFormat df = new DecimalFormat("##,###.##");
		System.out.println("Enter the first part.");
		int A= sc.nextInt();
		System.out.println("Enter the 2nd part.");
		int B= sc.nextInt(); 
		int Answer= a-b
		
		
	}
}

Compiler output:
Main.java:12: error: ';' expected
		int Answer= a-b
		               ^
1 error
Language: C++

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

int main() {
  ll a,b;
  cin >> a >> b;
  cout << max(a-2*b,0) <<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: no matching function for call to 'max(ll, int)'
   10 |   cout << max(a-2*b,0) <<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:10:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   10 |   cout << max(a-2*b,0) <<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:10:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   10 |   cout << max(a-2*b,0) <<endl;
      |           ~~~^~~~~~~~~
a.cc:10:31: error: expected '}' at end of input
   10 |   cout << max(a-2*b,0) <<endl;
      |                               ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'if'
    8 |   ans = A - 2*B
      |                ^
      |                ;
    9 |   if(ans < 0){
      |   ~~
Language: C++

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

int main()
{
  int A,B;
  cin >> A >> B;
  ans = A - 2*B
  if(ans < 0){
	cout << 0;
  }
  
  cout << ans;
  return 0;
}

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

#include <bits/stdc++.h>
#define rep(i,N) for(int i=0;i<(int)N;i++)
using namespace std;
int main()
{
  int N,count=0;
  vector<int> L(1024);
  cin>>N;
  rep(i,N){cin>>L.at(i);}
  sort(L.begin(),L.end(),greater<int>());
  for(i,N-2)
  {
    for(int j=i+1;j<N-1;j++)
    {
      for(int k=j+1;k<N;k++)
      {
        if(L.at(i)<L.at(j)+L.at(k))count++;
      }
    }
  }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i,N-2)
      |       ^
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
a.cc:21:21: error: expected ')' before '}' token
   21 |   cout<<count<<endl;
      |                     ^
      |                     )
   22 | }
      | ~                    
a.cc:11:6: note: to match this '('
   11 |   for(i,N-2)
      |      ^
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int A,B;
    cin >> A >> B;
    cout << (A-2B < 0 ? 0 : A-2B) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: unable to find numeric literal operator 'operator""B'
    7 |     cout << (A-2B < 0 ? 0 : A-2B) << endl;
      |                ^~
a.cc:7:31: error: unable to find numeric literal operator 'operator""B'
    7 |     cout << (A-2B < 0 ? 0 : A-2B) << endl;
      |                               ^~
Language: C++

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

int main(){

  int A,B;
  cin >> A >> B;
  cout << max(A-2*B);
  
  return 0:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: no matching function for call to 'max(int)'
    9 |   cout << max(A-2*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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
In file included from /usr/include/c++/14/algorithm:61,
                 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:   template argument deduction/substitution failed:
a.cc:9:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    9 |   cout << max(A-2*B);
      |           ~~~^~~~~~~
/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:   candidate expects 2 arguments, 1 provided
a.cc:11:11: error: expected ';' before ':' token
   11 |   return 0:
      |           ^
      |           ;
a.cc:11:11: error: expected primary-expression before ':' token
Language: C++

#include <iostream>
using namespace std;

int main(){

  int A,B;
  cin >> A >> B;
  cout << max(A-2*B);
  
  return 0:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: no matching function for call to 'max(int)'
    8 |   cout << max(A-2*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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
a.cc:10:11: error: expected ';' before ':' token
   10 |   return 0:
      |           ^
      |           ;
a.cc:10:11: error: expected primary-expression before ':' token
Language: C++

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

int main(void) {
    int a, b;

    cin >> a;
    cin >> b;

    if (a - 2b >= 0)
        cout << a - 2b;
    else cout << 0;
  	return 0;
}

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

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

int main(void) {
    int a, b;

    cin >> a;
    cin >> b;

    if (a - 2b >= 0)
        cout << a - 2b;
    else cout << 0;
}

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

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

Compiler output:
Main.java:8: error: ';' expected
    int c = a - 2b;
                 ^
1 error
Language: Java

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

Compiler output:
Main.java:8: error: ';' expected
    int c = a - 2b;
                 ^
Main.java:12: error: illegal start of expression
    } else [
           ^
Main.java:16: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    if(a-2*b <= 0) {
      System.out.println(0);
    } else {
      System.out.println(a-2b);
    }
  }
}


Compiler output:
Main.java:11: error: ')' or ',' expected
      System.out.println(a-2b);
                            ^
Main.java:11: error: ';' expected
      System.out.println(a-2b);
                             ^
2 errors
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    if(a-2b <= 0) {
      System.out.println(0);
    } else {
      System.out.println(a-2b);
    }
  }
}


Compiler output:
Main.java:8: error: ')' expected
    if(a-2b <= 0) {
          ^
Main.java:8: error: not a statement
    if(a-2b <= 0) {
            ^
Main.java:8: error: ';' expected
    if(a-2b <= 0) {
                ^
Main.java:11: error: ')' or ',' expected
      System.out.println(a-2b);
                            ^
Main.java:11: error: ';' expected
      System.out.println(a-2b);
                             ^
Main.java:10: error: 'else' without 'if'
    } else {
      ^
6 errors
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    if(a-2b <= 0) {
      System.out.println(0);
    } else {
      System.out.println(a-2b);
  }
}


Compiler output:
Main.java:8: error: ')' expected
    if(a-2b <= 0) {
          ^
Main.java:8: error: not a statement
    if(a-2b <= 0) {
            ^
Main.java:8: error: ';' expected
    if(a-2b <= 0) {
                ^
Main.java:11: error: ')' or ',' expected
      System.out.println(a-2b);
                            ^
Main.java:11: error: ';' expected
      System.out.println(a-2b);
                             ^
Main.java:10: error: 'else' without 'if'
    } else {
      ^
Main.java:13: error: reached end of file while parsing
}
 ^
7 errors
Language: C++

#include<iosatream>
using namespace std;
int main(){
  int A,B;
  cin>>A>>B;
  if(A<B){
    cout<<0<<endl;
  }
  else if(A/2<B){
    cout<<0<<endl;
  }
  else{
    cout<<A-2*B<<endl;
  }
}

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

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

Compiler output:
main.c: In function 'main':
main.c:7:32: error: implicit declaration of function 'getRemain' [-Wimplicit-function-declaration]
    7 |                 printf("%lld", getRemain(a, b));
      |                                ^~~~~~~~~
main.c: At top level:
main.c:10:11: error: conflicting types for 'getRemain'; have 'long long int(long long int,  long long int)'
   10 | long long getRemain(long long a, long long b)
      |           ^~~~~~~~~
main.c:7:32: note: previous implicit declaration of 'getRemain' with type 'int()'
    7 |                 printf("%lld", getRemain(a, b));
      |                                ^~~~~~~~~
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(),B = sc.nextInt();
    int ans = A - B * 2;
    if (ans < 0) ans = 0;
    System.ou.println(ans);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    System.ou.println(ans);
          ^
  symbol:   variable ou
  location: class System
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(),int B = sc.nextInt();
    int ans = A - B * 2;
    if (ans < 0) ans = 0;
    System.ou.println(ans);
  }
}

Compiler output:
Main.java:6: error: <identifier> expected
    int A = sc.nextInt(),int B = sc.nextInt();
                         ^
1 error
Language: Java

import java.io.PrintWriter;
        import java.util.*;
        import java.io.*;
        import java.util.stream.IntStream;
        import java.util.stream.Stream;

public class Main {

    public static void main(String[] args) {
        new Solver().stream();
    }

    final IO io = new IO();
    final PrintWriter out = new PrintWriter(System.out);

    void stream() {
        solve();
        out.flush();
    }

    void solve() {
        int A = io.Int();
        int B = io.Int();
        System.out.println(Math.max(0, A - 2 * B));
    }
}

class IO {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1 << 12];
    private int ptr = 0, buffLen = 0;

    private boolean hasNextByte() {
        if (ptr < buffLen) return true;
        ptr = 0;
        try {
            buffLen = in.read(buffer);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return buffLen > 0;
    }

    private int readByte() {
        return hasNextByte() ? buffer[ptr++] : -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    } //ASCII

    private void skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    private boolean hasNext() {
        skipUnprintable();
        return hasNextByte();
    }

    private String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public String String() {
        return next();
    }

    public char Char() {
        return next().charAt(0);
    }

    public int Int() {
        return Integer.parseInt(next());
    }

    public long Long() {
        return Long.parseLong(next());
    }

    public double Double() {
        return Double.parseDouble(next());
    }

    public String[] StringArr(final int n) {
        final String[] arr = new String[n];
        for (int i = 0; i < n; ++i) arr[i] = String();
        return arr;
    }

    public char[] CharArr(final int n) {
        final char[] arr = new char[n];
        for (int i = 0; i < n; ++i) arr[i] = Char();
        return arr;
    }

    public int[] IntArr(final int n) {
        final int[] arr = new int[n];
        for (int i = 0; i < n; ++i) arr[i] = Int();
        return arr;
    }

    public long[] LongArr(final int n) {
        final long[] arr = new long[n];
        for (int i = 0; i < n; ++i) arr[i] = Long();
        return arr;
    }

    public double[] DoubleArr(final int n) {
        final double[] arr = new double[n];
        for (int i = 0; i < n; ++i) arr[i] = Double();
        return arr;
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        new Solver().stream();
            ^
  symbol:   class Solver
  location: class Main
1 error
Language: Java

import java.io.PrintWriter;
import java.util.*;
import java.io.*;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Solver {

    public static void main(String[] args) {
        new Solver().stream();
    }

    final IO io = new IO();
    final PrintWriter out = new PrintWriter(System.out);

    void stream() {
        solve();
        out.flush();
    }

    void solve() {
        int A = io.Int();
        int B = io.Int();
        System.out.println(Math.max(0, A - 2 * B));
    }
}

class IO {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1 << 12];
    private int ptr = 0, buffLen = 0;

    private boolean hasNextByte() {
        if (ptr < buffLen) return true;
        ptr = 0;
        try {
            buffLen = in.read(buffer);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return buffLen > 0;
    }

    private int readByte() {
        return hasNextByte() ? buffer[ptr++] : -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    } //ASCII

    private void skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    private boolean hasNext() {
        skipUnprintable();
        return hasNextByte();
    }

    private String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public String String() {
        return next();
    }

    public char Char() {
        return next().charAt(0);
    }

    public int Int() {
        return Integer.parseInt(next());
    }

    public long Long() {
        return Long.parseLong(next());
    }

    public double Double() {
        return Double.parseDouble(next());
    }

    public String[] StringArr(final int n) {
        final String[] arr = new String[n];
        for (int i = 0; i < n; ++i) arr[i] = String();
        return arr;
    }

    public char[] CharArr(final int n) {
        final char[] arr = new char[n];
        for (int i = 0; i < n; ++i) arr[i] = Char();
        return arr;
    }

    public int[] IntArr(final int n) {
        final int[] arr = new int[n];
        for (int i = 0; i < n; ++i) arr[i] = Int();
        return arr;
    }

    public long[] LongArr(final int n) {
        final long[] arr = new long[n];
        for (int i = 0; i < n; ++i) arr[i] = Long();
        return arr;
    }

    public double[] DoubleArr(final int n) {
        final double[] arr = new double[n];
        for (int i = 0; i < n; ++i) arr[i] = Double();
        return arr;
    }
}

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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> a >> b;
      |     ^~~
a.cc:6:15: error: 'cout' was not declared in this scope
    6 |     if(0 <= c)cout << c << endl;
      |               ^~~~
a.cc:6:28: error: 'endl' was not declared in this scope
    6 |     if(0 <= c)cout << c << endl;
      |                            ^~~~
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |         else cout << 0 << endl;
      |              ^~~~
a.cc:7:27: error: 'endl' was not declared in this scope
    7 |         else cout << 0 << endl;
      |                           ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
 int n,d;
  cin>>n;
  int d[50];
  int i;
  i=0;
  while(i<n)
  {
    cin>>d[i];
    i++;
  }
  int ans=0;
  int ii;
  i=0;
  while(i<n)
  {
    ii=i+1;
   while(ii<n) 
   {
     ans+=d[i]*d[ii];
       ii++;
   }
    i++;
  }
  cout<<ans<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: conflicting declaration 'int d [50]'
    7 |   int d[50];
      |       ^
a.cc:5:8: note: previous declaration as 'int d'
    5 |  int n,d;
      |        ^
a.cc:12:11: error: invalid types 'int[int]' for array subscript
   12 |     cin>>d[i];
      |           ^
a.cc:23:12: error: invalid types 'int[int]' for array subscript
   23 |      ans+=d[i]*d[ii];
      |            ^
a.cc:23:17: error: invalid types 'int[int]' for array subscript
   23 |      ans+=d[i]*d[ii];
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected ':' before ';' token
   11 |     cout <<a-2*b<<endl;
      |                       ^
      |                       :
a.cc:11:23: error: expected primary-expression before ';' token
a.cc:12:3: error: expected primary-expression before ':' token
   12 |   : cout <<0<<endl;
      |   ^
Language: C

#include<stdio.h>

int main()
{

  int a, b;
  //窓とカーテンサイズの入力
  
  scanf("%d %d", %a, %b);
  
  if (a >= 2*b)
  {
    printf("%d", a-2*b);
  } else {
  	printf("%d", 0);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: expected expression before '%' token
    9 |   scanf("%d %d", %a, %b);
      |                  ^
Language: C

#include<stdio.h>
int main(){
int n;
scanf("%d", &n);
int l[n];
for(int i = 0; i < n; i++){
  scanf("%d",&l[i])
}
int num = 0;
for(int i = 0; i < n; i++){
    for(int j = 0; j < i; j++){
        for(int k = 0; k < j; k++){
            if(l[i] < l[j] + l[k] && l[k] < l[j] + l[i] && l[j] < l[k] + l[i])
                num ++;
        }
    }
}
printf("%d",num);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: expected ';' before '}' token
    7 |   scanf("%d",&l[i])
      |                    ^
      |                    ;
    8 | }
      | ~
Language: C++

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


}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: no matching function for call to 'max(int, long long int)'
    6 | 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:6:10: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    6 | 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:6:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    6 | cout<<max(0,a-(2*b));
      |       ~~~^~~~~~~~~~~
Language: Java

import java.util.Scanner;
public class A143 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();
		String[] i = str.split(" ");
		int a = Integer.parseInt(i[0]);
		int b = Integer.parseInt(i[1]);
		int c = a - 2 * b;
		if(c < 0) {
			System.out.println(0);
		}else {
			System.out.println(c);
		}
	}
}


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

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


Compiler output:
main.c: In function 'main':
main.c:10:17: error: 'n' undeclared (first use in this function)
   10 |   printf("%d\n",n);
      |                 ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:7:8: error: expected expression before 'else'
    7 |   }if (else(a<=2*b){
      |        ^~~~
main.c:13:1: error: expected expression before '}' token
   13 | }
      | ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:7:7: error: expected '(' before 'else'
    7 |   }if else(a<=2*b){
      |       ^~~~
      |       (
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:17: error: 'n' undeclared (first use in this function)
   10 |   printf("%d\n",n);
      |                 ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

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

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

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

#include<stdio.h>

int main(void){

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

Compiler output:
main.c: In function 'main':
main.c:10:8: error: invalid suffix "B" on integer constant
   10 |   if(A-2B<=0){
      |        ^~
main.c:14:19: error: invalid suffix "B" on integer constant
   14 |     printf("%d",A-2B);
      |                   ^~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = a - b * 2;
    if(c >= 0){
      System.out.println(c);
    }else{
      System.out.println("0");
    }
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    int a = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Main
Main.java:6: error: cannot find symbol
    int b = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Main
2 errors
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A, B; cin >> A >> B;
  cout << max(0, A - 2 * B) << "\n;
    return 0;
}

Compiler output:
a.cc:6:32: warning: missing terminating " character
    6 |   cout << max(0, A - 2 * B) << "\n;
      |                                ^
a.cc:6:32: error: missing terminating " character
    6 |   cout << max(0, A - 2 * B) << "\n;
      |                                ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: expected primary-expression before 'return'
    7 |     return 0;
      |     ^~~~~~
Language: C

#include<stdio.h>

int main(){

int a , b , ans;

// 窓の長さ
scanf("%d",&a);  
// カーテン１枚の長さ
scanf("%d",&b);

// 窓の長さ-カーテン２枚の長さ=隠れない部分
a-2*b=ans

printf("%d",ans);

return 0; 
}



Compiler output:
main.c: In function 'main':
main.c:13:6: error: lvalue required as left operand of assignment
   13 | a-2*b=ans
      |      ^
main.c:13:10: error: expected ';' before 'printf'
   13 | a-2*b=ans
      |          ^
      |          ;
   14 | 
   15 | printf("%d",ans);
      | ~~~~~~
Language: C

#include<stdio.h>

int main(){

int a , b , ans;

// 窓の長さ
scanf("%d",a);  
// カーテン１枚の長さ
scanf("%d",b);

// 窓の長さ-カーテン２枚の長さ=隠れない部分
a-2*b=ans

printf("%d",ans);

return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:13:6: error: lvalue required as left operand of assignment
   13 | a-2*b=ans
      |      ^
main.c:13:10: error: expected ';' before 'printf'
   13 | a-2*b=ans
      |          ^
      |          ;
   14 | 
   15 | printf("%d",ans);
      | ~~~~~~
Language: C++

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

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

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

#include<iostream>

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

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:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << max(ans, 0) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
    9 |   cout << max(ans, 0) << endl;
      |           ^~~
      |           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:9:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << max(ans, 0) << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>

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

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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << max(ans, 0) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
    9 |   cout << max(ans, 0) << endl;
      |           ^~~
      |           std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:9:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << max(ans, 0) << 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 a,b;
  scanf("%d",&a);
  scanf("%d",&b);
  if(a>=2b){
    printf("%d",a-2*b);
  }
  else{
    printf("%d",0);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: invalid suffix "b" on integer constant
    6 |   if(a>=2b){
      |         ^~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:3: error: expected '}' before 'else'
    8 |   else{
      |   ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:3: error: expected '}' before 'else'
    8 |   else{
      |   ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:9: error: invalid suffix "b" on integer constant
    6 |   if(a>=2b){
      |         ^~
main.c:8:3: error: expected '}' before 'else'
    8 |   else{
      |   ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:9: error: invalid suffix "b" on integer constant
    6 |   if(a>=2b){
      |         ^~
main.c:8:3: error: expected '}' before 'else'
    8 |   else{
      |   ^~~~
Language: C++

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << (tmp<0) ? 0 : tmp << endl;
      |                         ~~~~^~~~~~~
Language: Java

import java.util.Scanner;
public class example1{

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


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

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.InputMismatchException;
import java.util.Scanner;

import javax.swing.JFrame;

public class example1{

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


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

import java.util.Scanner;
class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a;
    for(i=0; i < n; i++) {
      a[i] = sc.nextInt();
    }
    int S1 =0;
    int S2 = 0;
    for( int i =  0; i < n; i++) {
      S1 += a[i]*a[i];
    }
    for(int i = 0; i< n;i++) {
      S2 += a[i];
    }
    System.out.println(((S2)*(S2)-S1)/2);
    
    
    
    
    
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    for(i=0; i < n; i++) {
        ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
    for(i=0; i < n; i++) {
             ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
    for(i=0; i < n; i++) {
                    ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
      a[i] = sc.nextInt();
        ^
  symbol:   variable i
  location: class Main
4 errors
Language: C++

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

  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: unable to find numeric literal operator 'operator""b'
    6 |   if(a - 2b > 0){
      |          ^~
a.cc:7:21: error: unable to find numeric literal operator 'operator""b'
    7 |     printf("%d\n",a-2b);
      |                     ^~