Language: C++

using System;
using System.Linq;

namespace abc109_c
{
	class Program
	{
		public static long Gcd(long a, long b)
		{
			Func<long, long, long> gcd = null;
			gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
			return a > b ? gcd(a, b) : gcd(b, a);
		}
		static void Main(string[] args)
		{
			int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
			long[] a = Console.ReadLine().Split().Select(long.Parse).ToArray();
			for (int i = 0; i < x[0]; i++)
			{
				a[i] = Math.Abs(a[i] - x[1]);
			}
			if (x[0] == 1) Console.WriteLine(a[0]);
			else
			{
				long ret = Gcd(a[0], a[1]);
				for (int i = 2; i < x[0]; i++)
				{
					ret = Gcd(ret, a[i]);
				}
				Console.WriteLine(ret);
			}
		}
	}

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:23: error: expected ':' before 'static'
    8 |                 public static long Gcd(long a, long b)
      |                       ^~~~~~~
      |                       :
a.cc:14:34: error: 'string' has not been declared
   14 |                 static void Main(string[] args)
      |                                  ^~~~~~
a.cc:14:43: error: expected ',' or '...' before 'args'
   14 |                 static void Main(string[] args)
      |                                           ^~~~
a.cc:33:10: error: expected ';' after class definition
   33 |         }
      |          ^
      |          ;
a.cc: In static member function 'static long int abc109_c::Program::Gcd(long int, long int)':
a.cc:10:25: error: 'Func' was not declared in this scope
   10 |                         Func<long, long, long> gcd = null;
      |                         ^~~~
a.cc:10:30: error: expected primary-expression before 'long'
   10 |                         Func<long, long, long> gcd = null;
      |                              ^~~~
a.cc:11:25: error: 'gcd' was not declared in this scope; did you mean 'Gcd'?
   11 |                         gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
      |                         ^~~
      |                         Gcd
a.cc:11:32: error: 'x' was not declared in this scope
   11 |                         gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
      |                                ^
a.cc:11:35: error: 'y' was not declared in this scope
   11 |                         gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
      |                                   ^
a.cc:11:39: error: expected primary-expression before '>' token
   11 |                         gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
      |                                       ^
a.cc: In static member function 'static void abc109_c::Program::Main(int*)':
a.cc:16:28: error: structured binding declaration cannot have type 'int'
   16 |                         int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                            ^~
a.cc:16:28: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:16:28: error: empty structured binding declaration
a.cc:16:31: error: expected initializer before 'x'
   16 |                         int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                               ^
a.cc:17:29: error: structured binding declaration cannot have type 'long int'
   17 |                         long[] a = Console.ReadLine().Split().Select(long.Parse).ToArray();
      |                             ^~
a.cc:17:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:17:29: error: empty structured binding declaration
a.cc:17:32: error: expected initializer before 'a'
   17 |                         long[] a = Console.ReadLine().Split().Select(long.Parse).ToArray();
      |                                ^
a.cc:18:45: error: 'x' was not declared in this scope
   18 |                         for (int i = 0; i < x[0]; i++)
      |                                             ^
a.cc:20:33: error: 'a' was not declared in this scope
   20 |                                 a[i] = Math.Abs(a[i] - x[1]);
      |                                 ^
a.cc:20:40: error: 'Math' was not declared in this scope
   20 |                                 a[i] = Math.Abs(a[i] - x[1]);
      |                                        ^~~~
a.cc:22:29: error: 'x' was not declared in this scope
   22 |                         if (x[0] == 1) Console.WriteLine(a[0]);
      |                             ^
a.cc:22:40: error: 'Console' was not declared in this scope
   22 |                         if (x[0] == 1) Console.WriteLine(a[0]);
      |                                        ^~~~~~~
a.cc:22:58: error: 'a' was not declared in this scope
   22 |                         if (x[0] == 1) Console.WriteLine(a[0]);
      |                                                          ^
a.cc:25:48: error: 'a' was not declared in this scope
   25 |                                 long ret = Gcd(a[0], a[1]);
      |                                                ^
a.cc:30:33: error: 'Console' was not declared in this scope
   30 |                                 Console.WriteLine(ret);
      |                                 ^~~~~~~
a.cc: At global scope:
a.cc:33:10: error: expected '}' at end of input
   33 |         }
      |          ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^