Language: C++

using System;
using System.Collections.Generic;


class Program
{
    static void Main(string[] args)
    {
        Input CInput = new Input();

        int[] input = new int[(int)Input.Define.MAX_ArraySize];

        input = CInput.Line1_int(' ', 2);

        int x = 0, y = 0;
        if (input[0] == input[1])
        {
            x = input[0];
            y = input[1];
        }
        else if (input[0] > input[1])
        {
            x = input[0] % input[1];
            y = input[1];
        }
        else
        {
            x = input[1] % input[0];
            y = input[0];
        }

        int i = x;
        while (true)
        {
            if ((x % i) == 0)
            {
                if ((y % i) == 0)
                {
                    System.Console.WriteLine(i);
                    break;
                }
            }
            if (i == x) i /= 2;
            else i--;
        }
    }
}







class Input
{
    public enum Define
    {
        MAX_ArraySize = 100,
        ArraySize2d = 100,                // 2?¬?????????????[][?] ???????
    }

    public string Line1_string()
    {
        return Console.ReadLine();
    }

    public string[] Line1_string(int chr)
    {
        var input = Console.ReadLine();
        var split = input.Split(' ');
        return split;
    }

    public int Line1_int()
    {
        var input = Console.ReadLine();
        return int.Parse(input);
    }

    public double Line1_double()
    {
        var input = Console.ReadLine();
        return double.Parse(input);
    }

    public int[] Line1_int(int chr, int num)
    {
        var input = Console.ReadLine();
        var split = input.Split(' ');
        int[] spliti = new int[100];
        for (int i = 0; i < num; i++)
        {
            spliti[i] = int.Parse(split[i]);
        }
        return spliti;
    }

    public int[] Multiline_int(ref int datanum)
    {
        int i = 0;
        int[] data = new int[(int)Input.Define.MAX_ArraySize];
        while (true)
        {
            var input = Console.ReadLine();
            var value = int.Parse(input);
            if (value == 0) break;
            data[i] = value;
            i++;
        }
        datanum = i;
        return data;
    }

    /// <summary>
    /// ?????°??????int??????????????????????????????
    /// </summary>
    /// <param name="chr">???????????????</param>
    /// <param name="num">?????????????????????????????°</param>
    /// <param name="datanum">??????????????????????????°</param>
    /// <returns></returns>
    public int[,] Multiline_int(int chr, int num, ref int datanum)
    {
        int i = 0, zerocount = 0;
        int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        while (true)
        {
            var input = Console.ReadLine();
            var split = input.Split(' ');
            int[] spliti = new int[100];
            zerocount = 0;
            for (int j = 0; j < num; j++)
            {
                spliti[j] = int.Parse(split[j]);
                if (spliti[j] == 0) zerocount++;
            }
            if (zerocount == num) break;
            for (int j = 0; j < num; j++)
            {
                if (spliti[0] == 0 && spliti[1] == 0) break; // ???????????????????????????
            }
            for (int j = 0; j < num; j++)
            {
                data[i, j] = spliti[j];
            }
            i++;
        }
        datanum = i;
        return data;
    }

    /// <summary>
    /// ?????°??????int??????????????????????????????
    /// </summary>
    /// <param name="chr">???????????????</param>
    /// <param name="num">?????????????????????????????°</param>
    /// <param name="loadnum">???????????????????????°</param>
    /// <returns></returns>
    public int[,] Multiline_int(int chr, int num, int loadnum)
    {
        int i = 0;
        int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        while (true)
        {
            if (loadnum == i) break;

            var input = Console.ReadLine();
            var split = input.Split(' ');
            int[] spliti = new int[100];
            for (int j = 0; j < num; j++)
            {
                spliti[j] = int.Parse(split[j]);
            }
            for (int j = 0; j < num; j++)
            {
                data[i, j] = spliti[j];
            }
            i++;
        }
        return data;
    }


}

//??£?¨????????????¬

//int[] input = new int[(int)Input.Define.MAX_ArraySize];
//int[,] input = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];

class EasyTask
{
    public void Swap(ref int a, ref int b)
    {
        int buf = 0;
        buf = a;
        a = b;
        b = buf;
    }






}

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:7:22: error: 'string' has not been declared
    7 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:7:31: error: expected ',' or '...' before 'args'
    7 |     static void Main(string[] args)
      |                               ^~~~
a.cc:47:2: error: expected ';' after class definition
   47 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:9:9: error: 'Input' was not declared in this scope
    9 |         Input CInput = new Input();
      |         ^~~~~
a.cc:11:12: error: structured binding declaration cannot have type 'int'
   11 |         int[] input = new int[(int)Input.Define.MAX_ArraySize];
      |            ^~
a.cc:11:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:12: error: empty structured binding declaration
a.cc:11:15: error: expected initializer before 'input'
   11 |         int[] input = new int[(int)Input.Define.MAX_ArraySize];
      |               ^~~~~
a.cc:13:9: error: 'input' was not declared in this scope; did you mean 'int'?
   13 |         input = CInput.Line1_int(' ', 2);
      |         ^~~~~
      |         int
a.cc:13:17: error: 'CInput' was not declared in this scope
   13 |         input = CInput.Line1_int(' ', 2);
      |                 ^~~~~~
a.cc:39:21: error: 'System' was not declared in this scope
   39 |                     System.Console.WriteLine(i);
      |                     ^~~~~~
a.cc: At global scope:
a.cc:57:11: error: expected ':' before 'enum'
   57 |     public enum Define
      |           ^~~~~
      |           :
a.cc:63:5: error: expected unqualified-id before 'public'
   63 |     public string Line1_string()
      |     ^~~~~~
a.cc:68:11: error: expected ':' before 'string'
   68 |     public string[] Line1_string(int chr)
      |           ^~~~~~~
      |           :
a.cc:68:12: error: 'string' does not name a type
   68 |     public string[] Line1_string(int chr)
      |            ^~~~~~
a.cc:75:11: error: expected ':' before 'int'
   75 |     public int Line1_int()
      |           ^~~~
      |           :
a.cc:81:11: error: expected ':' before 'double'
   81 |     public double Line1_double()
      |           ^~~~~~~
      |           :
a.cc:87:11: error: expected ':' before 'int'
   87 |     public int[] Line1_int(int chr, int num)
      |           ^~~~
      |           :
a.cc:87:15: error: expected unqualified-id before '[' token
   87 |     public int[] Line1_int(int chr, int num)
      |               ^
a.cc:99:11: error: expected ':' before 'int'
   99 |     public int[] Multiline_int(ref int datanum)
      |           ^~~~
      |           :
a.cc:99:15: error: expected unqualified-id before '[' token
   99 |     public int[] Multiline_int(ref int datanum)
      |               ^
a.cc:122:11: error: expected ':' before 'int'
  122 |     public int[,] Multiline_int(int chr, int num, ref int datanum)
      |           ^~~~
      |           :
a.cc:122:15: error: expected unqualified-id before '[' token
  122 |     public int[,] Multiline_int(int chr, int num, ref int datanum)
      |               ^
a.cc:159:11: error: expected ':' before 'int'
  159 |     public int[,] Multiline_int(int chr, int num, int loadnum)
      |           ^~~~
      |           :
a.cc:159:15: error: expected unqualified-id before '[' token
  159 |     public int[,] Multiline_int(int chr, int num, int loadnum)
      |               ^
a.cc:184:2: error: expected ';' after class definition
  184 | }
      |  ^
      |  ;
a.cc: In member function 'int Input::Line1_int()':
a.cc:77:9: error: 'var' was not declared in this scope
   77 |         var input = Console.ReadLine();
      |         ^~~
a.cc:78:16: error: expected primary-expression before 'int'
   78 |         return int.Parse(input);
      |                ^~~
a.cc:78:16: error: expected ';' before 'int'
a.cc:78:19: error: expected unqualified-id before '.' token
   78 |         return int.Parse(input);
      |                   ^
a.cc: In member function 'double Input::Line1_double()':
a.cc:83:9: error: 'var' was not declared in this scope
   83 |         var input = Console.ReadLine();
      |         ^~~
a.cc:84:16: error: expected primary-expression before 'double'
   84 |         return double.Parse(input);
      |                ^~~~~~
a.cc:84:16: error: expected ';' before 'double'
a.cc:84:22: error: expected unqualified-id before '.' token
   84 |         return double.Parse(input);
      |                      ^
a.cc: At global scope:
a.cc:193:11: error: expected ':' before 'void'
  193 |     public void Swap(ref int a, ref int b)
      |           ^~~~~
      |           :
a.cc:193:22: error: 'ref' has not been declared
  193 |     public void Swap(ref int a, ref int b)
      |                      ^~~
a.cc:193:22: error: two or more data types in declaration of 'a'
a.cc:193:31: error: expected ')' before ',' token
  193 |     public void Swap(ref int a, ref int b)
      |                     ~         ^
      |                               )
a.cc:193:33: error: variable or field 'ref' declared void
  193 |     public void Swap(ref int a, ref int b)
      |                                 ^~~
a.cc:193:33: error: expected ';' at end of member declaration
  193 |     public void Swap(ref int a, ref int b)
      |                                 ^~~
      |                                    ;
a.cc:193:41: error: expected ';' at end of member declaration
  193 |     public void Swap(ref int a, ref int b)
      |                                         ^
      |                                          ;
a.cc:193:42: error: expected unqualified-id before ')' token
  193 |     public void Swap(ref int a, ref int b)
      |                                          ^
a.cc:206:2: error: expected ';' after class definition
  206 | }
      |  ^
      |  ;