Language: C++

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

namespace AtCoder
{
    class Program
    {
        static void Main()
        {
            var A = ReadIntArray();
            if (A[0] + A[1] <= 24)
            {
                Console.WriteLine(A[0] + A[1]);
            }
            else
            {
                Console.WriteLine(A[0] + A[1] - 24);
            }
        }





//ここからテンプレート
        //1行に1入力
        private static string ReadString() { return Console.ReadLine(); }
        private static int ReadInt() { return int.Parse(ReadString()); }
        private static long ReadLong() { return long.Parse(ReadString()); }
        private static double ReadDouble() { return double.Parse(ReadString()); }
        //1行に複数入力(配列で取得)
        private static string[] ReadStringArray() { return ReadString().Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries); }
        private static int[] ReadIntArray() { return ReadStringArray().Select(int.Parse).ToArray(); }
        private static long[] ReadLongArray() { return ReadStringArray().Select(long.Parse).ToArray(); }
        private static double[] ReadDoubleArray() { return ReadStringArray().Select(double.Parse).ToArray(); }
    }
}


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.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Linq;
      |       ^~~~~~
a.cc:30:16: error: expected ':' before 'static'
   30 |         private static string ReadString() { return Console.ReadLine(); }
      |                ^~~~~~~
      |                :
a.cc:30:24: error: 'string' does not name a type
   30 |         private static string ReadString() { return Console.ReadLine(); }
      |                        ^~~~~~
a.cc:31:16: error: expected ':' before 'static'
   31 |         private static int ReadInt() { return int.Parse(ReadString()); }
      |                ^~~~~~~
      |                :
a.cc:32:16: error: expected ':' before 'static'
   32 |         private static long ReadLong() { return long.Parse(ReadString()); }
      |                ^~~~~~~
      |                :
a.cc:33:16: error: expected ':' before 'static'
   33 |         private static double ReadDouble() { return double.Parse(ReadString()); }
      |                ^~~~~~~
      |                :
a.cc:35:16: error: expected ':' before 'static'
   35 |         private static string[] ReadStringArray() { return ReadString().Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries); }
      |                ^~~~~~~
      |                :
a.cc:35:24: error: 'string' does not name a type
   35 |         private static string[] ReadStringArray() { return ReadString().Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries); }
      |                        ^~~~~~
a.cc:36:16: error: expected ':' before 'static'
   36 |         private static int[] ReadIntArray() { return ReadStringArray().Select(int.Parse).ToArray(); }
      |                ^~~~~~~
      |                :
a.cc:36:27: error: expected unqualified-id before '[' token
   36 |         private static int[] ReadIntArray() { return ReadStringArray().Select(int.Parse).ToArray(); }
      |                           ^
a.cc:37:16: error: expected ':' before 'static'
   37 |         private static long[] ReadLongArray() { return ReadStringArray().Select(long.Parse).ToArray(); }
      |                ^~~~~~~
      |                :
a.cc:37:28: error: expected unqualified-id before '[' token
   37 |         private static long[] ReadLongArray() { return ReadStringArray().Select(long.Parse).ToArray(); }
      |                            ^
a.cc:38:16: error: expected ':' before 'static'
   38 |         private static double[] ReadDoubleArray() { return ReadStringArray().Select(double.Parse).ToArray(); }
      |                ^~~~~~~
      |                :
a.cc:38:30: error: expected unqualified-id before '[' token
   38 |         private static double[] ReadDoubleArray() { return ReadStringArray().Select(double.Parse).ToArray(); }
      |                              ^
a.cc:39:6: error: expected ';' after class definition
   39 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AtCoder::Program::Main()':
a.cc:13:13: error: 'var' was not declared in this scope
   13 |             var A = ReadIntArray();
      |             ^~~
a.cc:14:17: error: 'A' was not declared in this scope
   14 |             if (A[0] + A[1] <= 24)
      |                 ^
a.cc:16:17: error: 'Console' was not declared in this scope
   16 |                 Console.WriteLine(A[0] + A[1]);
      |                 ^~~~~~~
a.cc:20:17: error: 'Console' was not declared in this scope
   20 |                 Console.WriteLine(A[0] + A[1] - 24);
      |                 ^~~~~~~
a.cc: In static member function 'static int AtCoder::Program::ReadInt()':
a.cc:31:47: error: expected primary-expression before 'int'
   31 |         private static int ReadInt() { return int.Parse(ReadString()); }
      |                                               ^~~
a.cc:31:47: error: expected ';' before 'int'
a.cc:31:50: error: expected unqualified-id before '.' token
   31 |         private static int ReadInt() { return int.Parse(ReadString()); }
      |                                                  ^
a.cc: In static member function 'static long int AtCoder::Program::ReadLong()':
a.cc:32:49: error: expected primary-expression before 'long'
   32 |         private static long ReadLong() { return long.Parse(ReadString()); }
      |                                                 ^~~~
a.cc:32:49: error: expected ';' before 'long'
a.cc:32:53: error: expected unqualified-id before '.' token
   32 |         private static long ReadLong() { return long.Parse(ReadString()); }
      |                                                     ^
a.cc: In static member function 'static double AtCoder::Program::ReadDouble()':
a.cc:33:53: error: expected primary-expression before 'double'
   33 |         private static double ReadDouble() { return double.Parse(ReadString()); }
      |                                                     ^~~~~~
a.cc:33:53: error: expected ';' before 'double'
a.cc:33:59: error: expected unqualified-id before '.' token
   33 |         private static double ReadDouble() { return double.Parse(ReadString()); }
      |                                                           ^