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

/*林檎が A個、林檎の欠片が P個
林檎 1個は、砕くことで林檎の欠片 3個に。
また、林檎の欠片 個を鍋で煮込むことで、アップルパイが 1個作れます。
今ある材料で作れるアップルパイの最大数を求めてください。

*/
#include <stdio.h>


int main (void){
  int m,s;
scanf("%d %d",&m,&s);

printf("%d",(m*3+s)/2)
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:23: error: expected ';' before 'return'
   14 | printf("%d",(m*3+s)/2)
      |                       ^
      |                       ;
   15 | return 0;
      | ~~~~~~
Language: C++

#include<iostream>
using namespace std;

string in;
//char in[120];
pair<pair<string,int>,int> p[110];

int main(){
  int a;
  cin >> a;
  for(int i=0;i<a;i++){
    int t;
    cin >> in >> t;
    //scanf("%s%d",in,&t);
    p[i]=make_pair(make_pair(in,-t),i);
  }
  std::sort(p,p+a);
  for(int i=0;i<a;i++){
    printf("%d\n",p[i].second+1);
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   17 |   std::sort(p,p+a);
      |        ^~~~
      |        qsort
Language: C++

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

int main{
  int A,P;
  cin >> A >> P;
  cout << (A*3 + P)/2 ;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int A,P;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> A >> P;
      |   ^~~
a.cc:7:3: error: 'cout' does not name a type
    7 |   cout << (A*3 + P)/2 ;
      |   ^~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a; cin >> a;
  int p; cin >> p;
  cout<<(3*a+b)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'b' was not declared in this scope
    6 |   cout<<(3*a+b)/2<<endl;
      |              ^
Language: C++

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

int main() {
    int a, b, c;
    cin >> a >> b;
    cout << (3*a + b)/2 << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 's' was not declared in this scope
    8 |     cout << (3*a + b)/2 << s << endl;
      |                            ^
Language: C++


#include "pch.h"
#include <iostream>
#include <vector>
#include <string>

#define REP(i, n) for(int i=0; i<n; i++)

using namespace std;

int main()
{
	int a, p;

	cin >> a >> p;

	cout << (a * 3 + p) / 2;
}

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

#include <stdio.h>

int main(void) {
	int a,p;
	int pie;
	
	scanf("%d %d",&a,&p);
	
	printf("%d", ( 3 * a + p )/ 2;);
	
}


Compiler output:
main.c: In function 'main':
main.c:9:38: error: expected ')' before ';' token
    9 |         printf("%d", ( 3 * a + p )/ 2;);
      |               ~                      ^
      |                                      )
Language: C

#include <stdio.h>

int main()
{
	int a,p;
	scanf("%d %d",&a,&p);
	printf("%d"(a*3+p)/2);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: called object is not a function or function pointer
    7 |         printf("%d"(a*3+p)/2);
      |                ^~~~
Language: C++

#include <iostream>

int main() {
	int a, n;
  	std::cin >> a >> n;
  
  	std::cout << (3*a+n)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         std::cout << (3*a+n)/2 << endl;
      |                                   ^~~~
      |                                   std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

int main() {
	int a, n;
  	std:cin >> a >> n;
  
  	cout << (3*a+n)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         std:cin >> a >> n;
      |             ^~~
      |             std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout << (3*a+n)/2 << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         cout << (3*a+n)/2 << endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;
public class Main{
 public static void main(String[]args){
  Scanner sc= new Scanner;
  int A=sc.nextInt();
  int P=sc.nextInt();
  int x;
  x=(3*A+P)%2; 
  System.out.println(x);
   
 }
}

Compiler output:
Main.java:4: error: '(' or '[' expected
  Scanner sc= new Scanner;
                         ^
1 error
Language: C++

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

int main() {
  cin >> A;
  cin >> P;
  cout << A * 3 << endl;
  cout << P * 2 << endl;
}


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

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

int main() {
  int A;
  int B;
  sin >> A;
  sin >> B;
  A = A * 3 + B;
  B = A % 2;
  A = A - B;
  A = A / 2;
  cout << A << endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>>'
    7 |   sin >> A;
      |   ~~~~^~~~
a.cc:8:7: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>>'
    8 |   sin >> B;
      |   ~~~~^~~~
Language: C++

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

int main() {
  int A,P
    cin >> A >> P;
  cout << (3*A+P)/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> A >> P;
      |     ^~~
a.cc:7:16: error: 'P' was not declared in this scope
    7 |   cout << (3*A+P)/2 << endl;
      |                ^
Language: C++

int main(){
	int A, P;

	cin >> A >> P;

	P += A * 3;

	cout << P / 2 << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> A >> P;
      |         ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << P / 2 << endl;
      |         ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope
    8 |         cout << P / 2 << endl;
      |                          ^~~~
Language: C++

int main(){
	int A, P;

	cin >> A >> P;

	P += A * 3;

	cout << P / 3 << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> A >> P;
      |         ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << P / 3 << endl;
      |         ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope
    8 |         cout << P / 3 << endl;
      |                          ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before 'endl'
    7 |   cout << (3*a+b)/2 endl;
      |                    ^~~~~
      |                    ;
Language: C++

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

using namespace std;

int main(void){
  
  int a,p

  cin>>a>>p;
  
  int sumapple = 3 * a + p;
  
  int fin = sumapple / 2;
  
  
  cout<<fin<<endl;
  
  return 0;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'cin'
   10 |   cin>>a>>p;
      |   ^~~
a.cc:12:26: error: 'p' was not declared in this scope
   12 |   int sumapple = 3 * a + p;
      |                          ^
Language: C++

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

int main(void){

  cin>>int a>>int p;
  
  int sumapple = 3 * a + p;
  
  int fin = sumapple / 2;
  
  
  cout<<fin<<endl;
  
  return 0;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>int a>>int p;
      |   ^~~
      |   std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: expected primary-expression before 'int'
    6 |   cin>>int a>>int p;
      |        ^~~
a.cc:8:22: error: 'a' was not declared in this scope
    8 |   int sumapple = 3 * a + p;
      |                      ^
a.cc:8:26: error: 'p' was not declared in this scope
    8 |   int sumapple = 3 * a + p;
      |                          ^
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<fin<<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:13:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout<<fin<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<stdio.h>

int main(){
	int A , P , sum;
	scanf("%d %d",&A , &P);
	P +=3*A;
	sum =P/2
	printf("%d",sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'printf'
    7 |         sum =P/2
      |                 ^
      |                 ;
    8 |         printf("%d",sum);
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespeace std;
int a, p;

int main()
{
  cin >> a >> p;
  cout << (int) (a * 3 + p) / 2;
  return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespeace'
    3 | using namespeace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> a >> p;
      |   ^~~
      |   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 << (int) (a * 3 + p) / 2;
      |   ^~~~
      |   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 <bits/stdc++.h>

using namespeace std;
int a, p;

int main()
{
  cin >> a >> p;
  cout << (int) (a * 3 + p) / 2;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespeace'
    3 | using namespeace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> a >> p;
      |   ^~~
      |   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 << (int) (a * 3 + p) / 2;
      |   ^~~~
      |   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<bits/stdc++..h>

using namespace std;


int main(){
  int A, P;
  cin >> A >> P;
  cout << (A*3+P)/2 << endl;
  return 0;
}

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

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

int main{
  int a,p;
  cin >> a >> p;
  p += a*3;
  cout << p/2 << endl;
  return 0;
}

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

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

int main{
  int a,p;
  cin >> a >> p;
  p += a*3;
  cout << p/2 << endl;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namestream'
    2 | using namestream std;
      |       ^~~~~~~~~~
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a,p;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> a >> p;
      |   ^~~
a.cc:7:3: error: 'p' does not name a type
    7 |   p += a*3;
      |   ^
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout << p/2 << endl;
      |   ^~~~
a.cc:9:3: error: expected unqualified-id before 'return'
    9 |   return 0;
      |   ^~~~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

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

int main{
  int a,p;
  cin >> a >> p;
  p += a*3;
  cout << p/2 << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a,p;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> a >> p;
      |   ^~~
a.cc:7:3: error: 'p' does not name a type
    7 |   p += a*3;
      |   ^
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout << p/2 << endl;
      |   ^~~~
a.cc:9:3: error: expected unqualified-id before 'return'
    9 |   return 0;
      |   ^~~~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include<bits/c++.h>

using namespace std;

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

  p += a*3;

  int ans;

  ans = p/2;

  cout << ans << endl;
}

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

import java.util.Scanner;

public class ApplePie {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int p = sc.nextInt();
		int answer = (a*3 + p)/2;
		System.out.println(answer);
	}

}

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

#include<stdio.h>

int main(){

	int a,p=0;

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

	n=3*a+p;

	printf("%d\n",(3*a+p)/2);

	return 0;

	}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'n' undeclared (first use in this function)
    9 |         n=3*a+p;
      |         ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

void main(){

	int a,p,n,N;
	scanf("%d %d",%a,&p);

	n=3*a+p;

	if(n%2==0){
	N=n/2;}else{
	N=(n-1)/2;
	}

	printf("%d",%N);

	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected expression before '%' token
    6 |         scanf("%d %d",%a,&p);
      |                       ^
main.c:15:21: error: expected expression before '%' token
   15 |         printf("%d",%N);
      |                     ^
main.c:17:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |         return 0;
      |                ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
Language: C

#include <stdio.h>
#include <string.h>
 
int main() {
	int N, P[100], i, j, max;
	char S[100][11];
	scanf("%d", &N);
	for (i = 0; i < N; i++) {
		scanf("%s %d", S[i], &P[i]);
	}
	for (i = 0; i < N; i++) {
		max = i;
		for (j = 0; j < N; j++) {
			if (strcmp(S[max], S[j]) > 0 || strcmp(S[max], S[j]) == 0 && P[max] < P[j]) {
				max = j;
			}
		}
		printf("%d\n", max + 1);
		S[max][0] = '{';
	}
	return 0;

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

#include <stdio.h>

int main() {
	int A, P;
	scanf_s("%d %d", &A, &P);
	printf("%d\n", (P + A * 3) / 2);
	return 0;
}

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, &P);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>

int main() {
	int A, P;
	scanf_s("%d", &A);
	scanf_s("%d", &P);
	printf("アップルパイの最大数：%d\n", (P + A * 3) / 2);
	return 0;
}

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", &A);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>

int main() {
	int A, P;
	printf("0以上の整数を入力してください。\n");
	printf("リンゴの個数：");
	scanf_s("%d", &A, 4);
	printf("100以下の整数を入力してください。\n");
	printf("リンゴの欠片：");
	scanf_s("%d", &P, 4);
	printf("アップルパイの最大数：%d\n", (P + A * 3) / 2);
	return 0;
}

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

#include <stdio.h>

int main() {
	int A, P;
	while (1) {
		printf("0以上の整数を入力してください。\n");
		printf("リンゴの個数：");
		scanf_s("%d", &A, 4);
		if (A >= 0)
			break;
	}
	while (1) {
		printf("100以下の整数を入力してください。\n");
		printf("リンゴの欠片：");
		scanf_s("%d", &P, 4);
		if (P <= 100)
			break;
	}
	printf("アップルパイの最大数：%d\n", (P + A * 3) / 2);
	return 0;
}

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

#include <stdio.h>

int main() {
	int A, P;
	while (1) {
		printf("0以上の整数を入力してください。\n");
		printf("リンゴの個数：");
		scanf_s("%d", &A, 4);
		if (A >= 0)
			break;
	}
	while (1) {
		printf("100以下の整数を入力してください。\n");
		printf("リンゴの欠片：");
		scanf_s("%d", &P, 4);
		if (P <= 100)
			break;
	}
	P = P + A * 3;
	printf("アップルパイの最大数：%d\n", P / 2);
	return 0;
}

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

#include <stdio.h>

int main() {
	int A, P;
	while (1) {
		printf("0以上の整数を入力してください。\n");
		printf("リンゴの個数：");
		scanf_s("%d", &A, 4);
		if (A >= 0)
			break;
	}
	while (1) {
		printf("100以下の整数を入力してください。\n");
		printf("リンゴの欠片：");
		scanf_s("%d", &P, 4);
		if (P <= 100)
			break;
	}
	P = P + A * 3;
	printf("アップルパイの最大数：%d", P / 2);
	return 0;
}

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

#include <stdio.h>

int main() {
	int A, P;
	while (1) {
		printf("0以上の整数を入力してください。\n");
		printf("リンゴの個数：");
		scanf_s("%d", &A);
		if (A >= 0)
			break;
	}
	while (1) {
		printf("100以下の整数を入力してください。\n");
		printf("リンゴの欠片：");
		scanf_s("%d", &P);
		if (P <= 100)
			break;
	}
	P = P + A * 3;
	printf("アップルパイの最大数：%d", P / 2);
	return 0;
}

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

#include <stdio.h>

int main() {
	int A = -1, P = 101;
	while (A < 0) {
		printf("0以上の整数を入力してください。\n");
		printf("リンゴの個数：");
		scanf_s("%d", &A);
	}
	while (P > 100) {
		printf("100以下の整数を入力してください。\n");
		printf("リンゴの欠片：");
		scanf_s("%d", &P);
	}
	P = P + A * 3;
	printf("アップルパイの最大数：%d", P / 2);
	return 0;
}

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

#include <stdio.h>

int main() {
	int A = -1, P = 101;
	while (A < 0) {
		printf("0以上の整数を入力してください。\n");
		printf("リンゴの個数：");
		scanf_s("%d", &A);
	}
	while (P > 100) {
		printf("100以下の整数を入力してください。\n");
		printf("リンゴの欠片：");
		scanf_s("%d", &P);
	}
	P = P + A * 3;
	printf("アップルパイの最大数：%d", P / 2);
}

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

#include <studio.h>

int main(int argc, char const *argv[])
{
    int a, b;
    scanf("%d %d", &a, &b);
    printf("%d", (a*3 + b) / 2);
    return 0;
}


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

#include <iostream>
#include <vector>
#include <string>
 
using namespace std;
 
int main(){
    int n;
    cin >> n;
    vector < pair<pair<string, int>, int> >a;
 
    for (int i = 1; i <= n; i++){
        string s;
        int p;
        cin >> s >> p;
        p = -p;
        a.push_back(make_pair(make_pair(s, p), i));
    }
 
    sort(a.begin(), a.end());
 
    for (int i = 0; i < n; i++){
        cout << a[i].second << endl;
    }
 
    
}

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

#include <iostream>
using namespace std;

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

    peaces = (A*3) + P;
    cout << peaces/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'peaces' was not declared in this scope
    9 |     peaces = (A*3) + P;
      |     ^~~~~~
Language: C++

#include<iostream.h>
using namespace std;
int main()
{
 int A,P;
cin>>A>>P;
cout<<A*3+P/2<<endl;
return 0;
}

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

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

int main(){
  int n,p;
  cin >> a >> p;
  cout << (a*3+p)*0.5 << endl;
}

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

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner teclado = new Scanner(System.in);
		int M = teclado.nextInt();
		int P = teclado.nextInt();
		int Q = ((M * 3) + P) / 2;
		
		System.out.println((int);
                           
		teclado.close();
		
    }
}

Compiler output:
Main.java:9: error: illegal start of expression
		System.out.println((int);
		                        ^
1 error
Language: Java

import java.util.Scanner;

public class Apple_Pie {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int P = scan.nextInt();

		int Ap = (P + A * 3)/ 2;

		System.out.println(Ap);
	}

}

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

#include <bits/stdc++.h>
int main() {
  int a, b;
  cin >> a >> b;
  cout << (b + a * 3) / 2;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << (b + a * 3) / 2;
      |   ^~~~
      |   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>


int main() {
  unsigned int apple, a_piece, num_apple_pi;

  cin >> apple;
  cin >> a_piece;

  num_apple_pi = (3 * apple + a_piece) / 2;

  cout << num_apple_pi << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> apple;
      |   ^~~
      |   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:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << num_apple_pi << 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:12:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   cout << num_apple_pi << endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>

int main(void){
  int a,p;
  
  scanf("%d%d".&a, &p)
  printf("%d", (a*3+p)/2);

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected unqualified-id before '&' token
    6 |   scanf("%d%d".&a, &p)
      |                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
    7 |   cou<<((a*3)+b)/2<<endl;
      |   ^~~
      |   cos
Language: C++

A, P = map(int, input().split())

apple_crumb = A * 3

nbr_of_applepie = round((apple_crumb + P) / 2)

print(nbr_of_applepie)


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A, P = map(int, input().split())
      | ^
Language: C

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

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>int main(void){
      |                  ^~~
main.c:3:9: error: expected declaration specifiers or '...' before string constant
    3 |   scanf("%d %d",&a,&b);
      |         ^~~~~~~
main.c:3:17: error: expected declaration specifiers or '...' before '&' token
    3 |   scanf("%d %d",&a,&b);
      |                 ^
main.c:3:20: error: expected declaration specifiers or '...' before '&' token
    3 |   scanf("%d %d",&a,&b);
      |                    ^
main.c:4:10: error: expected declaration specifiers or '...' before string constant
    4 |   printf("%d\n",(a * 3 + b) / 2);
      |          ^~~~~~
main.c:4:17: error: expected declaration specifiers or '...' before '(' token
    4 |   printf("%d\n",(a * 3 + b) / 2);
      |                 ^
main.c:5:3: error: expected identifier or '(' before 'return'
    5 |   return 0;
      |   ^~~~~~
main.c:6:1: error: expected identifier or '(' before '}' token
    6 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
   //cout << "Hello World" << endl; 
   int a,p
   cin>>a>>p;
   cout<<(3*a+p)/2;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: expected initializer before 'cin'
    7 |    cin>>a>>p;
      |    ^~~
a.cc:8:15: error: 'p' was not declared in this scope
    8 |    cout<<(3*a+p)/2;
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(
  {
    int a,p;
    cin>>a>>p;
    cout<<(3*a+p)/2;
  
  
  
  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,p;
      |     ^~~
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,p;
      |     ~~~
a.cc:3:9: note: to match this '('
    3 | int main(
      |         ^
a.cc:5:11: error: 'p' was not declared in this scope
    5 |     int a,p;
      |           ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin>>a>>p;
      |     ^~~
a.cc:7:5: error: 'cout' does not name a type
    7 |     cout<<(3*a+p)/2;
      |     ^~~~
a.cc:11:3: error: expected unqualified-id before 'return'
   11 |   return 0;
      |   ^~~~~~
a.cc:12:3: error: expected declaration before '}' token
   12 |   }
      |   ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before 'cout'
    8 |   ans = (A * 3 + P)/2
      |                      ^
      |                      ;
    9 |   cout << ans << endl;
      |   ~~~~
Language: C++

#include "pch.h"
#include <iostream>
using namespace std;

int main()
{
	int x, y; cin >> x >> y;
	int sum = x * 3 + y;
	cout << sum / 2 << '\n';
}
// 335


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

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

int main () {
  
  int n, m;
  cin >> n >> m;
  
  cout << ((3*n)+m)/2 << endl;
}

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

#include <bits/stdc++.h>

int main(){
	int a, p;
	cin >> a >> p;
 	cout << (a * 3 + p) / 2; 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> a >> p;
      |         ^~~
      |         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:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout << (a * 3 + p) / 2;
      |         ^~~~
      |         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<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

cin >> a >> p;


cout << (a*3 + p)/2 << endl;




//////////////////////////////////////////////////////
return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:8: error: 'a' was not declared in this scope
   40 | cin >> a >> p;
      |        ^
a.cc:40:13: error: 'p' was not declared in this scope
   40 | cin >> a >> p;
      |             ^
Language: Java

import java.uti.*;
public class Main{
	public static void main(String args[]){
    	Scanner sc= new Scanner(System.in);
    	int A=sc.nextInt();
    	int P=sc.nextInt();
     	int N;
    	N=(3*A+P)/2;
    	System.out.println(N);
    }
}

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

#include <stdio.h>

int main() {
	int A, P;

	scanf_s("%d%d", &A, &P);
	printf("%d\n", (3 * A + P) / 2);

	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, &P);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,s.p;
	cin>>a>>s;
	a=a*3;
	p=a*3+s;
	cout<<p; 
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected initializer before '.' token
    5 |         int a,s.p;
      |                ^
a.cc:6:17: error: 's' was not declared in this scope
    6 |         cin>>a>>s;
      |                 ^
a.cc:8:9: error: 'p' was not declared in this scope
    8 |         p=a*3+s;
      |         ^
Language: C++

#include<stdio.h>
int main(void)
{
	int A, P, N, O, Q;
	scanf("%d%d", \A, \P);
	A*3 = N;
	N = N+P
	N/2 = Q;
	printf("%d\n" Q);
	return 0;
}

Compiler output:
a.cc:5:23: error: stray '\' in program
    5 |         scanf("%d%d", \A, \P);
      |                       ^
a.cc:5:27: error: stray '\' in program
    5 |         scanf("%d%d", \A, \P);
      |                           ^
a.cc: In function 'int main()':
a.cc:6:10: error: lvalue required as left operand of assignment
    6 |         A*3 = N;
      |         ~^~
a.cc:7:16: error: expected ';' before 'N'
    7 |         N = N+P
      |                ^
      |                ;
    8 |         N/2 = Q;
      |         ~       
a.cc:9:22: error: expected ')' before 'Q'
    9 |         printf("%d\n" Q);
      |               ~      ^~
      |                      )
Language: C

#include <stdio.h>
int main(void)
{
	int A, P;
	scanf("%d%d" &A,&P);
	int ans = (A*3+P)/2 ;
	printf("%d", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: invalid operands to binary & (have 'char *' and 'int')
    5 |         scanf("%d%d" &A,&P);
      |               ~~~~~~ ^
      |               |
      |               char *
Language: C

#include <stdio.h>
int main(void)
{
	int A, P;
	scanf("%d%d" &A,&P);
	int ans = (A*3+P)/2
	printf("%d", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: invalid operands to binary & (have 'char *' and 'int')
    5 |         scanf("%d%d" &A,&P);
      |               ~~~~~~ ^
      |               |
      |               char *
main.c:7:9: error: expected ',' or ';' before 'printf'
    7 |         printf("%d", ans);
      |         ^~~~~~
Language: C++

#include<stdio.h>
int main(void)
{
	int A, P, N, O, Q;
	scanf("%d%d", \A, \P);
	A*3 = N;
	N+P = O;
	O/2 = Q;
	printf("%d\n" Q);
	return 0;
}

Compiler output:
a.cc:5:23: error: stray '\' in program
    5 |         scanf("%d%d", \A, \P);
      |                       ^
a.cc:5:27: error: stray '\' in program
    5 |         scanf("%d%d", \A, \P);
      |                           ^
a.cc: In function 'int main()':
a.cc:6:10: error: lvalue required as left operand of assignment
    6 |         A*3 = N;
      |         ~^~
a.cc:7:10: error: lvalue required as left operand of assignment
    7 |         N+P = O;
      |         ~^~
a.cc:8:10: error: lvalue required as left operand of assignment
    8 |         O/2 = Q;
      |         ~^~
a.cc:9:22: error: expected ')' before 'Q'
    9 |         printf("%d\n" Q);
      |               ~      ^~
      |                      )
Language: C++

#include<stdio.h>
int main(void)
{
	int A, P, N, O, Q;
	scanf("%d%d", \A, \P)
	A*3 = N;
	N+P = O
	O/2 = Q
	printf("%d\n" Q);
	return 0;
}

Compiler output:
a.cc:5:23: error: stray '\' in program
    5 |         scanf("%d%d", \A, \P)
      |                       ^
a.cc:5:27: error: stray '\' in program
    5 |         scanf("%d%d", \A, \P)
      |                           ^
a.cc: In function 'int main()':
a.cc:5:30: error: expected ';' before 'A'
    5 |         scanf("%d%d", \A, \P)
      |                              ^
      |                              ;
    6 |         A*3 = N;
      |         ~                     
a.cc:7:10: error: lvalue required as left operand of assignment
    7 |         N+P = O
      |         ~^~
Language: C++

#include<stdio.h>
int main(void)
{
	int A, P, N, O, Q;
	A*3 = N;
	N+P = O
	O/2 = Q
	printf("%d\n" Q);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: lvalue required as left operand of assignment
    5 |         A*3 = N;
      |         ~^~
a.cc:6:10: error: lvalue required as left operand of assignment
    6 |         N+P = O
      |         ~^~
Language: C++

#include<stdio.h>
int main(void)
{
	int A, P, N;
	printf("(A*3+P)/2=%d\n" N);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:32: error: expected ')' before 'N'
    5 |         printf("(A*3+P)/2=%d\n" N);
      |               ~                ^~
      |                                )
Language: C++

#include<stdio.h>
int main(void)
{
	int A, P, n;
	printf("(A*3+P)/2=%d" n);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:30: error: expected ')' before 'n'
    5 |         printf("(A*3+P)/2=%d" n);
      |               ~              ^~
      |                              )
Language: C++

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

int main () {
int A , P ;
cin >> A >> P ;
cout << (3 * A + P ) / 2 << endl ;
return 0;
}


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

#include<iostream>
using namespace atd;
int main(){
    int a,b;
    cin>>a>>b;
    cout<<(a*3+b)/2<<endl;
    return 0;
}

Compiler output:
a.cc:2:17: error: 'atd' is not a namespace-name
    2 | using namespace atd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>a>>b;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout<<(a*3+b)/2<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout<<(a*3+b)/2<<endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
import java.util.Scanner;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
	    
	    Scanner scanner = new Scanner(System.in);
	    int A = scanner.nextInt();
	    int P = scanner.nextInt();

        int numPiece = 3*A+P;
        int numPie = numPiece / 2;

	    System.out.println(String.valueOf(numPie);
	}
}

Compiler output:
Main.java:19: error: ')' or ',' expected
	    System.out.println(String.valueOf(numPie);
	                                             ^
1 error
Language: C

a, p=map(int, input().split())
b=(a/3)+p
if b%2==0:
    print(b/2)
if else:
    print((b-1)/2)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a, p=map(int, input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
    1 | a, p=map(int, input().split())
      |    ^
main.c:1:6: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | a, p=map(int, input().split())
      |      ^~~
main.c:1:10: error: expected expression before 'int'
    1 | a, p=map(int, input().split())
      |          ^~~
main.c:2:1: error: expected ',' or ';' before 'b'
    2 | b=(a/3)+p
      | ^
Language: C

a,p=map(int,input().split())
b=(a/3)+p
if b%2==0:
    print(b/2)
if else:
    print((b-1)/2)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a,p=map(int,input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
    1 | a,p=map(int,input().split())
      |   ^
main.c:1:5: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | a,p=map(int,input().split())
      |     ^~~
main.c:1:9: error: expected expression before 'int'
    1 | a,p=map(int,input().split())
      |         ^~~
main.c:2:1: error: expected ',' or ';' before 'b'
    2 | b=(a/3)+p
      | ^
Language: C++

#include <cstdio>
#include <string>

using namespace std;

int numOfPie(int N, int P){
    return (N*3+P)/2;
}


int main(void){
  int N,P;

  scanf("%d%d", &N, &P);

  cout << numOfPie(N,P) << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << numOfPie(N,P) << endl;
      |   ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:16:28: error: 'endl' was not declared in this scope
   16 |   cout << numOfPie(N,P) << endl;
      |                            ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 |
Language: C

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

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

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


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



int main() {
  ll n,m;
  	ci(n>>m);
  co((3*n+2*m)/2)
}

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

using namespace std;

int main(){
    int A,P;
    cin>>A,P;
    int ans = (A*3+P)/2;
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>A,P;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout<<ans<<endl;
      |     ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:16: error: 'endl' was not declared in this scope
    7 |     cout<<ans<<endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>

int main() {
  int apple = 0;
  int piece = 0;
  int pieceSum = 0;
  int result = 0;
  cin >> apple >> piece;
  pieceSum = apple * 3 + piece;
  result = pieceSum / 2;
  cout << result;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> apple >> piece;
      |   ^~~
      |   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:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << result;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~