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

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

int main() {
  int n, a, b;
  int count = 0;
  cin >> n >> a >> b;
  
  for (int i = 1; i <= n; i++) {
    int c = i;
    int res = 0;
    while (c > 0) {
      res += c % 10
      c /= 10;
    }
    if (a <= res && res <= b) {
      count += res;
    }
  }

  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before 'c'
   14 |       res += c % 10
      |                    ^
      |                    ;
   15 |       c /= 10;
      |       ~
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		int count = 0;

		for (int i = 0; i <= N; i++) {
			int sum = 0;
			String I = String.valueOf(i);
			for (int j = 0; j < I.length(); j++) {
				sum += Integer.parseInt(i.substring(j, j + 1));
			}
			if (sum >= A && sum <= B) {
				count++;
			}
		}

		System.out.println(count);
	}
}

Compiler output:
Main.java:15: error: int cannot be dereferenced
				sum += Integer.parseInt(i.substring(j, j + 1));
				                         ^
1 error
Language: C

#include <stdio.h>

int sum(int t){
  int res=0;
  
  while(t!=0){
    res += t%10;
    t /= 10;
  }
  return res;
}

int main(){
  int n,a,b,
      i,
      sum,res=0;
  
  scanf("%d%d%d", &n, &a, &b);
  
  for(i=1;i<=n;i++){
    sum = sum(i);
    if((a <= sum) && (sum <= b)){
      res += i;
    }
  }
  
  printf("%d", res);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:11: error: called object 'sum' is not a function or function pointer
   21 |     sum = sum(i);
      |           ^~~
main.c:16:7: note: declared here
   16 |       sum,res=0;
      |       ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int func(int x){
  int sum=0;
  whlile(x>0){
    sum+=x%10;
    x/=10;
  }
  return sum;
}
int main(){
  int n,a,b; cin>>n>>a>>b;int sum=0;
  for(int i=1;i<=n;i++){
  
    if(a<=func(i)&&func(i)<=b)sum+=i;
  }
  cout <<sum<<endl;
}

Compiler output:
a.cc: In function 'int func(int)':
a.cc:14:3: error: 'whlile' was not declared in this scope
   14 |   whlile(x>0){
      |   ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int func(int x){
  int sum=0;
  whlile(x>0){
    sum+=x%10;
    x/=10;
  }
  return sum;
}
int main(){
  int n,a,b; cin>>n>>a>>b;
  for(int i=1;i<=n;i++){
  int sum=0;
    if(a<=func(i)&&func(i)<=b)sum+=i;
  }
  cout <<sum<<endl;
}

Compiler output:
a.cc: In function 'int func(int)':
a.cc:14:3: error: 'whlile' was not declared in this scope
   14 |   whlile(x>0){
      |   ^~~~~~
a.cc: In function 'int main()':
a.cc:26:10: error: 'sum' was not declared in this scope
   26 |   cout <<sum<<endl;
      |          ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <numeric>
#include <stdio.h>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <iterator>
#include <map>

using namespace std;

#define Int int64_t

void printVec(std::vector<int>& vec) {
	std::cout << "";
	for (auto it = vec.begin(); it != vec.end(); ++it) {
		std::cout << *it << " ";
	}
	std::cout << std::endl;
}
void printVec1(std::vector<string>& vec) {
	std::cout << "";
	for (auto it = vec.begin(); it != vec.end(); ++it) {
		std::cout << *it << " ";
	}
	std::cout << std::endl;
}

template<typename T>
void remove(std::vector<T>& vector, unsigned int index)
{
	vector.erase(vector.begin() + index);
}




int main() {
	int n, a, b; cin >> n >> a >> b;
	int num;

	int sum,total=0;
	for (int i = 1; i <= n; i++) {
		sum = 0;
		num = i;
		for (int j = 0; j < 5; j++) {
			sum += nuam % 10;
			num = num / 10;
		}
		//cout << sum << endl;
		if (sum >= a && sum <= b) total += i;
	}

	cout << total << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:32: error: 'nuam' was not declared in this scope; did you mean 'num'?
   51 |                         sum += nuam % 10;
      |                                ^~~~
      |                                num
Language: C++

#include <stdio.h>

int main(void) {
 while(1) {
 int n,a,b,x = ans = 0;
 scanf("%d %d %d",n,a,b);
  while (a > 0) {
   for (int t = a; t < 9; ++t) {
   if (x / 10 + t >= n) {ans += x + t;}
   }
  x += 10;
  if (a > 0) {a--;}
  if (x / 10 - b <= 0) {b--;}
  }
 printf("%d\n",ans);

 }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'ans' was not declared in this scope
    5 |  int n,a,b,x = ans = 0;
      |                ^~~
Language: C

#include <stdio.h>

int main(){
  int n,a,b;
  scanf("%d %d %d",&n,&a,&b);
  
  int sum;
  
  int i,j;
  int tmp;
  int tmpsum;
  int ntmp
  for(i=1;i<=n;i++){
    tmp = 0;
    tmpsum = 0;
    ntmp = i;
    for(j=4;j>=0;j++){
      tmp = ntmp/(10^j);
      ntmp = ntmp - tmp*(10^j);
      tmpsum = tmpsum + tmp;
    }
    if(a<=tmpsum && tmpsum<=b)sum+=i;
  }
  print("%d",sum);
  return 0;
}
      

Compiler output:
main.c: In function 'main':
main.c:13:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
   13 |   for(i=1;i<=n;i++){
      |   ^~~
main.c:16:5: error: 'ntmp' undeclared (first use in this function); did you mean 'tmp'?
   16 |     ntmp = i;
      |     ^~~~
      |     tmp
main.c:16:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   24 |   print("%d",sum);
      |   ^~~~~
      |   printf
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<vector>
#include<numeric>

int main01()
{
    string str;
    long long int count=0;
    cin>>str;
    int a,b;
    cin>>a>>b;
    int allSum=0;
    for(int i=0;i<str.length();i++)
    {
        if(str[i]>=48 && str[i]<=57)
            count = count + (int)str[i] - 48;
    }

    if(a < count  && count < b)
      allSum +=count;

    cout<<allSum;
    return 0;
}




Compiler output:
a.cc: In function 'int main01()':
a.cc:9:5: error: 'string' was not declared in this scope
    9 |     string str;
      |     ^~~~~~
a.cc:9:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:11:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |     cin>>str;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:10: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |     cin>>str;
      |          ^~~
      |          std
a.cc:24:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |     cout<<allSum;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
  int N,A,B;
  cin >> N >>A >>B;
  int p,count;
  p=0;
  count=0;
  for(int i=1;i<=N;i++){
    int j;
    j=i
    while(i>0){
      p+=i%10;
      i/=10;
    }
    if(p>=A && p<=B){
      count+=j;
    }
  }
  cout << count <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected ';' before 'while'
   12 |     j=i
      |        ^
      |        ;
   13 |     while(i>0){
      |     ~~~~~
Language: C++

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

int main() {
  int N,A,B;
  cin >> N >>A >>B;
  int p,count;
  p=0;
  count=0;
  for(int i=1;i<=N;i++){
    while(i>0){
      p+=i%10;
      n/=10;
    }
    if(p>=A && p<=B){
      count+=i;
    }
  }
  cout << count <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'n' was not declared in this scope
   13 |       n/=10;
      |       ^
Language: C

#include <stdio.h>

int sum(int n){
  int sum=0;
  while(n!=0){
    sum+=n%10;
    n = n/10;
  }
  return sum;
}

int main(){
  int n,a,b;
  scanf("%d%d%d",&n,&a,&b);
  int i,sum=0,tmp;
  for(i=0;i<=n;i++){
    tmp = sum(i);
    if(a<=tmp&&tmp<=b)sum+=tmp;
  }
  printf("%d\n",sum);
  return 0;
}
  
  
    

Compiler output:
main.c: In function 'main':
main.c:17:11: error: called object 'sum' is not a function or function pointer
   17 |     tmp = sum(i);
      |           ^~~
main.c:15:9: note: declared here
   15 |   int i,sum=0,tmp;
      |         ^~~
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int g = 0;
        int k = 0;
        for (int n=1; n<=N; n++) {
            for (int num=n; num<=0; num -= 10000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num -= 1000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num -= 100) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num -= 10) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num=0; num -= 1) {
                if (num=0)
                    k++;
            }
            if (k>=A && k<=B){
                g += 1;
            }
        }
        System.out.println(g);
    }
}


Compiler output:
Main.java:27: error: incompatible types: int cannot be converted to boolean
            for (int num=n; num=0; num -= 1) {
                               ^
Main.java:28: error: incompatible types: int cannot be converted to boolean
                if (num=0)
                       ^
2 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int g = 0;
        for (int n=1; n<=N; n++) {
            for (int num=n; num<=0; num -= 10000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num -= 1000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num -= 100) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num -= 10) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num=0; num -= 1) {
                if (num=0)
                    k++;
            }
            if (k>=A && k<=B){
                g += 1;
            }
        }
        System.out.println(g);
    }
}


Compiler output:
Main.java:12: error: cannot find symbol
                    k++;
                    ^
  symbol:   variable k
  location: class Main
Main.java:16: error: cannot find symbol
                    k++;
                    ^
  symbol:   variable k
  location: class Main
Main.java:20: error: cannot find symbol
                    k++;
                    ^
  symbol:   variable k
  location: class Main
Main.java:24: error: cannot find symbol
                    k++;
                    ^
  symbol:   variable k
  location: class Main
Main.java:26: error: incompatible types: int cannot be converted to boolean
            for (int num=n; num=0; num -= 1) {
                               ^
Main.java:27: error: incompatible types: int cannot be converted to boolean
                if (num=0)
                       ^
Main.java:28: error: cannot find symbol
                    k++;
                    ^
  symbol:   variable k
  location: class Main
Main.java:30: error: cannot find symbol
            if (k>=A && k<=B){
                ^
  symbol:   variable k
  location: class Main
Main.java:30: error: cannot find symbol
            if (k>=A && k<=B){
                        ^
  symbol:   variable k
  location: class Main
9 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int g = 0;
        for (int n=1; n<=N; n++) {
            for (int num=n; num<=0; num - 10000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num - 1000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num - 100) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num - 10) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num=0; num - 1) {
                if (num=0)
                    k++;
            }
            if (k>=A && k<=B){
                g + 1;
            }
        }
        System.out.println(g);
    }
}


Compiler output:
Main.java:10: error: not a statement
            for (int num=n; num<=0; num - 10000) {
                                        ^
Main.java:14: error: not a statement
            for (int num=n; num<=0; num - 1000) {
                                        ^
Main.java:18: error: not a statement
            for (int num=n; num<=0; num - 100) {
                                        ^
Main.java:22: error: not a statement
            for (int num=n; num<=0; num - 10) {
                                        ^
Main.java:26: error: not a statement
            for (int num=n; num=0; num - 1) {
                                       ^
Main.java:31: error: not a statement
                g + 1;
                  ^
6 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int g = 0;
        for (int n=1; n<=N; n++) {
            for (int num=n; num<=0; num-10000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num-1000) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num-100) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num<=0; num-10) {
                if (num>=0)
                    k++;
            }
            for (int num=n; num=0; num-1) {
                if (num=0)
                    k++;
            }
            if (k>=A && k<=B){
                g+1
            }
        }
        System.out.println(g);
    }
}


Compiler output:
Main.java:10: error: not a statement
            for (int num=n; num<=0; num-10000) {
                                       ^
Main.java:14: error: not a statement
            for (int num=n; num<=0; num-1000) {
                                       ^
Main.java:18: error: not a statement
            for (int num=n; num<=0; num-100) {
                                       ^
Main.java:22: error: not a statement
            for (int num=n; num<=0; num-10) {
                                       ^
Main.java:26: error: not a statement
            for (int num=n; num=0; num-1) {
                                      ^
Main.java:31: error: not a statement
                g+1
                 ^
Main.java:31: error: ';' expected
                g+1
                   ^
7 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int sumfind(int n){
  int sum=0;
  while(n>0){
    sum += n%10;
    n/=10;
  }
  return sum;
}

int main(){
  int n,a,b;
  cin>>n>>a>>b;
  int total=0;
  for(int i=0;i<n;i++){
    int sum=sumfind(i);
    if(sum>=a&&sum<=b){
      total+++
    }
  }
  cout<<total<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: expected primary-expression before '}' token
   20 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
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;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
int dp[10][10][10][10];

int main() {
    int N, A, B;
    cin >> N >> A >> B;
    long long ans = 0;
    int last = min(B + 1, 10);
    REP(i, N) {
        int c = 0;
        int t = i;
        REP(j, 5) {
            c += t % 10;
            t /= 10;
        }
        if(a <= c and c <= b) {
            ans += i;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:12: error: 'a' was not declared in this scope
   45 |         if(a <= c and c <= b) {
      |            ^
a.cc:45:28: error: 'b' was not declared in this scope
   45 |         if(a <= c and c <= b) {
      |                            ^
Language: C++

#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int wa(int n){
  int a = log10(n);
  int tmp = 0;
  for(int i = 1; i <= a; i++){
    tmp += n % 10;
    n /= 10;
  }
  tmp +=n;
  return tmp;
}

int main(){
  int N, A, B;
  cin >> N >> A >> B;
  int cnt = 0;
  for(int i = 1; i <= N; i++){
    int w = wa(i);
    if(w >= A && w <= B) tmp += i;
  }
  cout << cnt;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   24 |     if(w >= A && w <= B) tmp += i;
      |                          ^~~
      |                          tm
Language: C

#include<stdio.h>
int main(void){
  int n,a,b,i;
  scanf("%d%d%d",&n,&a,&b);
  int sum=0;
  int j=0;
  int cnt=0;

  for(i=1;i<=n;i++){
    j=i;
    for(int k=0;k<5,++k){
      sum+=(j%10);
      j=j/10;
      printf("sum=%d i=%d j=%d  ",sum,i,j);
    }
    if((sum>=a)&&(sum<=b)){
      cnt+=i;
    }
    sum=0;
  }
  printf("%d",cnt);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:24: error: expected ';' before ')' token
   11 |     for(int k=0;k<5,++k){
      |                        ^
      |                        ;
Language: Java

import java.util.Scanner;

public class ABC083B {

	public static void main(String[] args) {
		 Scanner scan = new Scanner(System.in);
		 int N = scan.nextInt();
		 int A = scan.nextInt();
		 int B = scan.nextInt();
		 
		 int sum = 0;
		 for (int i = 1; i <= N; i++) {
			 int keta = Integer.toString(i).length();
			 
			 int wk = i,sum_digit = 0;
			 for (int j = keta; j > 0; j--) {
				 sum_digit += wk / (Math.pow(10,j-1));
				 wk = wk % (10 ^ (wk-1));
			 }
			 
			 if (sum_digit >= A && sum_digit <= B) {
				 sum += i;
			 }
		 }
		 
		 System.out.println(sum);
		 
		 scan.close();

	}

}


Compiler output:
Main.java:3: error: class ABC083B is public, should be declared in a file named ABC083B.java
public class ABC083B {
       ^
1 error
Language: C++

#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.00000001
#define LONG_INF 3000000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define MOD 998244353
#define REP(i,n) for(long long i = 0;i < n;++i)    
#define seg_size 524288
double dot(complex<double> a, complex<double> b) {
	return a.real() * b.real() + a.imag() * b.imag();
}
double gyaku_dot(complex<double> a, complex<double> b) {
	return a.real() * b.imag() - a.imag() * b.real();
}
double leng(complex<double> a) {
	return sqrt(a.real() * a.real() + a.imag() * a.imag());
}
double angles(complex<double> a, complex<double> b) {
	double cosine = dot(a, b) / (leng(a) * leng(b));
	double sine = gyaku_dot(a, b) / (leng(a) * leng(b));
	double kaku = acos(cosine);
	if (sine <= 0) {
		kaku = 2 * Ma_PI - kaku;
	}
	return kaku;
}
vector<int> convex_hull(vector<complex<double>> a) {
	vector<int> ans;
	double now_minnest = a[0].real();
	int now_itr = 0;
	REP(i, a.size()) {
		if (now_minnest > a[i].real()) {
			now_minnest = a[i].real();
			now_itr = i;
		}
	}
	ans.push_back(now_itr);
	complex<double> ba(0, 1);
	while (true) {
		int now_go = 0;
		double now_min = 0;
		int starter = ans[ans.size() - 1];
		for (int i = 0; i < a.size(); ++i) {
			if (i != starter) {
				double goa = angles(ba, a[i] - a[starter]);
				if (goa > now_min) {
					now_min = goa;
					now_go = i;
				}
			}
		}
		if (now_go == ans[0]) break;
		ans.push_back(now_go);
		ba = complex<double>(a[now_go] - a[starter]);
	}
	return ans;
}
long long gcd(long long a, long long b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
int main() {
	int n;
	cin >> n;
	int a, b;
	cin >> a >> b;
	int ans = 0;
	for (int i = 1; i <= n; ++i) {
		int now = i;
		int tmp = 0;
		while (now != 0) {
			tmp += now % 10;
			now /= 10;
		}
		if (a <= tmp && tmp <= b)ans += i;
	}
	cout << ans < < endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:107:23: error: expected primary-expression before '<' token
  107 |         cout << ans < < endl;
      |                       ^
Language: C++

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

int main() {
  int N,A,B;
  cin >> N >> A >> B;
  int sum=0;
  for(int i=1;i<N+1){
    int su=N%10+(N/10)%10+(N/100)%10+(N/1000)%10+(N/10000)%10+(N/100000)%10;
    if(su>=A && su<=B)sum++;
  }
  cout << sum;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before ')' token
    8 |   for(int i=1;i<N+1){
      |                    ^
      |                    ;
Language: Java

public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();

        int result = 0;

        for(int i = 1 ; i <= n; i++){
            int sum = findSumOfDigits(i);
            if(sum >= a && sum <= b){
                result += i;
            }
        }

        System.out.println(result);
    }

    public static int findSumOfDigits(int n){
        int sum = 0;
        while (n > 0){
            sum += n % 10;
            n /= 10;
        }
        return sum;
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b;
  cin >> n >> a >> b;
  int sum=0;
  int num;
  for(int i=1;i<n;i++){
    num=0;
    for(int j=0;j<4;j++){
      num += i % pow(10,j) / pow(10,j);
    }
    if(a <= num && num <= b){
      sum++;
    }
  }
  cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   11 |       num += i % pow(10,j) / pow(10,j);
      |              ~ ^ ~~~~~~~~~
      |              |      |
      |              int    __gnu_cxx::__promote<double>::__type {aka double}
Language: C

#include<stdio.h>
int main(){
  int A,B,N,sum1=0,sum2=0;
  int k;
  scanf("%d %d %d",&N,&A,&B);
  for(int i=1;i<=N;i++){
    k=i;
    for(int j=10000;j>1;j=j/10){
      sum+=k/j;
      k=k%j;
    }
    if(sum1>=A&&B>=1sum)
      sum2+=i;
  }
  printf("%d",sum2);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'sum' undeclared (first use in this function); did you mean 'sum2'?
    9 |       sum+=k/j;
      |       ^~~
      |       sum2
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:20: error: invalid suffix "sum" on integer constant
   12 |     if(sum1>=A&&B>=1sum)
      |                    ^~~~
Language: C++

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

int main() {
  int N, A, B;
  cin >> N >> A >> B;
  
  int ans = 0;
  for (int i = 0; i < N; i++) {
    int t = i;
    for (int j = 0; j < 5; j++) {
      tmp += t%10;
      t /= 10;
    }
    if (tmp>=A && tmp<=B) ans += i;
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   12 |       tmp += t%10;
      |       ^~~
      |       tm
a.cc:15:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   15 |     if (tmp>=A && tmp<=B) ans += i;
      |         ^~~
      |         tm
Language: C++

#include<iostream>

using namespace std;

int main(){
  int n,a,b; //1<=a<=b<=36
  int i,r,c;
  
  cin>>n>>a>>b;
  
  for(i=1;i<=n;i++){
    r=0;
    c=i;
    while(c!=0){
  	  r+=c%10;
      c/=10;
    }
    if(a<=r&&r<=b)
      res+=i;
  }
  cout<<res<<endl;    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'res' was not declared in this scope
   19 |       res+=i;
      |       ^~~
a.cc:21:9: error: 'res' was not declared in this scope
   21 |   cout<<res<<endl;
      |         ^~~
Language: C++

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



int main(){
	int a,b,n;
	cin>>a>>b>>n;

	int x=0;
	
	for(int i=0;i<2;i++){
		for(int j=0;j<10;j++){
			for(int k=0;k<10;k++){
				for(int l=0;l<10;l++){
					for(int m=0;m<10;m++){
						if(i+j+k+l+m>=a $$ i+j+k+l+m<=b){
							x = x + (10000*i + 1000*j + 100*k + 10*l + m);
						}
					}
				}
			}
		}
		
	}


	
	cout << x;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:64: error: expected ')' before '$$'
   17 |                                                 if(i+j+k+l+m>=a $$ i+j+k+l+m<=b){
      |                                                   ~            ^~~
      |                                                                )
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num, i, j;

	cin >> N >> low >> high;

	int N2 = N;
	int keta = 0;
	while (N2) {
		N2 = N2 / 10;
		++keta;
	}

	int ans = 0;
	for (i = 1; i < N + 1; i++) {
		num = i % 10;

		for (j = 1; j < keta; j++) {
			num += (i / pow(10, j));
		}
		if (low <= num && num <= high)
			ans += i;

	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:37: error: 'pow' was not declared in this scope; did you mean 'low'?
   26 |                         num += (i / pow(10, j));
      |                                     ^~~
      |                                     low
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num, i, j;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (i = 1; i < N + 1; i++) {
		num = i % 10;

		for (j = 1; j < keta+1; j++) {
			num += (i / pow(10, j));
		}
		if (low <= num && num <= high)
			ans += num;

	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'log10' was not declared in this scope
   14 |         int keta = int(log10(N));
      |                        ^~~~~
a.cc:21:37: error: 'pow' was not declared in this scope; did you mean 'low'?
   21 |                         num += (i / pow(10, j));
      |                                     ^~~
      |                                     low
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num = 0;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 1; j < keta+1; j++) {
				num += (i / pow(10, j));
			}
		}

		ans += num;
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'log10' was not declared in this scope
   14 |         int keta = int(log10(N));
      |                        ^~~~~
a.cc:22:45: error: 'pow' was not declared in this scope; did you mean 'low'?
   22 |                                 num += (i / pow(10, j));
      |                                             ^~~
      |                                             low
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 1; j < keta+1; j++) {
				num += (i / pow(10,j));
			}
		}

		ans += num;
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'log10' was not declared in this scope
   14 |         int keta = int(log10(N));
      |                        ^~~~~
a.cc:22:45: error: 'pow' was not declared in this scope; did you mean 'low'?
   22 |                                 num += (i / pow(10,j));
      |                                             ^~~
      |                                             low
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;
#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 1; j < keta; j++) {
				num += (i % (10 * j));
			}
		}

		ans += num;
	}

	cout << ans << endl;

	return 0;
}
int main() {
	int low, high, N, num;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 0; j < keta; j++) {
				num += (i % (10 * j));
			}
		}

		ans += num;
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'log10' was not declared in this scope
   21 |         int keta = int(log10(N));
      |                        ^~~~~
a.cc: At global scope:
a.cc:40:5: error: redefinition of 'int main()'
   40 | int main() {
      |     ^~~~
a.cc:16:5: note: 'int main()' previously defined here
   16 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:45:24: error: 'log10' was not declared in this scope
   45 |         int keta = int(log10(N));
      |                        ^~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 0; j < keta; j++) {
				num += (i % (10 * j));
			}
		}

		ans += num;
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'log10' was not declared in this scope
   14 |         int keta = int(log10(N));
      |                        ^~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num;

	cin >> N >> low >> high;

	int keta = int(log10(N));

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 0; j < keta; j++) {
				num += (i % (10 * j));
			}
		}

		ans += num;
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'log10' was not declared in this scope
   14 |         int keta = int(log10(N));
      |                        ^~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

int main() {
	int low, high, N, num;

	cin >> N >> low >> high;

	int keta = log10(N);

	int ans = 0;
	for (int i = 1; i < N + 1; i++) {
		if (i >= low &&i <= high) {
			num = i % 10;

			for (int j = 0; j < keta; j++) {
				num += (i % (10 * j));
			}
		}

		ans += num;
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: 'log10' was not declared in this scope
   14 |         int keta = log10(N);
      |                    ^~~~~
Language: C++

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

int main(){
    int n, a, b;
    cin >> n >> a >> b;

    int r = 0;
    for(int i = 1; i <= N; i++){
        int c = 0; t = i;
        for(int j = 0; j < 5; j++){
            c += t % 10;
            t /= 10;
        }
        if(a <= c && c <= b){
            r += i;
        }
    }
    cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'N' was not declared in this scope
    9 |     for(int i = 1; i <= N; i++){
      |                         ^
a.cc:10:20: error: 't' was not declared in this scope
   10 |         int c = 0; t = i;
      |                    ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;
int main(){
  int i,j,n,a,b,c=0;
  int u,w,x,y,z;
  vector <int> v;
  
  cin>>n>>a>>b;
  for(i=1;i<=n;i++){
    u=i%10;
    w=(i/10)%10;
    x=(i/100)%10;
    y=(i/1000)%10;
    z=(i/10000)%10
    j=u+w+x+y+z;
    if(j>=a&&j<=b)
      v.push_back(j);
  }
  for(i=0;i<v.size();i++)
    c+=v[i];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before 'j'
   16 |     z=(i/10000)%10
      |                   ^
      |                   ;
   17 |     j=u+w+x+y+z;
      |     ~
Language: C++

#include<iostream>
#include<vector>

using namespace std;
int main(){
  int i,j,n,a,b,c=0;
  int v,w,x,y,z;
  vector <int> v;
  
  cin>>n>>a>>b;
  for(i=1;i<=n;i++){
    v=i%10;
    w=(i/10)%10;
    x=(i/100)%10;
    y=(i/1000)%10;
    z=(i/10000)%10
    j=v+w+x+y+z;
    if(j>=a&&j<=b)
      v.push_back(j);
  }
  for(i=0;i<v.size();i++)
    c+=v[i];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: conflicting declaration 'std::vector<int> v'
    8 |   vector <int> v;
      |                ^
a.cc:7:7: note: previous declaration as 'int v'
    7 |   int v,w,x,y,z;
      |       ^
a.cc:16:19: error: expected ';' before 'j'
   16 |     z=(i/10000)%10
      |                   ^
      |                   ;
   17 |     j=v+w+x+y+z;
      |     ~              
a.cc:19:9: error: request for member 'push_back' in 'v', which is of non-class type 'int'
   19 |       v.push_back(j);
      |         ^~~~~~~~~
a.cc:21:15: error: request for member 'size' in 'v', which is of non-class type 'int'
   21 |   for(i=0;i<v.size();i++)
      |               ^~~~
a.cc:22:9: error: invalid types 'int[int]' for array subscript
   22 |     c+=v[i];
      |         ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
  int A,B,N,x,x1,x10,x100,x1000,sum=0;
  for(int i=0;i<N;++i){
    x=i;
    x1=x%10;
    x=x/10;
    x10=x%10;
    x=x/10;
    x100=x%10;
    x=x/10;
    x1000=x%10;
    if(A =< x1+x10+x100+x1000 && B => x1+x10+x100+x1000){
      sum+= x1+x10+x100+x1000;
    }
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expected primary-expression before '<' token
   15 |     if(A =< x1+x10+x100+x1000 && B => x1+x10+x100+x1000){
      |           ^
a.cc:15:37: error: expected primary-expression before '>' token
   15 |     if(A =< x1+x10+x100+x1000 && B => x1+x10+x100+x1000){
      |                                     ^
Language: C

#include<stdio.h>
int main() {
	int i, j;
	int n, a, b;
	int sum = 0;
	int num1 = 0;
	int num2 = 0;
	scanf("%d %d %d", &n, &a, &b);
	for (i = 1; i <= n; i++) {
		num1 = i;
		num2 = 0;
		for (j = 1000; j > 0; j = j / 10) {
			num2 += num1 / j;
			num1 = num1 % j;
		}
		if (num2 >= a && num2 <= b)
			sum += i;
	}
	printf("%d", sum);
	return 0;
}1

Compiler output:
main.c:21:2: error: expected identifier or '(' before numeric constant
   21 | }1
      |  ^
Language: C++

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


int main() {
int n,a,b;cin>>n>>a>>b;
  int ans=0;
  for(int i=1;i<n;i++)
  {
    while(i>=10)
    {
      int sum=0;
      sum+=i%10;
    }
    if(sum>a&&sum<b)ans++;
  }
  cout<<ans<<endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'sum' was not declared in this scope
   16 |     if(sum>a&&sum<b)ans++;
      |        ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,A,B;cin>>N>>A>>B;
  int ans=0;
  int P;
  int x;
  for(int i=1;i<N+1;i++){
    P=0;
    x=i
    while(x){
      P+=x%10;
      x=(x-x%10)/10;
    }
    if(A<=P && P<=B)ans+=i;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before 'while'
   10 |     x=i
      |        ^
      |        ;
   11 |     while(x){
      |     ~~~~~
Language: C++

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


int x(int n){
  int sum=0;
  while(n>0){
    sum+=n%10;
    n/=10
  }
  return sum;
}




int main(){
  int n,a,b;
  cin >> n >> a >> b;
  int ans=0;
  int sum=0;
  
  for(int i=1;i<=n;i++){
    int sum=x(i)
    if(sum>=a && sum<=b) ans+=i;
  }
  
  cout << ans << endl;
}
              
    

Compiler output:
a.cc: In function 'int x(int)':
a.cc:9:10: error: expected ';' before '}' token
    9 |     n/=10
      |          ^
      |          ;
   10 |   }
      |   ~       
a.cc: In function 'int main()':
a.cc:25:5: error: expected ',' or ';' before 'if'
   25 |     if(sum>=a && sum<=b) ans+=i;
      |     ^~
Language: C++

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

int main(){
  int n,a,b;
  cin >>n>>a>>b;
  int sum=0;
  
  if(n==10000) sum=1;
  for(int m=1;m<=n;m++){
    for(int i=0;i<=9;i++){
      for(int j=0;j<=9;j++){
        for(int k=0;k<=9;k++){
          for(int l=0;l<=9;l++){
            if(1000*i+100*j+10*k+l==m){
              if(i+j+k+l>=a && i+j+k+l<=b) ans++;
            }
          }
        }
      }
    }
  }
  cout << ans << endl;
}
              
    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:44: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |               if(i+j+k+l>=a && i+j+k+l<=b) ans++;
      |                                            ^~~
      |                                            abs
a.cc:23:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include <iostream>
using namespace std;
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { 
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

int main() {
  int N, A, B;
  cin >> N >> A >> B;
  int total = 0;
  for (int i = 1; i <= N; ++i) {
    int sum = findSumOfDigits(i); 
    if (sum >= A && sum <= B) { 
      total += i;
    }
  }
  cout << total << endl;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();

      int sun = 0;
      for(int i=0; i=<n; i++){
      	int count = 0;
        int p = i;
        while(true) {
        	count += p % 10;
          p = p / 10;
          if ( p == 0) {
          	if ( count >= a && count <= b) {
            	sun += i;
            }
            break;
          }
          
        }
      }
      
		System.out.println(sun);
	}
}

Compiler output:
Main.java:11: error: > or ',' expected
      for(int i=0; i=<n; i++){
                       ^
1 error
Language: C++

int wa(int n){
    int sum = 0;
    while (n > 0){
        sum += n % 10;
        n /= 10;
    }
    return sum;
}

int main(){
    int N, A, B;
    cin >> N >> A >> B;
    int total = 0;
    for(int i = 1; i <= N; i++){
        int sum = wa(i);
        if(sum >= A && sum <= B){
            total += i;
        }
    }
    cout << total << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'cin' was not declared in this scope
   12 |     cin >> N >> A >> B;
      |     ^~~
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << total << endl;
      |     ^~~~
a.cc:20:22: error: 'endl' was not declared in this scope
   20 |     cout << total << endl;
      |                      ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N,A,B;
  cin>>N>>A>>B;
  int sum=0;
  for(int i=1;i<=N;i++){
    if(i%10+(i/10)%10+(i/100)%10+(i/1000)%10+(i/10000)%10)<=B&&i%10+(i/10)%10+(i/100)%10+(i/1000)%10+(i/10000)%10)>=A){
      sum+=i;
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:59: error: expected primary-expression before '<=' token
    9 |     if(i%10+(i/10)%10+(i/100)%10+(i/1000)%10+(i/10000)%10)<=B&&i%10+(i/10)%10+(i/100)%10+(i/1000)%10+(i/10000)%10)>=A){
      |                                                           ^~
Language: C++

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

int main(){
    
    int N,n,a,b,c,p;
    int sum=0;
    cin>> n >> a >> b;
    for(int i=1;i>n;++i){
      N = i;
      for(int j=0;j<5;++j){
      	p = N%10;
        n = N/10;
        c += p;         	
        if(c>=a&&c<=b){
            sum +=c; 
        }
        c = 0;
    }
    cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
    
    int n,a,b,c,p;
    int sum=0;
  	int N=0;
    cin>> n >> a >> b;

    for(int i=n;i>0;--i){
        if(i==9||i==99||i==999||i==9999){
        c += n.at(j);   
        }
        if(c>=a&&c<=b){
            sum +=c; 
        }
        c = 0;
    }
    cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: request for member 'at' in 'n', which is of non-class type 'int'
   13 |         c += n.at(j);
      |                ^~
a.cc:13:19: error: 'j' was not declared in this scope
   13 |         c += n.at(j);
      |                   ^
Language: C++

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

int main(){
    
    int n,a,b,c,p;
    int sum=0;
  	int N=0;
    cin>> n >> a >> b;

    for(int i=n;i>0;--i){
        for(int j=0;j<n.size();++j){
        c += n.at(j);   
        }
        if(c>=a&&c<=b){
            sum +=c; 
        }
        c = 0;
    }
    cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: request for member 'size' in 'n', which is of non-class type 'int'
   12 |         for(int j=0;j<n.size();++j){
      |                         ^~~~
a.cc:13:16: error: request for member 'at' in 'n', which is of non-class type 'int'
   13 |         c += n.at(j);
      |                ^~
Language: C++

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

int main(){
    string n;
    int a,b,c,p;
    int sum=0;
    cin>> n >> a >> b;
	for(int j=0;j<n.size();++j){
      N += n.at(j);
    }
    for(int i=N;i>0;--i){
        for(int j=0;j<n.size();++j){
        c += n.at(j);   
        }
        if(c>=a&&c<=b){
            sum +=c; 
        }
        c = 0;
    }
    cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'N' was not declared in this scope
   10 |       N += n.at(j);
      |       ^
a.cc:12:15: error: 'N' was not declared in this scope
   12 |     for(int i=N;i>0;--i){
      |               ^
Language: C++

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

int main(){
    string n;
    int a,b,c,d,p;
    int sum=0;
    cin>> n >> a >> b;
  	d = n.at;
    for(int i=d;i>0;--i){
        for(int j=0;j<n.size;++j){
        p = i%10;      
        c += p;
        }
        if(c>=a&&c<=b){
            sum +=c; 
        }
        c = 0;
    }
    cout << sum <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: cannot resolve overloaded function 'at' based on conversion to type 'int'
    9 |         d = n.at;
      |               ^~
a.cc:11:25: 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 '()' ?)
   11 |         for(int j=0;j<n.size;++j){
      |                       ~~^~~~
      |                             ()