Language: C++

#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
using namespace std;

#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }

typedef long long  ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
void algo( string & s, int pocz, long long sum ) {
    if( pocz>=s.size() )
        return;
    long long n=0, x=0;
    for( int i=pocz; i<s.size(); i++ ) {
        n=n*10+s[i]-'0';
        algo( s, i+1, sum+n );
    }
    wy+=sum+n;
}
 
int main()
{
    string s;
    cin >> s;
    algo( s, 0, 0 );
    cout << wy;
    return 0;
}
#include <iostream>

using namespace std;

long long wy;

void algo( string & s, int pocz, long long sum ) {
    if( pocz>=s.size() )
        return;
    long long n=0, x=0;
    for( int i=pocz; i<s.size(); i++ ) {
        n=n*10+s[i];
        algo( s, i+1, sum+n );
    }
    wy+=sum+n;
}

int main()
{
    string s;
    cin >> s;
    algo( s, 0, 0 );
    cout << wy;
    return 0;
}

Compiler output:
a.cc: In function 'void algo(std::string&, int, long long int)':
a.cc:55:5: error: 'wy' was not declared in this scope
   55 |     wy+=sum+n;
      |     ^~
a.cc: In function 'int main()':
a.cc:63:13: error: 'wy' was not declared in this scope
   63 |     cout << wy;
      |             ^~
a.cc: At global scope:
a.cc:72:6: error: redefinition of 'void algo(std::string&, int, long long int)'
   72 | void algo( string & s, int pocz, long long sum ) {
      |      ^~~~
a.cc:47:6: note: 'void algo(std::string&, int, long long int)' previously defined here
   47 | void algo( string & s, int pocz, long long sum ) {
      |      ^~~~
a.cc:83:5: error: redefinition of 'int main()'
   83 | int main()
      |     ^~~~
a.cc:58:5: note: 'int main()' previously defined here
   58 | int main()
      |     ^~~~