Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC138
{
    class Program
    {
        static void Main(string[] args)
        {
            C();

            Console.Read();
        }

        static void C()
        {
            int N = int.Parse(Read());
            List<int> v = new List<int>();
            string[] input = Read().Split(' ');
            for (int i = 0; i < N; i++) v.Add(int.Parse(input[i]));
            v = v.OrderBy(x => x).ToList();

            //for (int i = 0; i < N; i++) Show(v[i].ToString());

            double temp = ((double)v[0] + (double)v[1]) / 2;
            for(int i = 2; i < N ; i++)
            {
                temp = (temp + v[i]) / 2;
            }
            Show(temp.ToString());
        }
        static void B()
        {
            int N = int.Parse(Read());
            string[] s = Read().Split(' ');
            int[] A = new int[N];
            for (int i = 0; i < N; i++) A[i] = int.Parse(s[i]);

            double sum = 0;
            foreach (int itemp in A) sum += 1 / (double)itemp;
            double answer = 1 / sum;
            Show(answer.ToString());

        }

        static void A()
        {
            int a = int.Parse(Read());
            string s = Read();
            if (a >= 3200) Show(s);
            else Show("red");
        }

        




        static string Read() { return Console.ReadLine(); }
        static void Show(string s) { Console.WriteLine(s); }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:62:16: error: 'string' does not name a type
   62 |         static string Read() { return Console.ReadLine(); }
      |                ^~~~~~
a.cc:63:26: error: 'string' has not been declared
   63 |         static void Show(string s) { Console.WriteLine(s); }
      |                          ^~~~~~
a.cc:64:6: error: expected ';' after class definition
   64 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ABC138::Program::Main(int*)':
a.cc:15:13: error: 'Console' was not declared in this scope
   15 |             Console.Read();
      |             ^~~~~~~
a.cc: In static member function 'static void ABC138::Program::C()':
a.cc:20:21: error: expected primary-expression before 'int'
   20 |             int N = int.Parse(Read());
      |                     ^~~
a.cc:21:13: error: 'List' was not declared in this scope
   21 |             List<int> v = new List<int>();
      |             ^~~~
a.cc:21:18: error: expected primary-expression before 'int'
   21 |             List<int> v = new List<int>();
      |                  ^~~
a.cc:22:13: error: 'string' was not declared in this scope
   22 |             string[] input = Read().Split(' ');
      |             ^~~~~~
a.cc:22:20: error: expected primary-expression before ']' token
   22 |             string[] input = Read().Split(' ');
      |                    ^
a.cc:23:41: error: 'v' was not declared in this scope
   23 |             for (int i = 0; i < N; i++) v.Add(int.Parse(input[i]));
      |                                         ^
a.cc:23:47: error: expected primary-expression before 'int'
   23 |             for (int i = 0; i < N; i++) v.Add(int.Parse(input[i]));
      |                                               ^~~
a.cc:24:13: error: 'v' was not declared in this scope
   24 |             v = v.OrderBy(x => x).ToList();
      |             ^
a.cc:24:27: error: 'x' was not declared in this scope
   24 |             v = v.OrderBy(x => x).ToList();
      |                           ^
a.cc:24:30: error: expected primary-expression before '>' token
   24 |             v = v.OrderBy(x => x).ToList();
      |                              ^
a.cc:33:23: error: request for member 'ToString' in 'temp', which is of non-class type 'double'
   33 |             Show(temp.ToString());
      |                       ^~~~~~~~
a.cc: In static member function 'static void ABC138::Program::B()':
a.cc:37:21: error: expected primary-expression before 'int'
   37 |             int N = int.Parse(Read());
      |                     ^~~
a.cc:38:13: error: 'string' was not declared in this scope
   38 |             string[] s = Read().Split(' ');
      |             ^~~~~~
a.cc:38:20: error: expected primary-expression before ']' token
   38 |             string[] s = Read().Split(' ');
      |                    ^
a.cc:39:16: error: structured binding declaration cannot have type 'int'
   39 |             int[] A = new int[N];
      |                ^~
a.cc:39:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:39:16: error: empty structured binding declaration
a.cc:39:19: error: expected initializer before 'A'
   39 |             int[] A = new int[N];
      |                   ^
a.cc:40:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   40 |             for (int i = 0; i < N; i++) A[i] = int.Parse(s[i]);
      |                                            ^
a.cc:40:48: error: expected primary-expression before 'int'
   40 |             for (int i = 0; i < N; i++) A[i] = int.Parse(s[i]);
      |                                                ^~~
a.cc:43:22: error: expected primary-expression before 'int'
   43 |             foreach (int itemp in A) sum += 1 / (double)itemp;
      |                      ^~~
a.cc:43:13: error: 'foreach' was not declared in this scope
   43 |             foreach (int itemp in A) sum += 1 / (double)itemp;
      |             ^~~~~~~
a.cc:45:25: error: request for member 'ToString' in 'answer', which is of non-class type 'double'
   45 |             Show(answer.ToString());
      |                         ^~~~~~~~
a.cc: In static member function 'static void ABC138::Program::A()':
a.cc:51:21: error: expected primary-expression before 'int'
   51 |             int a = int.Parse(Read());
      |                     ^~~
a.cc:52:13: error: 'string' was not declared in this scope
   52 |             string s = Read();
      |             ^~~~~~
a.cc:53:33: error: 's' was not declared in this scope
   53 |             if (a >= 3200) Show(s);
      |                                 ^
a.cc:54:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   54 |             else Show("red");
      |                       ^~~~~
      |                       |
      |                       const char*
a.cc:63:33: note:   initializing argument 1 of 'static void ABC138::Program::Show(int)'
   63 |         static void Show(string s) { Console.WriteLine(s); }
      |                          ~~~~~~~^
a.cc: In static member function 'static void ABC138::Program::Show(int)':
a.cc:63:38: error: 'Console' was not declared in this scope
   63 |         static void Show(string s) { Console.WriteLine(s); }
      |                                      ^~~~~~~