Language: C++

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Numerics;

class Myon
{
    //chokudaiさんのコードをコピペ
    static Scanner cin;
    public Myon() { }
    public static int Main()
    {
        //Console.SetOut(new Printer(Console.OpenStandardOutput()));
        cin = new Scanner();
        new Myon().calc();
        Console.Read();

        return 0;
    }


    public void calc()
    {
        int n = cin.nextInt();
        double output =  (n -(n / 2)) / (double)n;
        showL($"{output}");

    }



    public void backetSort(ref int[] a)
    {
        //max a << a.len に対して有効なソート
        //よってa = int[] とする
        long n = a.Length;
        var count = new int[n];
        var loc = new long[n];//loc[i] は i が終わる 位置 max index where c[index] = loc[i]
        for (long i = 0; i < n; i++) count[a[i]]++;
        loc[0] = count[0] - 1;
        for (long i = 0; i < n-1; i++) loc[i+1] = loc[i] + count[i+1]; 
        long index = 0;

        for(int i = 0; i < n; i++)
        {
            while (index <= loc[i]) a[index++] = i; //incex <= loc[i] == index < loc[i] + 1
        }
    }

    public static void showL(long n) { Console.WriteLine(n); }
    public static void showL(string s) { Console.WriteLine(s); }
}

class Printer : StreamWriter
{
    public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
    public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
    public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { }
}

class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        while (i >= s.Length)
        {
            string st = Console.ReadLine();
            while (st == "") st = Console.ReadLine();
            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            i = 0;
        }
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }

}

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;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Linq;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.IO;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System.Text;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
    7 | using System.Globalization;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'System'
    8 | using System.Numerics;
      |       ^~~~~~
a.cc:13:12: error: 'Scanner' does not name a type
   13 |     static Scanner cin;
      |            ^~~~~~~
a.cc:14:11: error: expected ':' before 'Myon'
   14 |     public Myon() { }
      |           ^~~~~
      |           :
a.cc:15:11: error: expected ':' before 'static'
   15 |     public static int Main()
      |           ^~~~~~~
      |           :
a.cc:26:11: error: expected ':' before 'void'
   26 |     public void calc()
      |           ^~~~~
      |           :
a.cc:36:11: error: expected ':' before 'void'
   36 |     public void backetSort(ref int[] a)
      |           ^~~~~
      |           :
a.cc:36:28: error: 'ref' has not been declared
   36 |     public void backetSort(ref int[] a)
      |                            ^~~
a.cc:36:28: error: two or more data types in declaration of 'parameter'
a.cc:36:37: error: expected ')' before 'a'
   36 |     public void backetSort(ref int[] a)
      |                           ~         ^~
      |                                     )
a.cc:36:36: error: expected ';' at end of member declaration
   36 |     public void backetSort(ref int[] a)
      |                                    ^
      |                                     ;
a.cc:36:38: error: 'a' does not name a type
   36 |     public void backetSort(ref int[] a)
      |                                      ^
a.cc:54:11: error: expected ':' before 'static'
   54 |     public static void showL(long n) { Console.WriteLine(n); }
      |           ^~~~~~~
      |           :
a.cc:55:11: error: expected ':' before 'static'
   55 |     public static void showL(string s) { Console.WriteLine(s); }
      |           ^~~~~~~
      |           :
a.cc:55:30: error: 'string' has not been declared
   55 |     public static void showL(string s) { Console.WriteLine(s); }
      |                              ^~~~~~
a.cc:56:2: error: expected ';' after class definition
   56 | }
      |  ^
      |  ;
a.cc: In static member function 'static int Myon::Main()':
a.cc:18:9: error: 'cin' was not declared in this scope
   18 |         cin = new Scanner();
      |         ^~~
a.cc:18:19: error: expected type-specifier before 'Scanner'
   18 |         cin = new Scanner();
      |                   ^~~~~~~
a.cc:19:19: error: expected ';' before '.' token
   19 |         new Myon().calc();
      |                   ^
a.cc:20:9: error: 'Console' was not declared in this scope
   20 |         Console.Read();
      |         ^~~~~~~
a.cc: In member function 'void Myon::calc()':
a.cc:28:17: error: 'cin' was not declared in this scope
   28 |         int n = cin.nextInt();
      |                 ^~~
a.cc:30:15: error: '$' was not declared in this scope
   30 |         showL($"{output}");
      |               ^
a.cc: In static member function 'static void Myon::showL(long int)':
a.cc:54:40: error: 'Console' was not declared in this scope
   54 |     public static void showL(long n) { Console.WriteLine(n); }
      |                                        ^~~~~~~
a.cc: In static member function 'static void Myon::showL(int)':
a.cc:55:42: error: 'Console' was not declared in this scope
   55 |     public static void showL(string s) { Console.WriteLine(s); }
      |                                          ^~~~~~~
a.cc: At global scope:
a.cc:59:1: error: expected class-name before '{' token
   59 | {
      | ^
a.cc:60:11: error: expected ':' before 'override'
   60 |     public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
      |           ^~~~~~~~~
      |           :
a.cc:60:12: error: 'override' does not name a type
   60 |     public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
      |            ^~~~~~~~
a.cc:61:11: error: expected ':' before 'Printer'
   61 |     public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
      |           ^~~~~~~~
      |           :
a.cc:61:26: error: expected ')' before 'stream'
   61 |     public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
      |                   ~      ^~~~~~~
      |                          )
a.cc:62:11: error: expected ':' before 'Printer'
   62 |     public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { }
      |           ^~~~~~~~
      |           :
a.cc:62:26: error: expected ')' before 'stream'
   62 |     public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { }
      |                   ~      ^~~~~~~
      |                          )
a.cc:63:2: error: expected ';' after class definition
   63 | }
      |  ^
      |  ;
a.cc:67:5: error: 'string' does not name a type
   67 |     string[] s;
      |     ^~~~~~
a.cc:70:9: error: expected unqualified-id before '[' token
   70 |     char[] cs = new char[] { ' ' };
      |         ^
a.cc:72:11: error: expected ':' before 'Scanner'
   72 |     public Scanner()
      |           ^~~~~~~~
      |           :
a.cc:78:11: error: expected ':' before 'string'
   78 |     public string next()
      |           ^~~~~~~
      |           :
a.cc:78:12: error: 'string' does not name a type
   78 |     public string next()
      |            ^~~~~~
a.cc:90:11: error: expected ':' before 'int'
   90 |     public int nextInt()
      |           ^~~~
      |           :
a.cc:95:11: error: expected ':' before 'long'
   95 |     public long nextLong()
      |           ^~~~~
      |           :
a.cc:100:11: error: expected ':' before 'double'
  100 |     public double nextDouble()
      |           ^~~~~~~
      |           :
a.cc:105:2: error: expected ';' after class definition
  105 | }
      |  ^
      |  ;
a.cc: In constructor 'Scanner::Scanner()':
a.cc:74:9: error: 's' was not declared in this scope
   74 |         s = new string[0];
      |         ^
a.cc:74:17: error: 'string' does not name a type
   74 |         s = new string[0];
      |                 ^~~~~~
a.cc: In member function 'int Scanner::nextInt()':
a.cc:92:16: error: expected primary-expression before 'int'
   92 |         return int.Parse(next());
      |                ^~~
a.cc:92:16: error: expected ';' before 'int'
a.cc:92:19: error: expected unqualified-id before '.' token
   92 |         return int.Parse(next());
      |                   ^
a.cc: In member function 'long int Scanner::nextLong()':
a.cc:97:16: error: expected primary-expression before 'long'
   97 |         return long.Parse(next());
      |                ^~~~
a.cc:97:16: error: expected ';' before 'long'
a.cc:97:20: error: expected unqualified-id before '.' token
   97 |         return long.Parse(next());
      |                    ^
a.cc: In member function 'double Scanner::nextDouble()':
a.cc:102:16: error: expected primary-expression before 'double'
  102 |         return double.Parse(next());
      |                ^~~~~~
a.cc:102:16: error: expected ';' before 'double'
a.cc:102:22: error: expected unqualified-id before '.' token
  102 |         return double.Parse(next());
      |                      ^