Language: C++

#include <bits/stdc++.h> 
using namespace std;
typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
#define rep(i, n) for(ll i=0; i<n; i++)
#define Rep(i, j, n) for(ll i=j; i<n; i++)
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
const ll INF = 1LL << 60;

int main() {
    string s; cin >> s;
    ll ans = 0;
    rep(i, (1<<s.size()-1)) {
        ll cur = s[0] - '0';
        rep(j, s.size()-1) {
            if(i & (1<<j)) {
                ans += cur;
                cur = 0;
            }
            else cur *= 10;
            cur += s[j+1] - '0';
            //cout << i << ' ' << j << ' ' << cur  << ' ' << ans << endl;
        }
        ans += cur;
    }
    cout << ans << endl;
}#include <bits/stdc++.h> 
using namespace std;
typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
#define rep(i, n) for(ll i=0; i<n; i++)
#define Rep(i, j, n) for(ll i=j; i<n; i++)
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
const ll INF = 1LL << 60;

int main() {
    string s; cin >> s;
    ll ans = 0;
    rep(i, (1<<s.size()-1)) {
        ll cur = s[0] - '0';
        rep(j, s.size()-1) {
            if(i & (1<<j)) {
                ans += cur;
                cur = 0;
            }
            else cur *= 10;
            cur += s[j+1] - '0';
            //cout << i << ' ' << j << ' ' << cur  << ' ' << ans << endl;
        }
        ans += cur;
    }
    cout << ans << endl;
}#include <bits/stdc++.h> 
using namespace std;
typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
#define rep(i, n) for(ll i=0; i<n; i++)
#define Rep(i, j, n) for(ll i=j; i<n; i++)
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
const ll INF = 1LL << 60;

int main() {
    string s; cin >> s;
    ll ans = 0;
    rep(i, (1<<s.size()-1)) {
        ll cur = s[0] - '0';
        rep(j, s.size()-1) {
            if(i & (1<<j)) {
                ans += cur;
                cur = 0;
            }
            else cur *= 10;
            cur += s[j+1] - '0';
            //cout << i << ' ' << j << ' ' << cur  << ' ' << ans << endl;
        }
        ans += cur;
    }
    cout << ans << endl;
}

Compiler output:
a.cc:28:2: error: stray '#' in program
   28 | }#include <bits/stdc++.h>
      |  ^
a.cc:55:2: error: stray '#' in program
   55 | }#include <bits/stdc++.h>
      |  ^
a.cc:28:3: error: 'include' does not name a type
   28 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:30:32: error: redefinition of 'const ll MM'
   30 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                ^~
a.cc:3:32: note: 'const ll MM' previously defined here
    3 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                ^~
a.cc:30:51: error: redefinition of 'll mod'
   30 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                                   ^~~
a.cc:3:51: note: 'll mod' previously defined here
    3 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                                   ^~~
a.cc:34:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
   34 | template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:7:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
    7 | template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:35:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
   35 | template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:8:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
    8 | template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:36:10: error: redefinition of 'const ll INF'
   36 | const ll INF = 1LL << 60;
      |          ^~~
a.cc:9:10: note: 'const ll INF' previously defined here
    9 | const ll INF = 1LL << 60;
      |          ^~~
a.cc:38:5: error: redefinition of 'int main()'
   38 | int main() {
      |     ^~~~
a.cc:11:5: note: 'int main()' previously defined here
   11 | int main() {
      |     ^~~~
a.cc:55:3: error: 'include' does not name a type
   55 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:57:32: error: redefinition of 'const ll MM'
   57 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                ^~
a.cc:3:32: note: 'const ll MM' previously defined here
    3 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                ^~
a.cc:57:51: error: redefinition of 'll mod'
   57 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                                   ^~~
a.cc:3:51: note: 'll mod' previously defined here
    3 | typedef long long ll; const ll MM = 1000000000;ll mod = MM + 7;
      |                                                   ^~~
a.cc:61:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
   61 | template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:7:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
    7 | template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:62:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
   62 | template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:8:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
    8 | template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
      |                               ^~~~~
a.cc:63:10: error: redefinition of 'const ll INF'
   63 | const ll INF = 1LL << 60;
      |          ^~~
a.cc:9:10: note: 'const ll INF' previously defined here
    9 | const ll INF = 1LL << 60;
      |          ^~~
a.cc:65:5: error: redefinition of 'int main()'
   65 | int main() {
      |     ^~~~
a.cc:11:5: note: 'int main()' previously defined here
   11 | int main() {
      |     ^~~~