Language: C++

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

namespace algorithm
{
	class Program
	{

		static void Main(string[] args)
		{

			char[] c = Console.ReadLine().ToCharArray();
			char[] d = new char[c.Length * 2];
			char[] tmp = new char[c.Length * 2];
			int[] calc = new int[c.Length-1];
			long sum = 0;
			//初期化
			calc = Array.ConvertAll(calc, x => x = 0);

			for (int i = 0; i < c.Length; i++)
			{
				d[i * 2] = c[i];
				d[i * 2 + 1] = ' ';
			}

			for (int i = 0; i < 1 << calc.Length; i++)
			{
				Array.Copy(d, tmp,d.Length);
				StringBuilder sb = new StringBuilder();
				sb.Append(c[0]);
				for (int j = 0; j < calc.Length; j++)
				{
					//iを右シフトして最下位ビットをチェック
					
					if ((i >> j & 1) == 1)
					{
						sb.Append("+");
					}
					sb.Append(c[j+1]);

				}
				sum += sb.ToString().Split('+').Select(x => long.Parse(x)).ToArray().Sum();
			}
			Console.WriteLine(sum);
		}

		
	}
}


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:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:11:34: error: 'string' has not been declared
   11 |                 static void Main(string[] args)
      |                                  ^~~~~~
a.cc:11:43: error: expected ',' or '...' before 'args'
   11 |                 static void Main(string[] args)
      |                                           ^~~~
a.cc:50:10: error: expected ';' after class definition
   50 |         }
      |          ^
      |          ;
a.cc: In static member function 'static void algorithm::Program::Main(int*)':
a.cc:14:29: error: structured binding declaration cannot have type 'char'
   14 |                         char[] c = Console.ReadLine().ToCharArray();
      |                             ^~
a.cc:14:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:14:29: error: empty structured binding declaration
a.cc:14:32: error: expected initializer before 'c'
   14 |                         char[] c = Console.ReadLine().ToCharArray();
      |                                ^
a.cc:15:29: error: structured binding declaration cannot have type 'char'
   15 |                         char[] d = new char[c.Length * 2];
      |                             ^~
a.cc:15:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:15:29: error: empty structured binding declaration
a.cc:15:32: error: expected initializer before 'd'
   15 |                         char[] d = new char[c.Length * 2];
      |                                ^
a.cc:16:29: error: structured binding declaration cannot have type 'char'
   16 |                         char[] tmp = new char[c.Length * 2];
      |                             ^~
a.cc:16:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:16:29: error: empty structured binding declaration
a.cc:16:32: error: expected initializer before 'tmp'
   16 |                         char[] tmp = new char[c.Length * 2];
      |                                ^~~
a.cc:17:28: error: structured binding declaration cannot have type 'int'
   17 |                         int[] calc = new int[c.Length-1];
      |                            ^~
a.cc:17:28: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:17:28: error: empty structured binding declaration
a.cc:17:31: error: expected initializer before 'calc'
   17 |                         int[] calc = new int[c.Length-1];
      |                               ^~~~
a.cc:20:25: error: 'calc' was not declared in this scope
   20 |                         calc = Array.ConvertAll(calc, x => x = 0);
      |                         ^~~~
a.cc:20:32: error: 'Array' was not declared in this scope
   20 |                         calc = Array.ConvertAll(calc, x => x = 0);
      |                                ^~~~~
a.cc:20:55: error: 'x' was not declared in this scope
   20 |                         calc = Array.ConvertAll(calc, x => x = 0);
      |                                                       ^
a.cc:20:58: error: expected primary-expression before '>' token
   20 |                         calc = Array.ConvertAll(calc, x => x = 0);
      |                                                          ^
a.cc:22:45: error: 'c' was not declared in this scope
   22 |                         for (int i = 0; i < c.Length; i++)
      |                                             ^
a.cc:24:33: error: 'd' was not declared in this scope
   24 |                                 d[i * 2] = c[i];
      |                                 ^
a.cc:30:44: error: 'd' was not declared in this scope
   30 |                                 Array.Copy(d, tmp,d.Length);
      |                                            ^
a.cc:30:47: error: 'tmp' was not declared in this scope
   30 |                                 Array.Copy(d, tmp,d.Length);
      |                                               ^~~
a.cc:31:33: error: 'StringBuilder' was not declared in this scope
   31 |                                 StringBuilder sb = new StringBuilder();
      |                                 ^~~~~~~~~~~~~
a.cc:32:33: error: 'sb' was not declared in this scope
   32 |                                 sb.Append(c[0]);
      |                                 ^~
a.cc:32:43: error: 'c' was not declared in this scope
   32 |                                 sb.Append(c[0]);
      |                                           ^
a.cc:44:75: error: expected primary-expression before '>' token
   44 |                                 sum += sb.ToString().Split('+').Select(x => long.Parse(x)).ToArray().Sum();
      |                                                                           ^
a.cc:44:77: error: expected primary-expression before 'long'
   44 |                                 sum += sb.ToString().Split('+').Select(x => long.Parse(x)).ToArray().Sum();
      |                                                                             ^~~~
a.cc:46:25: error: 'Console' was not declared in this scope
   46 |                         Console.WriteLine(sum);
      |                         ^~~~~~~