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

#include<stdio.h>

int main(void){
  
  int a;
  char b[114514];
 
  scanf("%d" &a);
  
  scanf("%s", b);
  
  if(a == 3200){
    printf("pink");
  }else{
    printf("red");
  }
  return 0;
}


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

#include<stdio.h>

int main(void){
  
  int a;
  char b[114514];
 
  scanf("%d" &a);
  
  scanf("%s", b);
  
  if(a >= 3200){
    printf("pink");
  }else{
    printf("red");
  }
  return 0;
}


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

#include<stdio.h>

int main(void){
  
  int a;
  char b[114514];
 
  scanf("%d" &a);
  
  scanf("%s", b);
  
  if(a == 3200){
    printf("pink");
  }else if(a == 3199){
    printf("red");
  }else{
    printf("red");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:14: error: invalid operands to binary & (have 'char *' and 'int')
    8 |   scanf("%d" &a);
      |         ~~~~ ^
      |         |
      |         char *
Language: Java

import java.util.*;

public class Solution{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int a = sc.sc.nextInt;
      
    }
  String s = sc.next();
  if(a< 3200){
    System.out.println("red");
  }else System.out.println(s);
}

Compiler output:
Main.java:10: error: illegal start of type
  if(a< 3200){
  ^
Main.java:10: error: illegal start of type
  if(a< 3200){
        ^
Main.java:12: error: illegal start of type
  }else System.out.println(s);
   ^
Main.java:12: error: <identifier> expected
  }else System.out.println(s);
                          ^
Main.java:12: error: <identifier> expected
  }else System.out.println(s);
                            ^
5 errors
Language: Java

import java.util.*;

public class Solution{
	public void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int a = sc.sc.nextInt;
      
    }
  String s = sc.next();
  if(a< 3200){
    System.out.println("red");
  }else System.out.println(s);
}

Compiler output:
Main.java:10: error: illegal start of type
  if(a< 3200){
  ^
Main.java:10: error: illegal start of type
  if(a< 3200){
        ^
Main.java:12: error: illegal start of type
  }else System.out.println(s);
   ^
Main.java:12: error: <identifier> expected
  }else System.out.println(s);
                          ^
Main.java:12: error: <identifier> expected
  }else System.out.println(s);
                            ^
5 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int n; cin >> n;
    string s; cin >> s;
    if(n<3200)s = "red";

    cout << s << endl;
    return 0;
}
 
 
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int n; cin >> n;
    string s; cin >> s;
    if(n<3200)s = "red";

    cout << s << endl;
    return 0;
}
 
 


Compiler output:
a.cc:43:5: error: redefinition of 'int main()'
   43 | int main() {
      |     ^~~~
a.cc:17:5: note: 'int main()' previously defined here
   17 | int main() {
      |     ^~~~
Language: Java

import java.util.*;
import java.io.*;
class Test{
	public static void main(String [] args){
    	
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));


      
        int a = Integer.parseInt(br.readLine());

        String s = br.readLine();
      
        if(a<3200){
        	System.out.println("red");
        }
        else{
          System.out.println(s);
        } 
    }
}


Compiler output:
Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
        int a = Integer.parseInt(br.readLine());
                                            ^
Main.java:12: error: unreported exception IOException; must be caught or declared to be thrown
        String s = br.readLine();
                              ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a;
  string s;
  cin>>a;
  cin>>s;
  if(a<3200)
    cout<<s;
  else
    cout<<"red";

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected '}' at end of input
   12 |     cout<<"red";
      |                 ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

class Test{
	public static void main(String [] args){
    	Scanner sc = new Scanner(System.in);
      
        int a = sc.nextInt();
        String s = sc.nextLine();
      
        if(a>=3200){
        	System.out.println(s);
        }
        else{
          System.out.println("red");
        } 
    }
}


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

class Test{
	public static void main(String [] args){
    	Scanner sc = new Scanner(System.in);
      
        int a = sc.nextInt();
        String s = sc.nextLine();
      
        if(a>=3200){
        	System.out.println(s);
        }
        else{
          System.out.println('red');
        } 
    }
}

Compiler output:
Main.java:12: error: unclosed character literal
          System.out.println('red');
                             ^
Main.java:12: error: unclosed character literal
          System.out.println('red');
                                 ^
Main.java:12: error: not a statement
          System.out.println('red');
                               ^
3 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
 	int n;
  	string s;
  cin >> n;
  cin >> s;
  if (n < 3200) cout << "red << endl;
    else cout << s << endl;
  	return 0;
}

Compiler output:
a.cc:10:25: warning: missing terminating " character
   10 |   if (n < 3200) cout << "red << endl;
      |                         ^
a.cc:10:25: error: missing terminating " character
   10 |   if (n < 3200) cout << "red << endl;
      |                         ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before 'else'
   11 |     else cout << s << endl;
      |     ^~~~
Language: C++

#include <string>
#include <iostream>

using namespace std;

int main() {

	int a; cin >> a;
	string s; cin >> s;

	a < 3200 ? s = "red";

	cout << s << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected ':' before ';' token
   11 |         a < 3200 ? s = "red";
      |                             ^
      |                             :
a.cc:11:29: error: expected primary-expression before ';' token
Language: C++

#include <stdio.h>
int main(void){
  int 2800<=a,a<5000;
  char s[10];
  scanf("%d",&a);
  scanf("%s",s);
  if(a>=3200)
    printf("%s",s);
  if(a<3200)
    printf("red¥n");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:7: error: expected unqualified-id before numeric constant
    3 |   int 2800<=a,a<5000;
      |       ^~~~
a.cc:5:15: error: 'a' was not declared in this scope
    5 |   scanf("%d",&a);
      |               ^
Language: C++

/**
	������������ Author : Avi J Patel ������������
	������������ University : DA-IICT ������������
**/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define mp make_pair 
#define mt make_tuple
#define N 100000
#define ff first
#define ss second
#define si size()
#define MOD 1000000007
#define Mod 998244353
#define N 1000005
#define large 10000000000000001

#define For(i,m,n) for(long long i=m;i<n;i++)
#define st(x) sort(x.begin(),x.end())
#define re(x,i) reverse(x.begin()+i,x.end())
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);srand(time(NULL));
/*
bool sortbysec(const pair<int,int> &a, 
              const pair<int,int> &b) 
{ 
    return (a.second < b.second); 
}*/ 
int main()
{
	int n;
	cin>>n;
	string s;
	cin>>s;
	if(a>=3200) cout<<s;
	else cout<<"red";
	return 0;
}







Compiler output:
a.cc:19:9: warning: "N" redefined
   19 | #define N 1000005
      |         ^
a.cc:13:9: note: this is the location of the previous definition
   13 | #define N 100000
      |         ^
a.cc: In function 'int main()':
a.cc:38:12: error: 'a' was not declared in this scope
   38 |         if(a>=3200) cout<<s;
      |            ^
Language: C++

#include<iostream>
using  namespace std;
int main(){
  int a;
  string s;
  if(a>=3200)
    cout<<s;
  else
    cout<<red;
  return 0;
}

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

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include string
using namespace std;

int main() {
	int a;
	cin >> a;
	string s;
	cin >> s;
	if (3200 <= a)cout << "s" << endl;
	else cout << "red" << endl;
}

Compiler output:
a.cc:3:10: error: #include expects "FILENAME" or <FILENAME>
    3 | #include string
      |          ^~~~~~
Language: Java

p
import java.util.Scanner;
public class Main {

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

// 標準入力を1行ずつ読み出す。
while (stdin.hasNextLine()) {
    int line1 = Integer.parseInt(stdin.nextLine());
    String line2 = stdin.nextLine();
  System.out.println(line1 >= 3200 ? line2 : "red"); 
}
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
p
^
1 error
Language: C

#include <stdio.h>
#include <string.h>
int main() {
  char s[100001], t[100001];
  int n, m;
  n = strlen(s); m = strlen(m);
  ll h = (ll)n * (ll)m;
  h *= h;
  for (ll i = 0; i < h; i++) {
    int a= a + 2;
  }
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:6:29: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    6 |   n = strlen(s); m = strlen(m);
      |                             ^
      |                             |
      |                             int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:7:3: error: unknown type name 'll'
    7 |   ll h = (ll)n * (ll)m;
      |   ^~
main.c:7:11: error: 'll' undeclared (first use in this function)
    7 |   ll h = (ll)n * (ll)m;
      |           ^~
main.c:7:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:14: error: expected ',' or ';' before 'n'
    7 |   ll h = (ll)n * (ll)m;
      |              ^
main.c:9:10: error: expected ';' before 'i'
    9 |   for (ll i = 0; i < h; i++) {
      |          ^~
      |          ;
main.c:9:18: error: 'i' undeclared (first use in this function)
    9 |   for (ll i = 0; i < h; i++) {
      |                  ^
Language: C++

#include<iostream>
#include<string.h>
using name space std;
int main()
{
  int a;
  string x;
  cin>>a;
  cin>>x;
  if(a<3200)
    cout<<"red";
  else cout<<s;
  return 0;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'name'
    3 | using name space std;
      |       ^~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string x;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin>>a;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:8: error: 'x' was not declared in this scope
    9 |   cin>>x;
      |        ^
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout<<"red";
      |     ^~~~
      |     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:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   else cout<<s;
      |        ^~~~
      |        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:14: error: 's' was not declared in this scope
   12 |   else cout<<s;
      |              ^
Language: C++


#include<iostream.h>
#include<string.h>
using name space std;
int main()
{
  int a;
  string x;
  cin>>a;
  cin>>x;
  if(a<3200)
    cout<<"red";
  else cout<<s;
  return 0;
}

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

#include <stdio.h>

int main(){
    int a;
    scanf("%d ",&a);
    char str[11];
    gets(str);
    if(a>=3200)printf("%s",str);
    else printf("red");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(str);
      |     ^~~~
      |     getw
Language: C++

#include <stdio.h>

int main(){
    int a;
    scanf("%d",&a);
    char str[11];
    fgets(str);
    if(a>=3200)printf("%s",str);
    else printf("red");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: too few arguments to function 'char* fgets(char*, int, FILE*)'
    7 |     fgets(str);
      |     ~~~~~^~~~~
In file included from a.cc:1:
/usr/include/stdio.h:654:14: note: declared here
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |              ^~~~~
Language: C++

#include <stdio.h>

int main()
{
    int a;
    char str[11];
    scanf("%d",&a);
    gets(str);
    if(a>=3200)printf("%s",str);
    else printf("red");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(str);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>

int main()
{
    int a;
    char str[11];
    scanf("%d",&a);
    gets(str);
    if(a>3200)printf("%s",str);
    else printf("red");
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(str);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <set>
#include <queue>
#include <stack>

using namespace std;

#define maxN 200000

int edge[maxN][maxN];
int point[maxN];
int N, Q;

int make_tree(int n){
  for(int i=0;i<N; i++){
    if(edge[n][i] == -1){
      edge[i][n] = 0;
      make_tree(i);
    }
  }
  return 0;
}

int get_point(int n, int x){
  point[n] += x;
  for(int i=0;i<N; i++){
    if(edge[n][i] == -1){
      get_point(i,x);
    }
  }
  return 0;
}

int main(){

  cin >> N >> Q;
  memset(point, 0, sizeof(int)*N);

  for(int i=0; i<N-1;i++){
    int a, b;
    cin >> a >> b;
    edge[a-1][b-1] = -1;
    edge[b-1][a-1] = -1;
  }

  make_tree(0);

  for(int i=0; i<Q;i++){
    int a;
    int b;
    cin >> a >> b;
    get_point(a-1,b);
  }

  for(int i=0; i<N; i++){
    cout << point[i] << " ";
  }
  cout << endl;

  return 0;
}


Compiler output:
/tmp/ccvpIOoo.o: in function `make_tree(int)':
a.cc:(.text+0x7b): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccvpIOoo.o
/tmp/ccvpIOoo.o: in function `get_point(int, int)':
a.cc:(.text+0xa9): relocation truncated to fit: R_X86_64_PC32 against symbol `point' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0xc6): relocation truncated to fit: R_X86_64_PC32 against symbol `point' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x117): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccvpIOoo.o
/tmp/ccvpIOoo.o: in function `main':
a.cc:(.text+0x132): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x14e): relocation truncated to fit: R_X86_64_PC32 against symbol `Q' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x15f): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x174): relocation truncated to fit: R_X86_64_PC32 against symbol `point' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x21c): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x27f): relocation truncated to fit: R_X86_64_PC32 against symbol `Q' defined in .bss section in /tmp/ccvpIOoo.o
a.cc:(.text+0x2a1): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
include<string.h>
using namespace std;
int main()
{
  int a;
  char s[10];
  cin>>a>>s;
  if (a>=3200)
    cout<<"red"<<endl;
  else 
    cout<<s<<endl;
  return 0;
}

Compiler output:
a.cc:2:1: error: 'include' does not name a type
    2 | include<string.h>
      | ^~~~~~~
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>>s;
      |   ^~~
      |   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:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout<<"red"<<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:10:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout<<"red"<<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)
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<s<<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:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<s<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

int main()
{
    int n;cin>>n;
    vector <int> vect(n);
    for(int i=0;i<n;i++)
        cin>>vect[i];
    sort(vect.begin(),vect.end());
    long double num=0.00;
    num = vect[0] +vect[1];
    for(int i=2;i<n;i++)
    {
        num =num + ((int )pow(2,i-1))*vect[i];
    }
    cout<<fixed<<setprecision(10)<<(num/((int )pow(2,n-1)));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:11: error: 'cin' was not declared in this scope
    3 |     int n;cin>>n;
      |           ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector <int> vect(n);
      |     ^~~~~~
a.cc:4:13: error: expected primary-expression before 'int'
    4 |     vector <int> vect(n);
      |             ^~~
a.cc:6:14: error: 'vect' was not declared in this scope
    6 |         cin>>vect[i];
      |              ^~~~
a.cc:7:10: error: 'vect' was not declared in this scope
    7 |     sort(vect.begin(),vect.end());
      |          ^~~~
a.cc:7:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |     sort(vect.begin(),vect.end());
      |     ^~~~
      |     short
a.cc:12:27: error: 'pow' was not declared in this scope
   12 |         num =num + ((int )pow(2,i-1))*vect[i];
      |                           ^~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout<<fixed<<setprecision(10)<<(num/((int )pow(2,n-1)));
      |     ^~~~
a.cc:14:11: error: 'fixed' was not declared in this scope
   14 |     cout<<fixed<<setprecision(10)<<(num/((int )pow(2,n-1)));
      |           ^~~~~
a.cc:14:18: error: 'setprecision' was not declared in this scope
   14 |     cout<<fixed<<setprecision(10)<<(num/((int )pow(2,n-1)));
      |                  ^~~~~~~~~~~~
a.cc:14:48: error: 'pow' was not declared in this scope
   14 |     cout<<fixed<<setprecision(10)<<(num/((int )pow(2,n-1)));
      |                                                ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a;
  string s;
  cin>>a>>s;
  if(a>=3200){
  cout<<s<<endl;
  }else{
  cout<<"red"<<endl;
  }
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |   return;
      |   ^~~~~~
Language: Java


ソースコード 

Copy
Copy
  import java.util.*;
 
  public class Main {
      public static void main (String[]args){
 
          Scanner scanner = new Scanner(System.in);
          
          int N = scanner.nextInt();
 
          int cnt = 0;
 
          List <Integer> AList  = new ArrayList<Integer>();
 
          // 入力数に従って標準入力
          while (cnt < N){
 
            Integer A = scanner.nextInt();
 
            AList.add(A);
 
             cnt = cnt + 1;
          }
          
          scanner.close();
 
          List <Double> DList  = new ArrayList<Double>();
          
          // 逆数への変換
          for (Integer A :AList){
            double d = 1 / A;
 
            DList.add(d);
          }
 
          // 逆数を総和
          Double dAll = 0.0;
          for (Double d:DList){
            dAll += d;
          }
 
          // 総和を逆数とする
          Double result = 1 / dAll;
          
          // 出力
          System.out.println(result);
                  
      }
  } 

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
?????? 
^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        int list[];
      list = new int[a];
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list(i) = (sc.nextInt());
      }
      
      Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
        list(i) = (sc.nextInt());
        ^
  symbol:   method list(int)
  location: class Main
Main.java:17: error: cannot find symbol
      result = list.get(0);
                   ^
  symbol:   method get(int)
  location: variable list of type int[]
Main.java:20: error: cannot find symbol
        result = (result + list.get(i))/2.0;
                               ^
  symbol:   method get(int)
  location: variable list of type int[]
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        int list[];
      list = new int[a];
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list(i) = (sc.nextInt());
      }
      
      list = Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
        list(i) = (sc.nextInt());
        ^
  symbol:   method list(int)
  location: class Main
Main.java:16: error: incompatible types: void cannot be converted to int[]
      list = Arrays.sort(list);
                        ^
Main.java:17: error: cannot find symbol
      result = list.get(0);
                   ^
  symbol:   method get(int)
  location: variable list of type int[]
Main.java:20: error: cannot find symbol
        result = (result + list.get(i))/2.0;
                               ^
  symbol:   method get(int)
  location: variable list of type int[]
4 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        int list[];
      list = new int[a];
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      list = Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
        list.add(sc.nextInt());
            ^
  symbol:   method add(int)
  location: variable list of type int[]
Main.java:16: error: incompatible types: void cannot be converted to int[]
      list = Arrays.sort(list);
                        ^
Main.java:17: error: cannot find symbol
      result = list.get(0);
                   ^
  symbol:   method get(int)
  location: variable list of type int[]
Main.java:20: error: cannot find symbol
        result = (result + list.get(i))/2.0;
                               ^
  symbol:   method get(int)
  location: variable list of type int[]
4 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        int list[];
      list = new int[a];
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      list1 = Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
        list.add(sc.nextInt());
            ^
  symbol:   method add(int)
  location: variable list of type int[]
Main.java:16: error: cannot find symbol
      list1 = Arrays.sort(list);
      ^
  symbol:   variable list1
  location: class Main
Main.java:17: error: cannot find symbol
      result = list.get(0);
                   ^
  symbol:   method get(int)
  location: variable list of type int[]
Main.java:20: error: cannot find symbol
        result = (result + list.get(i))/2.0;
                               ^
  symbol:   method get(int)
  location: variable list of type int[]
4 errors
Language: C++

#include<iostream>
#include<string>
int main(){
  int a; cin >> a;
  string s; cin >> s;
  printf("%s",(a>=3200)?s:"red");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int a; cin >> a;
      |          ^~~
      |          std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s; cin >> s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:20: error: 's' was not declared in this scope
    5 |   string s; cin >> s;
      |                    ^
Language: C++

#include <iostream>

int main(){
  int a;
  char s[11];
  cin >> a;
  cin >> s;
  a < 3200 ? cout << "red" : cout << a ;
  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 >> a;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   a < 3200 ? cout << "red" : cout << a ;
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
  int a;
  string s;
  cin >> a;
  cin >> s;
  if (3200<=a){
    cout << s;
  }
  else{
　  cout << 'red';
  }
}


Compiler output:
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　  cout << 'red';
      | ^
a.cc:13:13: warning: multi-character character constant [-Wmultichar]
   13 | 　  cout << 'red';
      |             ^~~~~
a.cc: In function 'int main()':
a.cc:13:1: error: '\U00003000' was not declared in this scope
   13 | 　  cout << 'red';
      | ^~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      list1 = Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:15: error: cannot find symbol
      list1 = Arrays.sort(list);
      ^
  symbol:   variable list1
  location: class Main
Main.java:15: error: no suitable method found for sort(ArrayList<Integer>)
      list1 = Arrays.sort(list);
                    ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<int> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:7: error: unexpected type
        ArrayList<int> list = new ArrayList<>();
                  ^
  required: reference
  found:    int
1 error
Language: C++

#include<iostream>
#include<string>
int main(){
  int a; string s; cin >> a >> s;
  printf("%s",(a>=3200)?s:"red")
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'string' was not declared in this scope
    4 |   int a; string s; cin >> a >> s;
      |          ^~~~~~
a.cc:4:10: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:20: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int a; string s; cin >> a >> s;
      |                    ^~~
      |                    std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:32: error: 's' was not declared in this scope
    4 |   int a; string s; cin >> a >> s;
      |                                ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Arrays.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:15: error: no suitable method found for sort(ArrayList<Integer>)
      Arrays.sort(list);
            ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; ArrayList<Integer> cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include<stdio.h>
int main(void) {
	int N,i, A[100] = { 0 };
  double B=0, C=0;
	scanf("%d", &N);
	for(i=0;i<N;i++){
	 scanf("%d",&A[i]);
    }
	i = 0;
	while(i<N){
		if(A[i]=!0){
		B =B+1/A[i];
        }
		i++;
	}
	C = 1 / B;
	printf("%d", C);

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: expected '}' at end of input
   17 |         printf("%d", C);
      |                         ^
a.cc:2:16: note: to match this '{'
    2 | int main(void) {
      |                ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Colletions.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:15: error: cannot find symbol
      Colletions.sort(list);
      ^
  symbol:   variable Colletions
  location: class Main
1 error
Language: C++

#include <iostream>
using namespace std;
int main()｛
  int a;
  string s;
  cin>>a>>s;
  if(a>3200){
  cout<<s<<endl;
  return;
  }else{
  cout<<"red"<<endl;
  return;
  }
｝

Compiler output:
a.cc:3:11: error: expected initializer before '\U0000ff5b'
    3 | int main()｛
      |           ^~
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin>>a>>s;
      |   ^~~
a.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if(a>3200){
      |   ^~
a.cc:10:4: error: expected unqualified-id before 'else'
   10 |   }else{
      |    ^~~~
a.cc:14:1: error: '\U0000ff5d' does not name a type
   14 | ｝
      | ^~
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Colletions.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:16: error: cannot find symbol
      Colletions.sort(list);
      ^
  symbol:   variable Colletions
  location: class Main
1 error
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<int> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Colletions.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(i))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:8: error: unexpected type
        ArrayList<int> list = new ArrayList<>();
                  ^
  required: reference
  found:    int
Main.java:16: error: cannot find symbol
      Colletions.sort(list);
      ^
  symbol:   variable Colletions
  location: class Main
2 errors
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<int> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Colletions.sort(list);
      result = list.get(0);
      
      for(i = 1; i < a; i++){
        result = (result + list.get(s))/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:8: error: unexpected type
        ArrayList<int> list = new ArrayList<>();
                  ^
  required: reference
  found:    int
Main.java:16: error: cannot find symbol
      Colletions.sort(list);
      ^
  symbol:   variable Colletions
  location: class Main
Main.java:20: error: cannot find symbol
        result = (result + list.get(s))/2.0;
                                    ^
  symbol:   variable s
  location: class Main
3 errors
Language: C

a=int(input())
s=input()

if a>=3200:
    print(s)
else:
    print('red')

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | a=int(input())
      |   ^~~
main.c:7:11: warning: multi-character character constant [-Wmultichar]
    7 |     print('red')
      |           ^~~~~
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
        ArrayList<int> list = new ArrayList<>();
        double result = 0;
        int i;

      for (i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      
      Colletions.sort(list);
      result = list<0>;
      
      for(i = 1; i < a; i++){
        result = (result + list
)/2.0;
      }

      System.out.println(result);
	}
}


Compiler output:
Main.java:17: error: illegal start of expression
      result = list<0>;
                      ^
Main.java:20: error: illegal start of expression
        result = (result + list
)/2.0;
                                  ^
2 errors
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
       ArrayList<int> list = new ArrayList<>();
      double result = 0;
      for (int i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      Colletions.sort(list);
      result = list<0>;
      for(int s = 1; i < a; i++){

        result = (result + list
)/2.0;
      }
      System.out.println(result);
	}
}


Compiler output:
Main.java:14: error: illegal start of expression
      result = list<0>;
                      ^
Main.java:17: error: illegal start of expression
        result = (result + list
)/2.0;
                                  ^
2 errors
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
       ArrayList<int> list = new ArrayList<>();
      double result = 0;
      for (int i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      Colletions.sort(list);
      result = list<0>;
      for(int i = 1; i < a; i++){

        result = (result + list<i>)/2.0;
      }
      System.out.println(result);
	}
}


Compiler output:
Main.java:14: error: illegal start of expression
      result = list<0>;
                      ^
Main.java:17: error: illegal start of expression
        result = (result + list<i>)/2.0;
                                  ^
2 errors
Language: C

#include<iostream>
 
using namespace std;
 
int main() {
	int a;
  	string str;
  	cin >> a;
  	cin >> str;
  	if(a>=3200) { cout << str << endl; }
  	else { cout << "red" << endl; }
  	return 0;
}

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

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
       ArrayList<Integer> list = new ArrayList<>();
      double result = 0;
      for (int i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      Colletions.sort(list);
      result = list<0>;
      for(int i = 1; i < a; i++){

        result = (result + list<i>)/2.0;
      }
      System.out.println(result);
	}
}

Compiler output:
Main.java:14: error: illegal start of expression
      result = list<0>;
                      ^
Main.java:17: error: illegal start of expression
        result = (result + list<i>)/2.0;
                                  ^
2 errors
Language: Java

import java.util.*;
import java.util.Collections;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a = sc.nextInt();
       ArrayList<Integer> list = new ArrayList<>();
      double result = 0;
      for (int i = 0; i < a; i++){
        list.add(sc.nextInt());
      }
      Colletions.sort(list);
      result = list[0];
      for(int i = 1; i < a; i++){

        result = (result + list[i])/2.0;
      }
      System.out.println(result);
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
      Colletions.sort(list);
      ^
  symbol:   variable Colletions
  location: class Main
Main.java:14: error: array required, but ArrayList<Integer> found
      result = list[0];
                   ^
Main.java:17: error: array required, but ArrayList<Integer> found
        result = (result + list[i])/2.0;
                               ^
3 errors
Language: C

#include<iostream>
 
using namespace std;
 
int main() {
	int a;
  	string str;
  	cin >> a;
  	cin >> str;
  	if(a>=3200) cout << str << endl;
  	else cout << "red" << endl;
  	return 0;
}

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