criyle/codenet-compile-errors huggingface dataset:
Language: C

/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/

	coding: utf-8
	lang: C (GCC 5.4.1)
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
#define TBMod 1000000007

TLong sum(TLong n,TLong i,TLong sum)
{
	if(n / i == 0)	return (n + sum);
	return sum(n / i, 10, sum + n % i) + sum(n, i * 10, sum);
}
 
int main(int argc, char const *argv[])
{
	TLong n;
	scanf("%lld",&n);
	printf("%lld", sum(n, 10, 0));
	return 0;
 }


Compiler output:
main.c: In function 'sum':
main.c:22:16: error: called object 'sum' is not a function or function pointer
   22 |         return sum(n / i, 10, sum + n % i) + sum(n, i * 10, sum);
      |                ^~~
main.c:19:33: note: declared here
   19 | TLong sum(TLong n,TLong i,TLong sum)
      |                                 ^
main.c:22:46: error: called object 'sum' is not a function or function pointer
   22 |         return sum(n / i, 10, sum + n % i) + sum(n, i * 10, sum);
      |                                              ^~~
main.c:19:33: note: declared here
   19 | TLong sum(TLong n,TLong i,TLong sum)
      |                                 ^
Language: C

/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/

	coding: utf-8
	lang: C (GCC 5.4.1)
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
#define TBMod 1000000007

TLong sum(TLong n,TLong i,TLong sum)
{
	if(n / i == 0)	return (n + sum);
	return sum(n / i, 10, sum + n % i) + cal_sum(n, i * 10, sum);
}
 
int main(int argc, char const *argv[])
{
	TLong n;
	scanf("%lld",&n);
	printf("%lld", sum(n, 10, 0));
	return 0;
 }


Compiler output:
main.c: In function 'sum':
main.c:22:16: error: called object 'sum' is not a function or function pointer
   22 |         return sum(n / i, 10, sum + n % i) + cal_sum(n, i * 10, sum);
      |                ^~~
main.c:19:33: note: declared here
   19 | TLong sum(TLong n,TLong i,TLong sum)
      |                                 ^
main.c:22:46: error: implicit declaration of function 'cal_sum' [-Wimplicit-function-declaration]
   22 |         return sum(n / i, 10, sum + n % i) + cal_sum(n, i * 10, sum);
      |                                              ^~~~~~~
Language: C++

#include <iostream>
#include<vector>
#include<algorithm>
#include <queue>
#include <string>
#include <set>
#include <bitset>

using namespace std;
#define ff(i,n,m) for(int i=n;i<m;i++)
#define i64 int64_t
#define tos(x) to_string(x)

int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

int main() {
	string s;
	cin >> s;
	vector<int> a(s.size()+1);
	int ans = 0;
	ff(i, 0, s.size()) {
		a.at(i) = ctoi(s.at(i));
	}
	ff(i, 0, 1 << s.size()-1) {
		bitset<9> data(i);
		ff(j, 0, s.size()) {
			int x = 0;
			ff(k, j, s.size()-1) {
				if (!data.test(k)) {
					x++;
				}
				else {
					break;
				}
			}
			ans += a.at(j) * pow(10, x);
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:42: error: 'pow' was not declared in this scope
   41 |                         ans += a.at(j) * pow(10, x);
      |                                          ^~~
Language: C++

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        scanner.close();

        int length = S.length();
        long total = 0;

        // bit全探索
        // 集合 (1, 2, 3) の部分集合(1, 12, 123 など) の種類で回す (2のn乗 == Math.pow(2, S))
        for (int i = 0; i < (1 << length - 1); i++) {
            String first = String.valueOf(S.charAt(0));
            StringBuilder sb = new StringBuilder(first);

            for (int j = 0; j < length - 1; j++) {
                if (((i >> j) & 1) == 1) {
                    // 間に+を挿入
                    sb.append("+");
                }
                sb.append(S.charAt(j + i));
            }

            String[] ss = sb.toString().split("\\+");
            for (String s : ss) {
                total += Long.parseLong(s);
            }
        }

        System.out.println(total);
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

include<bits/stdc++.h>
using namespace std;
using ll =long long;
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SORT(i) sort((i).begin(),(i).end())
constexpr int INF = 2000000000;
constexpr int mod = 1000000007;

int main() {
	string s; cin >> s;
	ll ans = 0;
	rep(bit, (1 << (s.size() - 1))) {
		ll a = s[0] - '0';
		rep(i, s.size() - 1) {
			if (bit & (1 << i)) {
				ans += a;
				a = 0;
			}
			a = a * 10 + s[i + 1] - '0';
		}
		ans += a;
	}
	cout << ans << "\n";
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: 'string' was not declared in this scope
   11 |         string s; cin >> s;
      |         ^~~~~~
a.cc:11:19: error: 'cin' was not declared in this scope
   11 |         string s; cin >> s;
      |                   ^~~
a.cc:11:26: error: 's' was not declared in this scope
   11 |         string s; cin >> s;
      |                          ^
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << ans << "\n";
      |         ^~~~
Language: C++

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		String s = scan.next();
		long n = Long.valueOf(s);
		
		System.out.println(dfs(n,1,0));
	}
	
	
	static long dfs(long n, int m, long sum) {//mは何桁目まで調べたか
		if(NumberOfDigit(n) == m) {
			return sum + n;
		}
		
		sum = dfs(n,m+1,sum);
		
		sum = (int)Math.pow(2, NumberOfDigit(n)-m-1) * (n%(int)Math.pow(10,m)) + dfs(n/(int)Math.pow(10,m),1,sum);
		
		return sum;
	}
	
	static int NumberOfDigit(long num) {
		int i = 0;
		while(num != 0) {
			num /= 10;
			i++;
		}
		return i;
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:34:2: error: expected ';' after class definition
   34 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'Scanner' was not declared in this scope
    5 |                 Scanner scan = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:7:17: error: 'String' was not declared in this scope
    7 |                 String s = scan.next();
      |                 ^~~~~~
a.cc:8:26: error: 'Long' was not declared in this scope; did you mean 'long'?
    8 |                 long n = Long.valueOf(s);
      |                          ^~~~
      |                          long
a.cc:8:39: error: 's' was not declared in this scope
    8 |                 long n = Long.valueOf(s);
      |                                       ^
a.cc:10:17: error: 'System' was not declared in this scope
   10 |                 System.out.println(dfs(n,1,0));
      |                 ^~~~~~
a.cc: In static member function 'static long int Main::dfs(long int, int, long int)':
a.cc:21:28: error: 'Math' was not declared in this scope
   21 |                 sum = (int)Math.pow(2, NumberOfDigit(n)-m-1) * (n%(int)Math.pow(10,m)) + dfs(n/(int)Math.pow(10,m),1,sum);
      |                            ^~~~
Language: C++

import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		String s = scan.next();
		long n = Long.valueOf(s);
		
		System.out.println(dfs(n,1,0));
	}
	
	
	static long dfs(long n, int m, long sum) {//mは何桁目まで調べたか
		if(NumberOfDigit(n) == m) {
			return sum + n;
		}
		
		sum = dfs(n,m+1,sum);
		
		sum = (int)Math.pow(2, NumberOfDigit(n)-m-1) * (n%(int)Math.pow(10,m)) + dfs(n/(int)Math.pow(10,m),1,sum);
		
		return sum;
	}
	
	static int NumberOfDigit(long num) {
		int i = 0;
		while(num != 0) {
			num /= 10;
			i++;
		}
		return i;
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;


long long ManyFormula(long long S, long long head, long long cnt){

    long long sum = 0;

    if(cnt == 1){
        return 0;
    }
    else{
        for(long long i=1; i < cnt; i++){
            long long cnt_next=0;
            long long S_next = S % (long long)pow(10, cnt - i);
            long long head_next = head + S / (long long)pow(10, cnt - i);

            for(long long j=0; j < S_next; j++){
                if(S_next / (long long)pow(10, j) == 0){
                break;
                }
                cnt_next++; 
            }

//            cout << S << " " << S_next << " " << head_next << " " << cnt_next << " " << sum << endl;

            if(cnt_next == 1){
                sum += S_next + head_next;
            }
            else{
                sum += S_next + head_next + ManyFormula(S_next, head_next, cnt_next); 
            }

        }
    }

    return sum;

}


long long main() {
    long long S = 0;
    cin >> S;

    long long cnt = 0;
    for(long long i=0; i < S; i++){
        if(S / (long long)pow(10, i) == 0){
            break;
        }
        cnt++; // 125 : 3
    }

    long long sum = S;
    long long head=0;
    sum += ManyFormula(S, head, cnt);
 
    cout <<  sum << endl;

}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)

int main() {
  string s;
  cin >> s;
  ll sum=0;  
rep(i,1 << s.size()-1){
  int next=0,count=1;
  for (int j=0; j < s.size()-1;j++){
          s2=s;
      if ( i & 1 << j){
        sum+=stoll(s.substr(next,count));
        next=j+1;
        count=1;
      }else{
        count++;
      }
  }
  sum+=stoll(s.substr(next));
}
  cout << sum << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: 's2' was not declared in this scope; did you mean 's'?
   20 |           s2=s;
      |           ^~
      |           s
Language: C++

S = int(input())
numbers = str(S)
L = len(numbers)
prev = 0
for bit in range(1<<L-1):
    now = int(numbers[0])
    for i in range(L-1):
        if bit & (1<<i):
            prev += now
            now = int(numbers[i+1])
        else:
            now = now * 10 + int(numbers[i+1])
    prev += now
print(prev)

Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S = int(input())
      | ^
Language: C++

#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
//#include <bits/stdc++.h>
using namespace std;

// +を入れるか入れないかを分岐させて再帰する関数
void ReFunc(vector<int> vec, int place, int left, int right, long long &sum)
{
    // 最後まで終わったら算出する。
    if (place == vec.size() - 1)
    {
        sum += left + right;
    }
    else
    {
        //足し算の場合、今考えている左辺と右辺を足して左辺を作り、次を右辺とする(例：123)の場合、(vec, 1, 1, 2)→(vec, 2, 3, 3)
        ReFunc(vec, place + 1, left + right, vec.at(place + 1), sum);
        //なしの場合、今考えている左辺はそのままにして、右辺を10倍して次の右辺に足して、次の演算を行う (vec, 1, 0, 12)→(vec, 2, 0, 123)
        ReFunc(vec, place + 1, left, right * 10 + vec.at(place + 1), sum);
    }
}



int main()
{
    string S;
    cin >> S;
    vector<int> vec(S.size());
    for (int i = 0; i < S.size(); i++)
    {
        vec.at(i) = S.at(i) - '0';
    }

    long long sum = 0;
    ReFunc(vec, 0, 0, vec.at(0), sum);
    cout << sum << endl;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <cfloat>
#include <fstream>
#include <limits.h>
#include <list>
#include <math.h>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <utility>
#include <sstream>
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define FORR(i,a,b)for(int i=(a);i<=(b);i++)
#define repR(i,n) for(int i=n;i>=0;i--)
#define P pair<int, int>
#define sz(x) x.size()
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define VE vector<int>
#define COUT(x) cout<<(x)<<endl
#define MA map<int,int>
#define SE set<int>
#define PQ priority_queue
#define COUT(x) cout<<(x)<<endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl

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;
}

using namespace std;
typedef long long ll;
using Graph = vector<vector<int>>;
ll gcd(ll a, ll b) {
	if (a < b)swap(a, b);
	if (b == 0) return a;
	return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
bool prime(int n) {
	for (int i = 2; i <= sqrt(n); i++) {
		if (n%i == 0)return false;
	}
	return n != 1;
}


const long long MOD = 1000000007;
const long long INF = 1LL << 50;

// pair -> vector<pair<int,int>> 
//		   AandB.push_back(make_pair(a[i],b[i]))
int n;
int s[10];
int ans = 0;

void dfs(int i, int sum, int now) {
	if (i == n - 1) {
		ans += sum + now;
	}
	else {
		dfs(i + 1, sum + now, s[i + 1]);
		dfs(i + 1, sum, now * 10 + s[i + 1]);
	}
}

signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	string str; cin >> str;
	n = str.size();
	rep(i, n){
		s[i] = str[i] - '0';
	}
	dfs(0, 0, s[0]);
	cout << ans << endl;
	return 0;
}
}

signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	string str; cin >> str;
	n = str.size();
	rep(i, n){
		s[i] = str[i] - '0';
	}
	dfs(0, 0, s[0]);
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:116:1: error: expected declaration before '}' token
  116 | }
      | ^
a.cc:118:8: error: redefinition of 'int main()'
  118 | signed main() {
      |        ^~~~
a.cc:104:8: note: 'int main()' previously defined here
  104 | signed main() {
      |        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
typedef long long ll;
using vi=vector<int>;
using vvi=vector<vector<int>>;
void chmin(int a,int b){if(b<a)a=b;}
void chmax(int a,int b){if(a<b)a=b;}

int ans,n;
int a[11];
void dfs(int i,int sum,int s){
  ans+=sum;
  s*=10;
  if(i<n-1){
    dfs(i+1,sum+s*9,s+a[i]);
    dfs(i+1,0,0);
  }
}
int main(){
  string s;cin>>s;n=s.size();
  int d=stoi(s);
  rep(i,n){
    sum+=d%10;
    a[n-i-1]=d%10;
    d/=10;
  }
  ans=sum;
  dfs(0,sum,0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'sum' was not declared in this scope
   24 |     sum+=d%10;
      |     ^~~
a.cc:28:7: error: 'sum' was not declared in this scope
   28 |   ans=sum;
      |       ^~~
Language: C++

#include <stdio.h>
#include <string>
#include <bits/stdc++.h>
using namespace std;

int sum(string S) {
  int a,b;
  a = S.size();
  if (a >= 2){
    for (int i=0; i<a-1; ++i) {
      string c = S.substr(0,i+1);
      int d;
      sscanf(c.c_str(),"%d",&d);
      b += d+sum(S.substr(i+1));
    }
  }
  else if (S == "1") {
    b = 1;
  }
  else if (S == "2") {
    b = 2;
  }
  else if (S == "3") {
    b = 3;
  }
  else if (S == "4") {
    b = 4;
  }
  else if (S == "5") {
    b = 5;
  }
  else if (S == "6") {
    b = 6;
  }
  else if (S == "7") {
    b = 7;
  }
  else if (S == "8") {
    b = 8;
  }
  else if (S == "9") {
    b = 9;
  }
  return b;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>
#include <string>
using namespace std;

int sum(string S) {
  int a,b;
  a = S.size();
  if (a >= 2){
    for (int i=0; i<a-1; ++i) {
      string c = S.substr(0,i+1);
      int d = atoi(c.c_str());
      b += d+sum(S.substr(i+1));
    }
  }
  else if (S == "1") {
    b = 1;
  }
  else if (S == "2") {
    b = 2;
  }
  else if (S == "3") {
    b = 3;
  }
  else if (S == "4") {
    b = 4;
  }
  else if (S == "5") {
    b = 5;
  }
  else if (S == "6") {
    b = 6;
  }
  else if (S == "7") {
    b = 7;
  }
  else if (S == "8") {
    b = 8;
  }
  else if (S == "9") {
    b = 9;
  }
  return b;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;

int sum(string S) {
  int a,b;
  a = S.size();
  if (a >= 2){
    for (int i=0; i<a-1; ++i) {
      string c = S.substr(0,i+1);
      int d = atoi(c.c_str());
      b += d+sum(S.substr(i+1));
    }
  }
  else if (S == "1") {
    b = 1;
  }
  else if (S == "2") {
    b = 2;
  }
  else if (S == "3") {
    b = 3;
  }
  else if (S == "4") {
    b = 4;
  }
  else if (S == "5") {
    b = 5;
  }
  else if (S == "6") {
    b = 6;
  }
  else if (S == "7") {
    b = 7;
  }
  else if (S == "8") {
    b = 8;
  }
  else if (S == "9") {
    b = 9;
  }
  return b;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;


int main(){
    string s;
    cin >> s;
    int n = s.size();
    long long ans = 0;
    for(int bit = 0; i < (1 << n-1); bit++){
        int l = 0;
        for(int r = 0; r < n; r++){
            if(r == n-1){
                ans += stoll(s.substr(l, r-l+1));
            }
            else if(bit & (1 << r)){
                ans += stoll(s.substr(l, r-l+1));
                l = r+1;
            }
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: 'i' was not declared in this scope
   10 |     for(int bit = 0; i < (1 << n-1); bit++){
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

string s;
 
long long bt(int x, long long sum) {
	if (x == s.size())
		return sum;
	long long ret = 0;
	for (int i = x + 1; i <= s.size(); i++)
		ret += bt(i, stoll(s.substr(x, i - x)) + sum);
	return ret;
}
 
 
int main() {
	cin >> s;
	cout << bt(0, 0) << "\n;
	return 0;
}

Compiler output:
a.cc:18:29: warning: missing terminating " character
   18 |         cout << bt(0, 0) << "\n;
      |                             ^
a.cc:18:29: error: missing terminating " character
   18 |         cout << bt(0, 0) << "\n;
      |                             ^~~~
a.cc: In function 'int main()':
a.cc:19:9: error: expected primary-expression before 'return'
   19 |         return 0;
      |         ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
typedef long long ll;


int main(){
    char s[12345];
    scanf("%s", s);
    int len = strlen(s);
    ll ans = 0;
    // 2^(len-1) 回す
    for(int t = 0; t < (1<<(len-1)); t++){
        ll num = s[0] - '0';  //先頭の文字を数字に変換
        for(int i=0;i<len-1;i++){
            // i bit目が立ってた時+が入る
            // 立っていなかったら10倍して次の数字が加えられる
            if( t & (1 << i)){
                ans += num;
                num = 0;
            }
            num = num * 10 + s[i+1] - '0';
        }
        ans += num;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'strlen' was not declared in this scope
   11 |     int len = strlen(s);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cstdio>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

s = ""

def rec(i, word):
    if i == len(s):
        return eval("".join(word))
    ans = 0
    word.append('+')
    word.append(s[i])
    ans += rec(i+1, word)
    word.pop()
    word.pop()
    word.append(s[i])
    ans += rec(i+1, word)
    word.pop()
    return ans

def main():
    global s
    s = input()
    print(rec(1, [s[0]]))

if __name__ == '__main__':
    main()

Compiler output:
a.cc:22:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   22 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 's' does not name a type
    1 | s = ""
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  string ST; cin >> ST;
  vector<int> S;
  int n = ST.sinze();
  long long ans;
  
  for(int i=0; i<n; i++){
    S[i]= ST[i] - '0';
  }
  
  for(int bit=0; bit < (1 << n-1) ; bit++){
    int jud = S[0];
    for(int i=0; i<n-1; i++){
      if(bit & (1 << i)){
        ans += jud;
        jud = S[i+1];
      }
      
      else {
				jud = jud * 10 + S[i + 1];
      }
    }
  }
  ans += jud;
  cout << ans << endl;
}
      
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sinze'; did you mean 'size'?
    7 |   int n = ST.sinze();
      |              ^~~~~
      |              size
a.cc:27:10: error: 'jud' was not declared in this scope
   27 |   ans += jud;
      |          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int search(int s){
  int count=0;
  while (s!=0){
    count++;
    s /= 10;
  }
  return count;
}

int mult(int i,int s){
  int count=search(s),x=1;
  int ans=i*pow(10,count);
  if (count>1){
    for (int j=1;j<=pow(2,count-1);j*2){
      ans += i*pow(10,count-x);
      x--;
    }
  }
  return ans;
}

//iは最上位数
int sum(int i,int s){
  int count = search(s);
  if (i==0){
    return s;
  }
  
  int result =0;
  if (count==1){
    return i*pow(2,count) + mult(i,s) +2*sum(0,s);
  }
  else{
    return i*pow(2,count) + mult(i,s) +2*sum(s/pow(10,count-1),s%pow(10,count-1));
  }
}

int main(){
  int num,count;
  cin>>num;
  count=search(num);
  int i=num/pow(10,count),s=num%pow(10,count);
  cout<<sum(i,s)<<endl;
}

Compiler output:
a.cc: In function 'int sum(int, int)':
a.cc:37:65: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   37 |     return i*pow(2,count) + mult(i,s) +2*sum(s/pow(10,count-1),s%pow(10,count-1));
      |                                                                ~^~~~~~~~~~~~~~~~
      |                                                                |    |
      |                                                                int  __gnu_cxx::__promote<double>::__type {aka double}
a.cc: In function 'int main()':
a.cc:45:32: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   45 |   int i=num/pow(10,count),s=num%pow(10,count);
      |                             ~~~^~~~~~~~~~~~~~
      |                             |      |
      |                             int    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;
 
int main(void){
    string S;
  	string adding_S;
    cin >> S;
  
    int size = S.length();
    int i,j;
    int sum;
  	
    for(i=0;i<size;i++){
        sum = sum + int(S[i]-'0');
        adding_S = adding_S + S[i];
       if(i==0) sum = sum + int(adding_S - '0');
       else	sum = sum + stoi(adding_S);
        for(j=i+1;j<size;j++){
            sum = sum + int(S[j]-'0');
        }
    }
  
    cout << sum << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:42: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   18 |        if(i==0) sum = sum + int(adding_S - '0');
      |                                 ~~~~~~~~ ^ ~~~
      |                                 |          |
      |                                 |          char
      |                                 std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:18:44: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   18 |        if(i==0) sum = sum + int(adding_S - '0');
      |                                            ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:18:44: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   18 |        if(i==0) sum = sum + int(adding_S - '0');
      |                                            ^~~
Language: C++

#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;
 
int main(void){
    string S;
  	string adding_S;
    cin >> S;
  
    int size = S.length();
    int i,j;
    int sum;
  	
    for(i=0;i<size;i++){
        sum = sum + int(S[i]-'0');
        adding_S = adding_S + c;
        sum = sum + stoi(adding_S);
        for(j=i+1;j<size;j++){
            sum = sum + int(S[j]-'0');
        }
    }
  
    cout << sum << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'c' was not declared in this scope
   17 |         adding_S = adding_S + c;
      |                               ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
 
int main(void){
    string S;
  	string adding_S;
    cin >> S;
  
    int size = S.length();
    int i,j;
    int sum;
  
    for(i=0;i<size;i++){
        sum = sum + atoi(S[i].c_str());  
        adding_S = adding_S + S[i];  
        sum = sum + atoi(adding_S.c_str());
        for(j=i+1;j<size;j++){
            sum = sum + atoi(S[j].c_str());
        }
    }
  
    cout << sum << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: request for member 'c_str' in 'S.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   15 |         sum = sum + atoi(S[i].c_str());
      |                               ^~~~~
a.cc:19:35: error: request for member 'c_str' in 'S.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)j))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   19 |             sum = sum + atoi(S[j].c_str());
      |                                   ^~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
 
int main(void){
    string S;
  	string adding_S;
    cin >> S;
  
    int size = S.length();
    int i,j;
    int sum;
  
    for(i=0;i<size;i++){
        sum = sum + atoi(S[i]);  
        adding_S = adding_S + S[i];  
        sum = sum + atoi(adding_S);
        for(j=i+1;j<size;j++){
            sum = sum + atoi(S[j]);
        }
    }
  
    cout << sum << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   15 |         sum = sum + atoi(S[i]);
      |                     ~~~~^~~~~~
      |                         |
      |                         __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:17:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   17 |         sum = sum + atoi(adding_S);
      |                          ^~~~~~~~
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:19:29: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   19 |             sum = sum + atoi(S[j]);
      |                         ~~~~^~~~~~
      |                             |
      |                             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(void){
    string S;
  	string adding_S;
    cin >> S;
  
    int size = S.length;
    int i,j;
    int sum;
  
    for(i=0;i<size;i++){
        sum = sum + atoi(S[i]);  
        adding_S = adding_S + S[i];  
        sum = sum + atoi(adding_S);
        for(j=i+1;j<size;j++){
            sum = sum + atoi(S[j]);
        }
    }
  
    cout << sum << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
   10 |     int size = S.length;
      |                  ^~~~~~
a.cc:15:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   15 |         sum = sum + atoi(S[i]);
      |                     ~~~~^~~~~~
      |                         |
      |                         __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:17:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   17 |         sum = sum + atoi(adding_S);
      |                          ^~~~~~~~
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:19:29: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   19 |             sum = sum + atoi(S[j]);
      |                         ~~~~^~~~~~
      |                             |
      |                             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>
#include <cmath>

using namespace std;

void ARC060C()
{
	int N, A;
	cin >> N >> A;
	vector<int> vals(N);
	for (auto& x : vals)
	{
		cin >> x;
	}

	vector<vector<vector<long long> > > dp(N + 1, vector<vector<long long> >(N + 1, vector<long long>(2501)));
	dp[1][1][vals.front()] = 1;
	for (int i = 1; i < N; ++i)
	{
		dp[i][0][0] = 1;
		for (int j = 1; j <= i + 1; ++j)
		{
			for (int k = 1; k <= 2500; ++k)
			{
				int res = k - vals[i];
				dp[i + 1][j][k] = dp[i][j][k];
				if(res >= 0 && res < 2501)
					dp[i+1][j][k] += dp[i][j - 1][res];
			}
		}

	}
	long long sum = 0;
	for (int i = 1; i <= N; ++i)
	{
		sum += dp[N][i][A*i];
	}
	cout << sum << endl;
}

int main()
{
	ARC061C();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:9: error: 'ARC061C' was not declared in this scope; did you mean 'ARC060C'?
   52 |         ARC061C();
      |         ^~~~~~~
      |         ARC060C
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin>>S;
  if(S.size()==1){
    int n = stoi(S);
    cout<<n;
  }
  else{
  vector<string> op; 
  op = {"","+"}; 
  vector<string> score(pow(2,S.size()-1));
  
  for(int i;i<S.size();i++){
    for(int j=0;j<2;j++){
      if(i<S.size()-1){
    score.at()+=S.at(i)+op.at(j);
      }
      else{
        score.at()+=S.at(i);
      }
    }
  }
    
    
    
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::at()'
   19 |     score.at()+=S.at(i)+op.at(j);
      |     ~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; const_reference = const std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note:   candidate expects 1 argument, 0 provided
a.cc:22:17: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::at()'
   22 |         score.at()+=S.at(i);
      |         ~~~~~~~~^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; const_reference = const std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin>>S;
  if(S.size()==1){
    int n = stoi(S);
    cout<<n;
  }
  else{
  vector<string> op; 
  op = {"","+"}; 
  vector<string> score();
  
  for(int i;i<S.size();i++){
    for(int j=0;j<2;j++){
      if(i<S.size-1){
    score+=S.at(i)+op.at(j);
      }
      else{
        score+=S.at(i);
      }
    }
  }
    
    
    
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   14 |   vector<string> score();
      |                       ^~
a.cc:14:23: note: remove parentheses to default-initialize a variable
   14 |   vector<string> score();
      |                       ^~
      |                       --
a.cc:18:14: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |       if(i<S.size-1){
      |            ~~^~~~
      |                  ()
a.cc:19:10: error: no match for 'operator+=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >()' and 'std::__cxx11::basic_string<char>')
   19 |     score+=S.at(i)+op.at(j);
      |     ~~~~~^~~~~~~~~~~~~~~~~~
a.cc:22:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |         score+=S.at(i);
      |         ~~~~~^~~~~~~~~
a.cc:22:14: error: assignment of read-only location 'score'
Language: C++

s = input()
l = len(s)

ans = 0

for mask in range(2 ** (l-1)):
    f = s
    last_plus = 0
    for bit in range(l-1):
        if (mask >> bit) & 1:
            ans += int(s[last_plus: bit+1])
            last_plus = bit + 1

    ans += int(s[last_plus:])

print(ans)


Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int kotae(int a){
  if(a/10==0){
    return a;
  }
  int t=0;
   for(int i<=10;i<a;i=i*10){
    t=t+kotae(a/i)+a%i*std::pow(2,log10(a/i));
   }
  return a+t;
}

int main() {
  int suuzi;
   cin >>suuzi;
   cout<<kotae(suuzi)<<endl;
}

Compiler output:
a.cc: In function 'int kotae(int)':
a.cc:9:13: error: expected ';' before '<=' token
    9 |    for(int i<=10;i<a;i=i*10){
      |             ^~
      |             ;
a.cc:9:13: error: expected primary-expression before '<=' token
    9 |    for(int i<=10;i<a;i=i*10){
      |             ^~
a.cc:9:21: error: expected ')' before ';' token
    9 |    for(int i<=10;i<a;i=i*10){
      |       ~             ^
      |                     )
a.cc:9:22: error: 'i' was not declared in this scope
    9 |    for(int i<=10;i<a;i=i*10){
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int dfs(int sum, int r, string s, int dp){
  if(dp=s.size()){
    return sum + r;
  }
  else{
    int a = dfs(sum + r, s(dp)-'0', s, dp+1);//'+'in
    int b = dfs(sum, r*10+s(dp)-'0',s,dp+1);//not'+'in
    return a+b;
  }
}

int main(){
  string s;
  cin >> s;
  cout << dfs(0,s[0]-'0',s,0) << endl;
}

Compiler output:
a.cc: In function 'int dfs(int, int, std::string, int)':
a.cc:9:27: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
    9 |     int a = dfs(sum + r, s(dp)-'0', s, dp+1);//'+'in
      |                          ~^~~~
a.cc:10:28: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   10 |     int b = dfs(sum, r*10+s(dp)-'0',s,dp+1);//not'+'in
      |                           ~^~~~
Language: C++

#include <iostream>
#include <vector>
#include <array>
#include <unordered_map>
#include <unordered_set>
 
using namespace std;
 
int main (int argc, char* argv[]) {
	string s;
	cin >> s;

	vector<long long> dp(s.size());

	for (int i = 0; i < s.size(); i++) {
		long long total = 0;
		long long current = 0;
		long long power = 1;
		for (int j = i; j >= 0; j--) {
			current = current + (s[j] - '0') * power;
			power *= 10;
			long long prev_res = (j == 0 ? 0 : dp[j - 1]);
			total += prev_res + (current * pow(2, j == 0 ? 0 : j - 1));
		}
		dp[i] = total;
	}

	cout << dp.back() << endl;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:23:56: error: 'pow' was not declared in this scope; did you mean 'power'?
   23 |                         total += prev_res + (current * pow(2, j == 0 ? 0 : j - 1));
      |                                                        ^~~
      |                                                        power
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
 string S;
 cin >> S;
  //文字列1+23+4を計算する
 S.push_back('+');
  string l;
  int sum = 0;
  for(int i=0;i<S.size();i++){
    if(S[i] != '+'){
      l.push_back(S[i]);
    }
    else {
      sum += stoi(l);
      l = " ";
  }
  }
for(int bit = 0;bit< (1<<S.size()-1);bit++){
  for (int i = 0; i < S.size()-1; ++i) {
　　　if (bit & (1<<i)) { // i が bit に入るかどうか
　　　　　S.insert(i+1,'+');
}

Compiler output:
a.cc:22:1: error: extended character 　 is not valid in an identifier
   22 | 　　　if (bit & (1<<i)) { // i が bit に入るかどうか
      | ^
a.cc:22:1: error: extended character 　 is not valid in an identifier
a.cc:22:1: error: extended character 　 is not valid in an identifier
a.cc:23:1: error: extended character 　 is not valid in an identifier
   23 | 　　　　　S.insert(i+1,'+');
      | ^
a.cc:23:1: error: extended character 　 is not valid in an identifier
a.cc:23:1: error: extended character 　 is not valid in an identifier
a.cc:23:1: error: extended character 　 is not valid in an identifier
a.cc:23:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:22:1: error: '\U00003000\U00003000\U00003000if' was not declared in this scope
   22 | 　　　if (bit & (1<<i)) { // i が bit に入るかどうか
      | ^~~~~~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:21:40: note: to match this '{'
   21 |   for (int i = 0; i < S.size()-1; ++i) {
      |                                        ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:20:44: note: to match this '{'
   20 | for(int bit = 0;bit< (1<<S.size()-1);bit++){
      |                                            ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
typedef long long ll; 
 
int main(void){
	
	string S;
	
	cin >> S;
	
	int len = S.length();
	ll ans = 0;
	
	for(int i=0; i<(1 << (len - 1)); i++){
		ll res = 0, last = 0;
		for(int j=0; j<len; j++){
			last = 10 * last + (s[j] - '0');
			if(i & (1 << j)){
				res += last;
				last = 0;
			}
		}
		ans += res + last;
	}
	
	cout << ans;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:45: error: 's' was not declared in this scope
   20 |                         last = 10 * last + (s[j] - '0');
      |                                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1<<30;
string s;int n;
ll calc(int a, int b){
  ll tmp=0;
  while(a!=b){
  	tmp =  tmp*(ll)10+ll(s[a]-'0');
    a++;
  }
  return tmp;
}

int main(){
  cin>>s;
  n=(int)s.size();
  ll ans=0;
  for(int i=0;i<(1<<n-1);i++){
    ll res=0;
    int last_j=0;
  	for(int j=0;j<n-1;j++){
      int start=0;
      if((i>>j)&1)!=0){
        res+=calc(start, j+1);
        start=j+1;
        last_j=j;
      }
    }
    res+=calc(last_j, n);
    ans+=res;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: expected primary-expression before '!=' token
   24 |       if((i>>j)&1)!=0){
      |                   ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
long i,j,k,N,ans=0,pow[12],x;
char ss[20];
scanf("%s",ss);
N=strlen(ss);
pow[0]=1;
for(i=1;i<10;i++)pow[i]=pow[i-1]*2;
pow[10]=1;pow[11]=1;
for(i=1,i<=N;i++){
for(j=0,j<=N-i;j++){
x=0;
for(k=0;k<i;k++){
x*=10;
x+=ss[j+k];
}
if(j==0||j==N-i){
ans+=x*pow[(N-i+10)%11];
}else{
ans+=x*pow[(N-i+10)%12];
}
}
}
cout <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before ')' token
   12 | for(i=1,i<=N;i++){
      |                 ^
      |                 ;
a.cc:13:19: error: expected ';' before ')' token
   13 | for(j=0,j<=N-i;j++){
      |                   ^
      |                   ;