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

#include <bits/stdc++.h>
int main(){
  int a,b;
  cin >> a >> b;
  if(b >= 13){
    cout << b;
  }else if(b >= 6){
    cout << b/2;
  }else cout << 0;
  
  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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << b;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << b/2;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   }else 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<bits\stdc++>
int main(){
  int a,b;
  cin >> a >> b;
  if(b >= 13){
    cout << b;
  }else if(b >= 6){
    cout << b/2;
  }else cout << 0;
  
  return 0;
}
    

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

#include<bits.stdc++>
int main(){
  int a,b;
  cin >> a >> b;
  if(b >= 13){
    cout << b;
  }else if(b >= 6){
    cout << b/2;
  }else cout << 0;
  
  return 0;
}
    

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

#include<bits/stdc++>
int main(){
  int a,b;
  cin >> a >> b;
  if(b >= 13){
    cout << b;
  }else if(b >= 6){
    cout << b/2;
  }else cout << 0;
  
  return 0;
}
    

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

    #include <iostream>
    #include <vector>
    using namespace std;
     
    int main() {
        int N, M; cin >> N >> M;
        vector<int> G(N+1, 0);
        for (int i = 0; i < M; ++i) {
            int l, r; cin >> l >> r; --l;
            G[l]++;
            G[r]--;
        }
        for (int i = 0; i < N; ++i) G[i+1] += G[i];
        int res = 0;
        for (int i = 0; i < N; ++i) if (G[i] == M) ++res;
        cout << res << endl;
    }

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'cour' was not declared in this scope
   11 |     cour << B/2 << endl;
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'cour' was not declared in this scope
   11 |     cour << B << endl;
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'cour' was not declared in this scope
   11 |     cour<<B<<endl;
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected primary-expression before '<' token
    9 |  else if(A=<5){
      |            ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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





int main(){
	int n,k;
	string s;
	cin>>a>>b;
	int ans =0;
	if(a>=13)ans=b;
	if(a<=12 && a>=6)ans=b/2;
	if(a<5)ans=0;
	cout<<ans;
	return 0;
}


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

#include<iostream>
using namespace std;
int main()
{
  int a, b;
  cin >> a >> b;
  if (a < 6) printf("0\n");
  else if (a > 12) printf("%d\n", &b/2);
  else printf("%d\n", &b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: invalid operands of types 'int*' and 'int' to binary 'operator/'
    8 |   else if (a > 12) printf("%d\n", &b/2);
      |                                   ~~^~
      |                                   |  |
      |                                   |  int
      |                                   int*
Language: C++

include<iostream>
using namespace std;
int main()
{
  int a, b;
  cin >> a >> b;
  if (a < 6) printf("0\n");
  else if (a > 12) printf("%d\n", &b);
  else printf("%d/2\n", &b);
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:14: error: 'printf' was not declared in this scope
    7 |   if (a < 6) printf("0\n");
      |              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<iostream>
a.cc:8:20: error: 'printf' was not declared in this scope
    8 |   else if (a > 12) printf("%d\n", &b);
      |                    ^~~~~~
a.cc:8:20: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:9:8: error: 'printf' was not declared in this scope
    9 |   else printf("%d/2\n", &b);
      |        ^~~~~~
a.cc:9:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main()
{
  int a, b;
  cin >> a >> b;
  if (a < 6) printf("0\n");
  else if (a > 12) printf("%d\n", &b);
  else printf("%d/2\n", &b);
}    

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> a >> b;
      |   ^~~
a.cc:5:14: error: 'printf' was not declared in this scope
    5 |   if (a < 6) printf("0\n");
      |              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:6:20: error: 'printf' was not declared in this scope
    6 |   else if (a > 12) printf("%d\n", &b);
      |                    ^~~~~~
a.cc:6:20: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:7:8: error: 'printf' was not declared in this scope
    7 |   else printf("%d/2\n", &b);
      |        ^~~~~~
a.cc:7:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main()
{
  int a, b;
  cin >> a, b;
  if (a < 6) printf("0\n");
  else if (a > 12) printf("%d\n", &b);
  else printf("%d/2\n", &b);
}    

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> a, b;
      |   ^~~
a.cc:5:14: error: 'printf' was not declared in this scope
    5 |   if (a < 6) printf("0\n");
      |              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:6:20: error: 'printf' was not declared in this scope
    6 |   else if (a > 12) printf("%d\n", &b);
      |                    ^~~~~~
a.cc:6:20: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:7:8: error: 'printf' was not declared in this scope
    7 |   else printf("%d/2\n", &b);
      |        ^~~~~~
a.cc:7:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

include<iostream>
using namespace std;

int main()
{
  int a, b;
  scanf("%d%d", &a, &b);
  if (a < 6) printf("0\n");
  else if (a > 12) printf("%d\n", &b);
  else printf("%d/2\n", &b);
}    

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'scanf' was not declared in this scope
    7 |   scanf("%d%d", &a, &b);
      |   ^~~~~
a.cc:8:14: error: 'printf' was not declared in this scope
    8 |   if (a < 6) printf("0\n");
      |              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<iostream>
a.cc:9:20: error: 'printf' was not declared in this scope
    9 |   else if (a > 12) printf("%d\n", &b);
      |                    ^~~~~~
a.cc:9:20: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:10:8: error: 'printf' was not declared in this scope
   10 |   else printf("%d/2\n", &b);
      |        ^~~~~~
a.cc:10:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?B:((A>=6)?(B/2):0) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:43: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   std::cout << (A>=13)?B:((A>=6)?(B/2):0) << std::endl;
      |                          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?B:(A>=6)?(B/2):0 << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:41: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   std::cout << (A>=13)?B:(A>=6)?(B/2):0 << std::endl;
      |                                       ~~^~~~~~~~~~~~
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A  >> B;
  std::cout << (A>=13)?B:((A>=6)?B/2:0) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:41: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   std::cout << (A>=13)?B:((A>=6)?B/2:0) << std::endl;
      |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A  >> B;
  std::cout << (A>=13)?B:((A>=6)?(B/2):0) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:43: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   std::cout << (A>=13)?B:((A>=6)?(B/2):0) << std::endl;
      |                          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?B:(A>=6)?((B/2):0)<< std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:39: error: expected ')' before ':' token
    7 |   std::cout << (A>=13)?B:(A>=6)?((B/2):0)<< std::endl;
      |                                 ~     ^
      |                                       )
a.cc:7:54: error: expected ':' before ';' token
    7 |   std::cout << (A>=13)?B:(A>=6)?((B/2):0)<< std::endl;
      |                                                      ^
      |                                                      :
a.cc:7:54: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?B:((A>=6)?((B/2):0))) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:40: error: expected ')' before ':' token
    7 |   std::cout << (A>=13)?B:((A>=6)?((B/2):0))) << std::endl;
      |                                  ~     ^
      |                                        )
a.cc:7:58: error: expected ':' before ';' token
    7 |   std::cout << (A>=13)?B:((A>=6)?((B/2):0))) << std::endl;
      |                                                          ^
      |                                                          :
a.cc:7:58: error: expected primary-expression before ';' token
a.cc:7:58: error: expected ')' before ';' token
    7 |   std::cout << (A>=13)?B:((A>=6)?((B/2):0))) << std::endl;
      |                          ~                               ^
      |                                                          )
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?B:((A>=6)?((B/2):0)) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:40: error: expected ')' before ':' token
    7 |   std::cout << (A>=13)?B:((A>=6)?((B/2):0)) << std::endl;
      |                                  ~     ^
      |                                        )
a.cc:7:57: error: expected ':' before ';' token
    7 |   std::cout << (A>=13)?B:((A>=6)?((B/2):0)) << std::endl;
      |                                                         ^
      |                                                         :
a.cc:7:57: error: expected primary-expression before ';' token
a.cc:7:57: error: expected ')' before ';' token
    7 |   std::cout << (A>=13)?B:((A>=6)?((B/2):0)) << std::endl;
      |                          ~                              ^
      |                                                         )
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?(B:((A>=6)?(B/2):0));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ')' before ':' token
    7 |   std::cout << (A>=13)?(B:((A>=6)?(B/2):0));
      |                        ~ ^
      |                          )
a.cc:7:44: error: expected ':' before ';' token
    7 |   std::cout << (A>=13)?(B:((A>=6)?(B/2):0));
      |                                            ^
      |                                            :
a.cc:7:44: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
int main(){
  int A;
  int B;
  std::cin >> A;
  std::cin >> B;
  std::cout << (A>=13)?B:((A>=6)?B/2:0);

Compiler output:
a.cc: In function 'int main()':
a.cc:7:41: error: expected '}' at end of input
    7 |   std::cout << (A>=13)?B:((A>=6)?B/2:0);
      |                                         ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namesapce std;
main(){
  int a,b;
  cin>>a>>b;
  int ans=0;
  if (a>=6 && a<=12) ans+=b/2;
  else if (a>=13) ans+=b;
  cout<<ans;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
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<<ans;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

int main(){
int a,b;scanf("%d%d",&a,&b);
if(a<6)printf("0\n");
else if(a<13)printf("%d\n",b/2);
else printf("%d\n",b);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'scanf' was not declared in this scope
    2 | int a,b;scanf("%d%d",&a,&b);
      |         ^~~~~
a.cc:3:8: error: 'printf' was not declared in this scope
    3 | if(a<6)printf("0\n");
      |        ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:4:14: error: 'printf' was not declared in this scope
    4 | else if(a<13)printf("%d\n",b/2);
      |              ^~~~~~
a.cc:4:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:5:6: error: 'printf' was not declared in this scope
    5 | else printf("%d\n",b);
      |      ^~~~~~
a.cc:5:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main(void)
{
  int a;
  
  printf("整数を入力してください = ")
    scanf("%d",&a);
  
  if( a % 2 == 0 ){
    printf("%dは偶数です\n", a);
  } else {
    printf("%d は奇数です\n", a);
  }
  
  return0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'printf' was not declared in this scope
    5 |   printf("整数を入力してください = ")
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
a.cc:14:3: error: 'return0' was not declared in this scope
   14 |   return0
      |   ^~~~~~~
Language: C

#include<stdio.h>

int main(void)
{
  int a,b;
  scanf("%d",&a);
    scanf("%d",&b );
    if(a<<12)
    printf("%d\n",b );
    else if(a>>13&&5>>a)
    printf("%d",b/2);
    else
    printf("0\n" );
  
  retutn 0;
    }

Compiler output:
main.c: In function 'main':
main.c:15:3: error: 'retutn' undeclared (first use in this function)
   15 |   retutn 0;
      |   ^~~~~~
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:9: error: expected ';' before numeric constant
   15 |   retutn 0;
      |         ^~
      |         ;
Language: C

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

	int a,b=0;
	scanf("%d %d",&a,&b);
	if(a=>13){
	printf("%d",b);}else{
	if(a<=5){printf("0");}else{
	printf("%d",b/2);}}

	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:6:14: error: expected expression before '>' token
    6 |         if(a=>13){
      |              ^
Language: C

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

	int a,b=0;
	scanf("%d %d",&a,&b);
	if(a=>13){
	printf("%d",b);}else{
	if(a<=5){printf("0")}else{
	printf("%d",b/2);}}

	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:6:14: error: expected expression before '>' token
    6 |         if(a=>13){
      |              ^
main.c:8:29: error: expected ';' before '}' token
    8 |         if(a<=5){printf("0")}else{
      |                             ^
      |                             ;
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>

struct Pair {
  std::size_t b;
  std::size_t c;
};

int main() {
  std::size_t n, m;
  std::cin >> n >> m;

  std::vector<std::size_t> a(n);
  for (auto&& ai : a) std::cin >> ai;
  std::sort(a.begin(), a.end());

  std::vector<Pair> pairs(m);
  for (auto&& p : pairs) std::cin >> p.b >> p.c;
  std::sort(pairs.begin(), pairs.end(),
            [](const auto& p1, const auto& p2) { return p1.c > p2.c; });

  std::size_t k = 0;
  for (auto&& p : pairs) {
    for (std::size_t j = 0; j < p.b; ++j) {
      if (a[k] < p.c)
        a[k++] = p.c;
      else
        break;
    }
  }

  const auto sum = std::accumulate(a.begin(), a.end(), 0ULL);
  std::cout << sum << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:25: error: 'accumulate' is not a member of 'std'
   33 |   const auto sum = std::accumulate(a.begin(), a.end(), 0ULL);
      |                         ^~~~~~~~~~
Language: C++

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();

        if (a >= 13){
            System.out.println(b);
        }else if (6 <= a & a <= 12){
            System.out.println(b/2);
        }else if (a <= 5){
            System.out.println(0);
        }
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: Java

public class Main {

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

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int fee = 0;

		if(A<=5) {
			fee = 0;
		}if(6<=A && A<=12) {
			fee = B/2;
		}if(13<=A) {
			fee = B;
		}

		System.out.println(fee);
	}

}


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

#include <stddio.h>

int main(void){
  int a, b;
  
  scanf("%d %d", &a, &b);
  
  if(b >= 13){
    printf("%d\n", b);
  }else if(b >= 6 && b <= 12){
    printf("%d\n", b/2);
  }else{
    printf("0\n");
  }
  
  return 0;
}

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

A, B = gets.split.map(&:to_i)

if A <= 5 then
  put 0
elsif 6 <= A && A <= 12 then
  puts B / 2
else
  puts B
end

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | A, B = gets.split.map(&:to_i)
      | ^
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 'B' [-Wimplicit-int]
    1 | A, B = gets.split.map(&:to_i)
      |    ^
main.c:1:8: error: 'gets' undeclared here (not in a function)
    1 | A, B = gets.split.map(&:to_i)
      |        ^~~~
main.c:1:24: error: expected expression before ':' token
    1 | A, B = gets.split.map(&:to_i)
      |                        ^
main.c:3:1: error: expected ',' or ';' before 'if'
    3 | if A <= 5 then
      | ^~
Language: C

A, B = gets.split.map(&:to_i)

if A <= 5 then
  print 0

elsif 6 <= A && A <= 12 then
  print B / 2

else
  print B

end

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | A, B = gets.split.map(&:to_i)
      | ^
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 'B' [-Wimplicit-int]
    1 | A, B = gets.split.map(&:to_i)
      |    ^
main.c:1:8: error: 'gets' undeclared here (not in a function)
    1 | A, B = gets.split.map(&:to_i)
      |        ^~~~
main.c:1:24: error: expected expression before ':' token
    1 | A, B = gets.split.map(&:to_i)
      |                        ^
main.c:3:1: error: expected ',' or ';' before 'if'
    3 | if A <= 5 then
      | ^~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner;
        int age = sc.nextInt();
        int priceB = sc.nextInt();
        
        if (priceB / 2 == 0){
            if(age <= 13 ){
                System.out.println(priceB);
            }else if(age >= 6 || age <=12){
                System.out.println(priceB / 2);
            }else if(){
                System.out.println("無料です");
            }
        } else{
            System.out.println("値段は偶数を入力してください");
        }
    }
}


Compiler output:
Main.java:6: error: '(' or '[' expected
        Scanner sc = new Scanner;
                                ^
Main.java:15: error: illegal start of expression
            }else if(){
                     ^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
    	Scanner sc=new Scanner(System.in);
      	int A=sc.nextInt();
      	int B=sc.nextInt();
      	if (A>=13){
        System.out.println(B);
        } elif (A>=6 && A<=12){
        System.out.println(B/2);
        }else{
        System.out.println(0);
        }
        
        
    }
}

Compiler output:
Main.java:9: error: ';' expected
        } elif (A>=6 && A<=12){
                              ^
Main.java:11: error: 'else' without 'if'
        }else{
         ^
2 errors
Language: C++

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

int main() {
    int A;
    cin >> A;
    if ( A >= 13 )
      cout << B << endl;
    if ( A < 13 && A >= 6 )
      cout << B / 2 << endl;
    if ( A < 6 )
      cout << 0 << endl;
}

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

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

int main() {
  int A,B;
  cin >>A>>B;
 if(A >= 13){
   cout << B << endl;
 }
  else if (A >= 6 && A <= 12){
    couT << B/2 << endl;
  }
else {
cout << 0 << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'couT' was not declared in this scope
   11 |     couT << B/2 << endl;
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before '{' token
    7 |         }else(A>=6){
      |                    ^
      |                    ;
a.cc:9:10: error: 'else' without a previous 'if'
    9 |         }else{
      |          ^~~~
Language: Java

import java.util.Scanner;
 
public class Main{
  public static void main(String[] args) {
    int age = 0;
    int change = 0;
    int result = 0;
    Scanner sc = new Scanner(System.in);
    
    age = sc.nextInt();
    change = sc.nextInt();
    
    if(age <= 5) {
      result = 0;
    } else if(6 <= age && age <= 12) {
      result = change / 2;
    } else {
      result = change;
    }
    System.out.println(result);
  }
}
import java.util.scanner;

public class Main{
  public static void main(String[] args) {
    int age = 0;
    int change = 0;
    int result = 0;
    Scanner sc = new Scanner(System.in);
    
    age = sc.nextInt();
    change = sc.nextInt();
    
    if(age <= 5) {
      result = 0;
    } else if(6 <= age && age <= 12) {
      result = change / 2;
    } else {
      result = change;
    }
    System.out.println(result);
  }
}

Compiler output:
Main.java:23: error: class, interface, enum, or record expected
import java.util.scanner;
^
1 error
Language: Java

import java.io.*;
import java.util.*;

public class ABC127d{
    
    public static void main(String[] arg){

        Scanner scan =new Scanner(System.in);

        int n=Integer.parseInt(scan.next());
        int m=Integer.parseInt(scan.next());

        long[] A=new long[n];

        for(int i=0;i<n;i++){
            A[i]=scan.nextLong();
        }


        for(int i=0;i<m;i++){
            int b=Integer.parseInt(scan.next());
            int c=Integer.parseInt(scan.next());
            
            Arrays.sort(A);

            for(int j=0;j<b;j++){
               while(A[j]<c){
                        A[j]=(long)c;
                }
            }
        }

        long sum = 0;
        for(long d : A){
        sum += d;
        System.out.print(d);
        }
        System.out.print(sum);
        
        
     
    }
}

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

import java.util.scanner;

public class Main{
  public static void main(String[] args) {
    int age = 0;
    int change = 0;
    int result = 0;
    Scanner sc = new Scanner(System.in);
    
    age = sc.nextInt();
    change = sc.nextInt();
    
    if(age <= 5) {
      result = 0;
    } else if(6 <= age && age <= 12) {
      result = change / 2;
    } else {
      result = change;
    }
    System.out.println(result);
  }
}

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

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

ingt main(){
	int A, B;
  	cin >> A >> B;
  
  	if (A >= 13){
    	cout << B;
    }
  	else if ( A >=6 and A <=12){
      	cout << B/2;  
    }
  	else{
        cout << 0;
    }

}

Compiler output:
a.cc:4:1: error: 'ingt' does not name a type; did you mean 'int'?
    4 | ingt main(){
      | ^~~~
      | int
Language: Java

import java.util.*;

public class main{
  public static main(String args){
    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    if (a >= 13) {
      System.out.println(b + "\n");
    } else if (a < 13 && a >= 6) {
      System.out.println((b / 2) + "\n");
    } else {
      System.out.println("0\n");
    }
  }
}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
Main.java:4: error: modifier static not allowed here
  public static main(String args){
                ^
2 errors
Language: Java

import java.util.Scanner;

public class Main20190603 {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        scan.close();
        String[] data = str.split(" ");
        int charge = 0;
        int age = 0;
        int price = 0;
            age = Integer.parseInt(data[0]);
            price = Integer.parseInt(data[1]);
        if ( 6 <= age && age <= 12) {
            charge = price / 2;
        } else if (age > 12 ) {
            charge = price;
        }
        System.out.println(charge);
        }
}

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

import java.util.*;

class Main{
  Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  int fee = 0;
  
  if(a >= 13){
    fee = b;
  }else if(a >= 6){
    fee = b / 2;
  }else if(a < 5){
    fee = 0;
  }
  
  System.out.print(fee);
}

Compiler output:
Main.java:9: error: illegal start of type
  if(a >= 13){
  ^
Main.java:9: error: <identifier> expected
  if(a >= 13){
      ^
Main.java:11: error: illegal start of type
  }else if(a >= 6){
   ^
Main.java:11: error: <identifier> expected
  }else if(a >= 6){
            ^
Main.java:13: error: illegal start of type
  }else if(a < 5){
   ^
Main.java:13: error: illegal start of type
  }else if(a < 5){
               ^
Main.java:17: error: <identifier> expected
  System.out.print(fee);
                  ^
Main.java:17: error: <identifier> expected
  System.out.print(fee);
                      ^
8 errors
Language: C++

#include<iostream>

using namespace scalbn

int main(){
    int A,B;

    cin>>A>>B;

    if(A>=13){
        cout << B;
    }else if(A=<12 && A>=6){
        cout<<B/2;
    }else{
        cout << "0";
    }
}

Compiler output:
a.cc:3:17: error: 'scalbn' is not a namespace-name
    3 | using namespace scalbn
      |                 ^~~~~~
a.cc:3:23: error: expected ';' before 'int'
    3 | using namespace scalbn
      |                       ^
      |                       ;
    4 | 
    5 | int main(){
      | ~~~                    
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     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:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout << B;
      |         ^~~~
      |         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:16: error: expected primary-expression before '<' token
   12 |     }else if(A=<12 && A>=6){
      |                ^
a.cc:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |         cout<<B/2;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         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<bits/stdc++.h>
using namespace std;
int main()
{
int A,B;
cin>>A>>B;
if A>=13
{
cout<<B;
}
else if A<=12 && A>=6
{
cout<<B/2;
}
else
{
cout<<0;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: expected '(' before 'A'
    7 | if A>=13
      |    ^
      |    (
a.cc:11:1: error: 'else' without a previous 'if'
   11 | else if A<=12 && A>=6
      | ^~~~
a.cc:11:9: error: expected '(' before 'A'
   11 | else if A<=12 && A>=6
      |         ^
      |         (
a.cc:15:1: error: 'else' without a previous 'if'
   15 | else
      | ^~~~
Language: C++

#include<bits/stdc++h>
using namespace std;
int main()
{
int A,B;
cin>>A>>B;
if A>=13
{
cout<<B;
}
else if A<=12 && A>=6
{
cout<<B/2;
}
else
{
cout<<0;
}
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 <B;
  cin >> A >> B;
  if(A >= 13)
    cout <<B<< endl;
  if(6 <= A && A <= 12)
    cout << B/2 << endl;
  else
    cout << 0 << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected initializer before '<' token
    4 |   int A <B;
      |         ^
a.cc:5:10: error: 'A' was not declared in this scope
    5 |   cin >> A >> B;
      |          ^
a.cc:5:15: error: 'B' was not declared in this scope
    5 |   cin >> A >> B;
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  int price;
  if (A > 13) {
    price = B;
  }
  if else (A >= 6 || A <=12) {
    price = B / 2;
  }
  else {
    price = 0;
  }
  cout << price << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: expected '(' before 'else'
   11 |   if else (A >= 6 || A <=12) {
      |      ^~~~
      |      (
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else {
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n) ;i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll=long long;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define MOD  1000000007
const ll INF=1e18;
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; }
 
 
 
int main(int argc, char const *argv[]) {
  int a,b;
  cin >> a >> b;
  if(a>=13) cout << b << endl;
  else if(a>=6) cout << b/2 << endl;
  else cout << 0 << endl;
}
return 0;


Compiler output:
a.cc:26:1: error: expected unqualified-id before 'return'
   26 | return 0;
      | ^~~~~~
Language: Java

import java.io.*;
import java.util.*;

public class ABC127b{
    
    public static void main(String[] arg){

        Scanner scan =new Scanner(System.in);

        int r=Integer.parseInt(scan.next());
        int d=Integer.parseInt(scan.next());
        int x=Integer.parseInt(scan.next());

        for(int i=0;i<10;i++){
            x=r*x-d;
            System.out.println(x);

        }

    }
}

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

#include <iostream>
#include <string>
using namespace std;
int a_list[200000];
int main(){
  int n, q, a, b;
  cin >> n;
  cin >> q >> a >> b;
  a_list[0] = a;
  int min_x = a;
  int max_x = a;
  int min = b;
  
  for( int i=1; i< n; i++){
    cin >> q;
    int _a, _b;
    if (q == 1){
      cin >> _a >> _b;
      a_list[i] = _a;
      b += _b;
	  int min_a_sub = abs(min_x - _a);
      int max_a_sub = abs(max_x - _a);
      int a_cand, min_cand_1, min_cand_2;
      int min_cand2 = b;
           
	  if( min_a_sub < max_a_sub ){
      	min_cand_1 = min + _b + min_a_sub;
        a_cand = min_x;
      }
      else{
        min_cand_1 = min + _b + max_a_sub;
        a_cand = max_x;
      }
 
      for (int j=0; j < i; j++){
	      min_cand_2 += abs(a_list[j] - a_list[i]);
      }
      
      if (min_cand_1 < min_cand_2){
          min = min_cand_1;
          min_x = a_cand;
          max_x = a_cand;
      }
      
      else if (min_cand_1 == min_cand_2){
      	  min = min_cand_1;
      	  if (_a < a_cand){
            min_x = _a;
            max_x = a_cand;
          }
          else if (_a > a_cand) {
          	min_x = a_cand;
            max_x = _a;
          }
          else {
			min_x = _a;
            max_x = _a;
          }
      }
      
      else ( min_cand_2 < min_cand_1 ){
          min = min_cand_2;
          min_x = _a;
          max_x = _a;
      }
    }
     
     else{
	     if (min_x == max_x){
    	 	cout << min << endl;
	     }
         else{
         	cout << min_x << endl;
         }
     }
   }  
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:61:39: error: expected ';' before '{' token
   61 |       else ( min_cand_2 < min_cand_1 ){
      |                                       ^
      |                                       ;
Language: C++

#include <iostream>
#include <string>
using namespace std;
int a_list[200000];
int main(){
  int n, q, a, b;
  cin >> n;
  cin >> q >> a >> b;
  a_list[0] = a;
  int min_x = a;
  int max_x = a;
  int min = b;
  
  for( int i=1; i< n; i++){
    cin >> q;
    int _a, _b;
    if (q == 1){
      cin >> _a >> _b;
      a_list[i] = _a;
      b += _b;
	  int min_a_sub = abs(min_x - _a);
      int max_a_sub = abs(max_x - _a);
      int a_cand, min_cand_1, min_cand_2;
      int min_cand2 = b;
           
	  if( min_a_sub < max_a_sub ){
      	min_cand_1 = min + _b + min_a_sub;
        a_cand = min_x;
      }
      else{
        min_cand_1 = min + _b + max_a_sub;
        a_cand = max_x;
      }
 
      for (int j=0; j < i; j++){
	      min_cand_2 += abs(a_list[j] - a_list[i]);
      }
      
      if (min_cand_1 < min_cand_2){
          min = min_cand_1;
          min_x = a_cand;
          max_x = a_cand;
      }
      
      else if (min_cand_1 == min_cand_2){
      	  min = min_cand_1;
      	  if (_a < a_cand){
            min_x = _a;
            max_x = a_cand;
          }
          else if (_a > a_cand) {
          	min_x = a_cand;
            max_x = _a;
          }
          else {
			min_x = _a;
            max_x = _a;
          }
      }
      
      else ( min_cand_2 < min_cand_1){
          min = min_cand_2;
          min_x = _a;
          max_x = _a;
     }
     
     else{
	     if (min_x == max_x){
    	 	cout << min << endl;
	     }
         else{
         	cout << min_x << endl;
         }
     }
   }  
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:61:38: error: expected ';' before '{' token
   61 |       else ( min_cand_2 < min_cand_1){
      |                                      ^
      |                                      ;
a.cc:67:6: error: expected '}' before 'else'
   67 |      else{
      |      ^~~~
a.cc:17:16: note: to match this '{'
   17 |     if (q == 1){
      |                ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int a_list[200000];
int main(){
  int n, q, a, b;
  cin >> n;
  cin >> q >> a >> b;
  a_list[0] = a;
  int min_x = a;
  int max_x = a;
  int min = b;
  
  for( int i=1; i< n; i++){
    cin >> q;
    int _a, _b;
    if (q == 1){
      cin >> _a >> _b;
      a_list[i] = _a;
      b += _b;
	  int min_a_sub = abs(min_x - _a);
      int max_a_sub = abs(max_x - _a);
      int a_cand, min_cand1;
      int min_cand2 = b;
           
	  if( min_a_sub < max_a_sub ){
      	min_cand_1 = min + _b + min_a_sub;
        a_cand = min_x;
      }
      else{
        min_cand_1 = min + _b + max_a_sub;
        a_cand = max_x;
      }
 
      for (int j=0; j < i; j++){
	      min_cand_2 += abs(a_list[j] - a_list[i]);
      }
      
      if (min_cand_1 < min_cand_2){
          min = min_cand_1;
          min_x = a_cand;
          max_x = a_cand;
      }
      
      else if (min_cand_1 == min_cand_2){
      	  min = min_cand_1;
      	  if (_a < a_cand){
            min_x = _a;
            max_x = a_cand;
          }
          else if (_a > a_cand) {
          	min_x = a_cand;
            max_x = _a;
          }
          else {
			min_x = _a;
            max_x = _a;
          }
      }
      
      else ( min_cand_2 < min_cand_1){
          min = min_cand_2;
          min_x = _a;
          max_x = _a;
     }
     
     else{
	     if (min_x == max_x){
    	 	cout << min << endl;
	     }
         else{
         	cout << min_x << endl;
         }
     }
   }  
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'min_cand_1' was not declared in this scope; did you mean 'min_cand1'?
   27 |         min_cand_1 = min + _b + min_a_sub;
      |         ^~~~~~~~~~
      |         min_cand1
a.cc:31:9: error: 'min_cand_1' was not declared in this scope; did you mean 'min_cand1'?
   31 |         min_cand_1 = min + _b + max_a_sub;
      |         ^~~~~~~~~~
      |         min_cand1
a.cc:36:15: error: 'min_cand_2' was not declared in this scope; did you mean 'min_cand2'?
   36 |               min_cand_2 += abs(a_list[j] - a_list[i]);
      |               ^~~~~~~~~~
      |               min_cand2
a.cc:39:11: error: 'min_cand_1' was not declared in this scope; did you mean 'min_cand1'?
   39 |       if (min_cand_1 < min_cand_2){
      |           ^~~~~~~~~~
      |           min_cand1
a.cc:39:24: error: 'min_cand_2' was not declared in this scope; did you mean 'min_cand2'?
   39 |       if (min_cand_1 < min_cand_2){
      |                        ^~~~~~~~~~
      |                        min_cand2
a.cc:67:6: error: expected '}' before 'else'
   67 |      else{
      |      ^~~~
a.cc:17:16: note: to match this '{'
   17 |     if (q == 1){
      |                ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main(){
	int a, b;
  	cin >> a >> b;
  	if (a >= 13){
      cout << b << endl;
    }
  	
  	else if ( 5 >= a ){
      cout << 0 << endl;
 
    }
  
  	else {
      cout << b/2 << endl:
    }
}
      
#include <iostream>
#include <string>
using namespace std;

int main(){
	int a, b;
  	cin >> a >> b;
  	if (a >= 13){
      cout << b << endl;
    }
  	
  	else if ( 5 >= a ){
      cout << 0 << endl;

    }
  
  	else {
      cout << b/2 << endl;
    }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before ':' token
   18 |       cout << b/2 << endl:
      |                          ^
      |                          ;
a.cc: At global scope:
a.cc:26:5: error: redefinition of 'int main()'
   26 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

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

int main(){
	int a, b;
  	cin >> a >> b;
  	if (a >= 13){
      cout << b << endl;
    }
  	
  	else if ( 5 >= a ){
      cout << 0 << endl;

    }
  
  	else {
      cout << b/2 << endl:
    }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before ':' token
   18 |       cout << b/2 << endl:
      |                          ^
      |                          ;
Language: Java

import java.util.Scanner;

public class Ferris_Wheel{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int num1 = scan.nextInt();
        int num2 = scan.nextInt();
        //int cost = num2;
        if(num1 <= 12){
            num2 /= 2;
        }
        if(num1 <= 5){
            num2 = 0;
        }
        System.out.println(num2);
        scan.close();
    }
}

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

package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	if a >= 13 {
		fmt.Println(b)
	} else if a >= 6 {
		fmt.Println(b / 2)
	} else {
		fmt.Println(0)
	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

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

  if (a >= 13) return b;
  else if (a >= 6) return b / 2;
  else return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: 'cin' is not a member of 'std'
    3 |   std::cin >> a >> b;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
Language: C++

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

  if (a >= 13) return b;
  else if (a >= 6) return b / 2;
  else return 0;
}



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

#include <iostream>

int a, b;
cin >> a >> b;
 
if (a >= 13) return b;
else if (a >= 6) return b / 2;
else return 0;

Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >> a >> b;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
    6 | if (a >= 13) return b;
      | ^~
a.cc:7:1: error: expected unqualified-id before 'else'
    7 | else if (a >= 6) return b / 2;
      | ^~~~
a.cc:8:1: error: expected unqualified-id before 'else'
    8 | else return 0;
      | ^~~~
Language: C++

int a, b;
cin >> a >> b;

if (a >= 13) return b;
else if (a >= 6) return b / 2;
else return 0;

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> a >> b;
      | ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if (a >= 13) return b;
      | ^~
a.cc:5:1: error: expected unqualified-id before 'else'
    5 | else if (a >= 6) return b / 2;
      | ^~~~
a.cc:6:1: error: expected unqualified-id before 'else'
    6 | else return 0;
      | ^~~~