Language: C++

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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var S = Console.ReadLine();
            Console.WriteLine(Plus(S,0));
            
        }

        static long Plus(string s ,long n)
        {
            long retnum = 0;
            if(s.Length == 1)
            {
                return n + long.Parse(s);
            }

            retnum = n + long.Parse(s);

            for(int i =1; i < s.Length; i++)
            {
                retnum += Plus(s.Substring(i), n+long.Parse(s.Substring(0,i)));
            }

            return retnum;
        }

    }

}


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:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:18:26: error: 'string' has not been declared
   18 |         static long Plus(string s ,long n)
      |                          ^~~~~~
a.cc:36:6: error: expected ';' after class definition
   36 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApp1::Program::Main(int*)':
a.cc:13:13: error: 'var' was not declared in this scope
   13 |             var S = Console.ReadLine();
      |             ^~~
a.cc:14:13: error: 'Console' was not declared in this scope
   14 |             Console.WriteLine(Plus(S,0));
      |             ^~~~~~~
a.cc:14:36: error: 'S' was not declared in this scope
   14 |             Console.WriteLine(Plus(S,0));
      |                                    ^
a.cc: In static member function 'static long int ConsoleApp1::Program::Plus(int, long int)':
a.cc:21:18: error: request for member 'Length' in 's', which is of non-class type 'int'
   21 |             if(s.Length == 1)
      |                  ^~~~~~
a.cc:23:28: error: expected primary-expression before 'long'
   23 |                 return n + long.Parse(s);
      |                            ^~~~
a.cc:23:28: error: expected ';' before 'long'
a.cc:23:32: error: expected unqualified-id before '.' token
   23 |                 return n + long.Parse(s);
      |                                ^
a.cc:26:26: error: expected primary-expression before 'long'
   26 |             retnum = n + long.Parse(s);
      |                          ^~~~
a.cc:28:33: error: request for member 'Length' in 's', which is of non-class type 'int'
   28 |             for(int i =1; i < s.Length; i++)
      |                                 ^~~~~~
a.cc:30:34: error: request for member 'Substring' in 's', which is of non-class type 'int'
   30 |                 retnum += Plus(s.Substring(i), n+long.Parse(s.Substring(0,i)));
      |                                  ^~~~~~~~~
a.cc:30:50: error: expected primary-expression before 'long'
   30 |                 retnum += Plus(s.Substring(i), n+long.Parse(s.Substring(0,i)));
      |                                                  ^~~~