Language: C++

using System;
using System.Linq;

namespace Tenka_B
{
    class Program
    {
        static void Main(string[] args)
        {
            var ABK = Console.ReadLine().Split().Select(long.Parse).ToArray();
            var A = ABK[0];
            var B = ABK[1];
            var K = ABK[2];

            var cnt = 0;
            while (cnt != K)
            {
                cnt++;
                if (cnt % 2 == 1)
                {
                    if (A % 2 == 1) A--;
                    B += A / 2;
                    A /= 2;
                }
                else
                {
                    if (B % 2 == 1) B--;
                    A += B / 2;
                    B /= 2;
                }
            }
            Console.WriteLine(A + " " + B);
        }
    }
}


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.Linq;
      |       ^~~~~~
a.cc:8:26: error: 'string' has not been declared
    8 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:8:35: error: expected ',' or '...' before 'args'
    8 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:34:6: error: expected ';' after class definition
   34 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Tenka_B::Program::Main(int*)':
a.cc:10:13: error: 'var' was not declared in this scope
   10 |             var ABK = Console.ReadLine().Split().Select(long.Parse).ToArray();
      |             ^~~
a.cc:11:17: error: expected ';' before 'A'
   11 |             var A = ABK[0];
      |                 ^
a.cc:12:17: error: expected ';' before 'B'
   12 |             var B = ABK[1];
      |                 ^
a.cc:13:17: error: expected ';' before 'K'
   13 |             var K = ABK[2];
      |                 ^
a.cc:15:17: error: expected ';' before 'cnt'
   15 |             var cnt = 0;
      |                 ^~~
a.cc:16:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
   16 |             while (cnt != K)
      |                    ^~~
      |                    int
a.cc:16:27: error: 'K' was not declared in this scope
   16 |             while (cnt != K)
      |                           ^
a.cc:21:25: error: 'A' was not declared in this scope
   21 |                     if (A % 2 == 1) A--;
      |                         ^
a.cc:22:21: error: 'B' was not declared in this scope
   22 |                     B += A / 2;
      |                     ^
a.cc:22:26: error: 'A' was not declared in this scope
   22 |                     B += A / 2;
      |                          ^
a.cc:27:25: error: 'B' was not declared in this scope
   27 |                     if (B % 2 == 1) B--;
      |                         ^
a.cc:28:21: error: 'A' was not declared in this scope
   28 |                     A += B / 2;
      |                     ^
a.cc:28:26: error: 'B' was not declared in this scope
   28 |                     A += B / 2;
      |                          ^
a.cc:32:13: error: 'Console' was not declared in this scope
   32 |             Console.WriteLine(A + " " + B);
      |             ^~~~~~~
a.cc:32:31: error: 'A' was not declared in this scope
   32 |             Console.WriteLine(A + " " + B);
      |                               ^
a.cc:32:41: error: 'B' was not declared in this scope
   32 |             Console.WriteLine(A + " " + B);
      |                                         ^