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

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
const double PI = 3.141592653589793238;
const double EPS = 1e-10;
int ans;
void solve(string &S, string &N) {
	if (S.size() > N.size()) return;
	if (S.size() == N.size() && S > N) return;
	int A = 0, B = 0, C = 0;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == '7') A++;
		else if (S[i] == '5') B++;
		else C++;
	}
	if (A > 0 && B > 0 && C > 0) ans++;
	string tmp = "753";
	for (int i = 0; i < 3; i++) {
		S.push_back(tmp[i]);
		solve(S, N);
		S.pop_back();
	}
}
int main() {
	int N;
	cin >> N;
	string S = "";
	solve(S, to_string(N));
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:27: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   30 |         solve(S, to_string(N));
      |                  ~~~~~~~~~^~~
a.cc:9:31: note:   initializing argument 2 of 'void solve(std::string&, std::string&)'
    9 | void solve(string &S, string &N) {
      |                       ~~~~~~~~^
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
const double PI = 3.141592653589793238;
const double EPS = 1e-10;
int ans;
void solve(string &S, string &N) {
	if (S.size() > N.size()) return;
	if (S.size() == N.size() && S > N) return;
	int A = 0, B = 0, C = 0;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == '7') A++;
		else if (S[i] == '5') B++;
		else C++;
	}
	if (A > 0 && B > 0 && C > 0) ans++;
	solve(S + string(1, '7'), N);
	solve(S + string(1, '5'), N);
	solve(S + string(1, '3'), N);
}
int main() {
	int N;
	cin >> N;
	solve(string(""), to_string(N));
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'void solve(std::string&, std::string&)':
a.cc:19:17: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
   19 |         solve(S + string(1, '7'), N);
      |               ~~^~~~~~~~~~~~~~~~
a.cc:9:20: note:   initializing argument 1 of 'void solve(std::string&, std::string&)'
    9 | void solve(string &S, string &N) {
      |            ~~~~~~~~^
a.cc:20:17: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
   20 |         solve(S + string(1, '5'), N);
      |               ~~^~~~~~~~~~~~~~~~
a.cc:9:20: note:   initializing argument 1 of 'void solve(std::string&, std::string&)'
    9 | void solve(string &S, string &N) {
      |            ~~~~~~~~^
a.cc:21:17: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
   21 |         solve(S + string(1, '3'), N);
      |               ~~^~~~~~~~~~~~~~~~
a.cc:9:20: note:   initializing argument 1 of 'void solve(std::string&, std::string&)'
    9 | void solve(string &S, string &N) {
      |            ~~~~~~~~^
a.cc: In function 'int main()':
a.cc:26:15: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   26 |         solve(string(""), to_string(N));
      |               ^~~~~~~~~~
a.cc:9:20: note:   initializing argument 1 of 'void solve(std::string&, std::string&)'
    9 | void solve(string &S, string &N) {
      |            ~~~~~~~~^
Language: C++

#include"stdafx.h"
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
 
#define rep(i, n) for (int i = 0; i < n; i++)
#define repd(i, n) for (int i = n; i > 0; i--)
 
using namespace std;
typedef long long int ll;
typedef pair <int, int> P;
 

ll n;

bool shichi(int y){
	string yy=to_string(y);
	ll e=0,s=0,t=0;
	rep(i,yy.size()){
		if(yy[i]==*"3"){
			e++;
		}
		if(yy[i]==*"5"){
			s++;
		}
		if(yy[i]==*"7"){
			t++;
		}
	}
	if(e>0&&s>0&&t>0){
		return true;
	}
	else{
		return false;
	}
}

ll dfs(ll x){
	if(x>n){
		return 0;
	}
	ll ret;
	if(shichi(x)&&x!=0){
		ret=1;
	}
	else{
		ret=0;
	}
	ret+=dfs(10*x+3)+dfs(10*x+5)+dfs(10*x+7);
	return ret;
}

int main(){
	cin>>n;
	cout<<dfs(0)<<endl;
	return 0;
}

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

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

int main() {
  unsigned long n, count = 1, rem, num;
  bool flag = true;
  cin >> n;
  if (n < 357) {
    cout << "0" << endl;
    return 0;
  }
  else if (n == 357) {
    cout << count << endl;
    return 0;
  }
  for (int i = 358; i <= n; i++) {
    flag = true;
    val = i;
    while (val) {
      rem = val % 10;
      if (rem != 3 && rem != 5 && rem != 7) {
        flag = false;
        break;
      }
      rem /= 10;
    }
    if (flag) count++;
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'val' was not declared in this scope
   18 |     val = i;
      |     ^~~
Language: C++

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

int count(string s, char c) {
  int cnt;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == c) cnt++;
  }
  return cnt;
}

int main() {
  unsigned long n, count = 1, th, fi, se;
  string num;
  cin >> n;
  if (n < 357) {
    cout << "0" << endl;
    return 0;
  }
  else if (n == 357) {
    cout << count << endl;
    return 0;
  }
  for (int i = 358; i <= n; i++) {
    num = to_string(i);
    th = count(num, '3');
    fi = count(num, '5');
    se = count(num, '7');
    if (th>0 && fi>0 && se>0 && (th+fi+se) == num.length()) count += 1;
  }
  cout << count << endl;
  return 0;
}
   	

Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: 'count' cannot be used as a function
   26 |     th = count(num, '3');
      |          ~~~~~^~~~~~~~~~
a.cc:27:15: error: 'count' cannot be used as a function
   27 |     fi = count(num, '5');
      |          ~~~~~^~~~~~~~~~
a.cc:28:15: error: 'count' cannot be used as a function
   28 |     se = count(num, '7');
      |          ~~~~~^~~~~~~~~~
Language: C++

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

long long dfs(string s) {
	long long cnt = 0;
	if (stoll(s) > n) {
		return 0;
	}
	char st[11];
	for (int i = 0; i < s.length(); i++) {
		st[i] = s[i];
	}
	if (count(st, st + s.length(), '7') > 0) {
		if (count(st, st + s.length(), '5') > 0) {
			if (count(st, st+s.length(), '3') > 0) {
				cnt++;
			}
		}
	}
	cnt += dfs(to_string(stoll(s) * 10 + 7));
	cnt += dfs(to_string(stoll(s) * 10 + 5));
	cnt += dfs(to_string(stoll(s) * 10 + 3));
	return cnt;
}

int main() {
	cin >> n;
	cout << dfs(to_string(0)) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int dfs(std::string)':
a.cc:15:13: error: 'count' was not declared in this scope; did you mean 'cnt'?
   15 |         if (count(st, st + s.length(), '7') > 0) {
      |             ^~~~~
      |             cnt
Language: C++

            #include<bits/stdc++.h>
            using namespace std;
            #define int long long
             
            int N;
             
            int rec(int n,bool x3,bool x5,bool x7){
            	if(n > N) return 0;
            	int res = 0;
            	if(n <= N && n != 0 && x3 && x5 && x7) res++;
             
            	res += rec(n*10+3,true,x5,x7);
            	res += rec(n*10+5,x3,true,x7);
            	res += rec(n*10+7,x3,x5,true);
            	return res;
            }
             
            int main(){
            	cin >> N;
            	cout<<rec(0,false,false,false)<<endl;
            	return 0;
            }

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

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

int main() {
    long N;
    cin >> N;
    long a,b,c,i,j,k,l,m,n,counter,num753;
for(l=0;l<10;l++){
for(m=3;m<8;m+=2){
    for(i=3;i<8;i+=2){
        for(j=3;j<8;j+=2){
           if(i!=j){
           for(k=3;k<8;k+=2){
               if(k!=j){
               num753 = (100*i+10*j+k)*(pow(10,l))+m;
               if(N-num753>=0){
                   counter++;
               }
        }
    }

    }
}
}
}
}
cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:41: error: 'pow' was not declared in this scope
   16 |                num753 = (100*i+10*j+k)*(pow(10,l))+m;
      |                                         ^~~
Language: C++

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

using namespace std;
using ll = long long;

vector<ll> nums;

ll dfs(ll x){
        nums.push_back(x);
        if(x<=1000000000){
                dfs(10*x+3);
                dfs(10*x+5);
                dfs(10*x+7);
        }
}

int main(){ 
        ll n,ans;
        cin >> n;
        dfs(0);
        for(ll i=0;i<nums.size();i++){
                string str = to_string(nums[i]);
                bool flag[3];
                for(int j=0;j<str.size();j++){
                        if(str[j]=='3') flag[0]=true;
                        if(str[j]=='5') flag[1]=true;
                        if(str[j]=='7') flag[2]=true;
                }
                for(int j=0;j<3;j++){
                        if(!flag[j]){
                                    nums.erase(nums.begin()+i);
                                    break;
                        }
                }
        }
        sort(nums.begin(),nums.end());
        for(ans=0;;ans++){
                if(nums[i]>n)   break;
        }
        cout << ans << endl;
        return 0;
}

Compiler output:
a.cc: In function 'll dfs(ll)':
a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
a.cc: In function 'int main()':
a.cc:43:25: error: 'i' was not declared in this scope
   43 |                 if(nums[i]>n)   break;
      |                         ^
Language: C++

#include<iostream>
using namespace std;

long long N, ans;

void dfs(long long n, bool seven, bool five, bool three) {
  if (n <= N) {
    if (seven && five && three) ++ans;
  }
  else return;

  dfs(n * 10 + 7, true, five, three);
  dfs(n * 10 + 5, seven, true, three);
  dfs(n * 10 ; 3, seven, five, true);
}

int main() {
  scanf("%d", &N);
  dfs(0, false, false, false);

  printf("%d\n", ans);
  return 0;
}


Compiler output:
a.cc: In function 'void dfs(long long int, bool, bool, bool)':
a.cc:14:13: error: expected ')' before ';' token
   14 |   dfs(n * 10 ; 3, seven, five, true);
      |      ~      ^~
      |             )
a.cc:14:36: error: expected ';' before ')' token
   14 |   dfs(n * 10 ; 3, seven, five, true);
      |                                    ^
      |                                    ;
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <deque>
#include <queue>
#include <cctype>
#include <cstdio>
#include <math.h>
#include <set>
#define INF 1000000000000
using namespace std;
using ll = long long;
ll ans = 0;
ll n;
string str = "357";
void judge(string a) {
	ll kazu = stoi(a);
	bool san=false, go=false, nana = false;
	if (kazu <= n) {
		for (ll i = 0; i < a.length(); i++) {
			if (a[i] == '3') {
				san = true;
			}
			else if (a[i] == '5') {
				go = true;
			}
			else if (a[i] == '7') {
				nana = true;
			}
		}
		if (san == true && go == true && nana == true) {
			ans++;
		}
	}
}

void num(string s) {
	cout << s << endl;
	if (s.length() <= 9) {
		judge(s);
		for (ll i = 0; i < 3; i++) {
			num(s + str.substr(i, 1));
		}
	}
}


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 <iostream>
#include <bits/stdc++.h>
using namespace std;

int main(){
  long int N;
  cin >> N;
  vector<int> a(3)={3,5,7};
  vector<int> b(1)={1};
  for (int i=0; i<26500; ++i){
    if(a.at(i)<100000000){
     a.push_back(a.at(i)*10+3);
     a.push_back(a.at(i)*10+5);
     a.push_back(a.at(i)*10+7);
    }
    else break;
  }
  for (int i=0; i<a.size(); ++i){
    int X=0;
    int Y=0;
    int Z=0;
    if(a.at(i)%10==3) X += 1;
    if(a.at(i)%10==5) Y += 1;
    if(a.at(i)%10==7) Z += 1;
    if(a.at(i)%100/10==3) X += 1;
    if(a.at(i)%100/10==5) Y += 1;
    if(a.at(i)%100/10==7) Z += 1;
    if(a.at(i)%1000/100==3) X += 1;
    if(a.at(i)%1000/100==5) Y += 1;
    if(a.at(i)%1000/100==7) Z += 1;
    if(a.at(i)%10000/1000==3) X += 1;
    if(a.at(i)%10000/1000==5) Y += 1;
    if(a.at(i)%10000/1000==7) Z += 1;
    if(a.at(i)%100000/10000==3) X += 1;
    if(a.at(i)%100000/10000==5) Y += 1;
    if(a.at(i)%100000/10000==7) Z += 1;
    if(a.at(i)%1000000/100000==3) X += 1;
    if(a.at(i)%1000000/100000==5) Y += 1;
    if(a.at(i)%1000000/100000==7) Z += 1;
    if(a.at(i)%10000000/1000000==3) X += 1;
    if(a.at(i)%10000000/1000000==5) Y += 1;
    if(a.at(i)%10000000/1000000==7) Z += 1;
    if(a.at(i)%100000000/10000000==3) X += 1;
    if(a.at(i)%100000000/10000000==5) Y += 1;
    if(a.at(i)%100000000/10000000==7) Z += 1;
    if(X>=1 && Y>=1 && Z>=1) b.push_back(a.at(i));
  }
  
  cout << b.size()-1 << endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ',' or ';' before '=' token
    8 |   vector<int> a(3)={3,5,7};
      |                   ^
a.cc:9:19: error: expected ',' or ';' before '=' token
    9 |   vector<int> b(1)={1};
      |                   ^
Language: C++

#include<iostream>
#include<string>
#include<complex>
int n;
int ans = 0;
using namespace std;
int recurse(string now){
  bool a, b, c;
  int kaisu;
  if(stoi(now) > n){
    return 0;
  }

  kaisu = recurse("3" + now) + recurse("5" + now) + recurse("7" + now);

  for(int i = 0; i < now.size(); i++){
    if(now.at(i) == "3"){
      a = 1;
    } else if(now.at(i) == "5"){
      b = 1;
    } else if(now.at(i) == "7"){
      c = 1;
    }
  }
  if(a == 1 && b == 1&& c == 1){
    return kaisu + 1;
  } else {
    return kaisu;
  }
}

int main(){

  cin >> n;
  int sum;
  sum = recurse("3") + recurse("5") + recurse("7");
  cout << sum << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int recurse(std::string)':
a.cc:17:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(now.at(i) == "3"){
      |        ~~~~~~~~~~^~~~~~
a.cc:19:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     } else if(now.at(i) == "5"){
      |               ~~~~~~~~~~^~~~~~
a.cc:21:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     } else if(now.at(i) == "7"){
      |               ~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<complex>
int n;
int ans = 0;

int recurse(string now){
  int kaisu;
  if(stoi(now) > n){
    return 0;
  }
  
  kaisu = recurse(3 + now) + recurse(5 + now) + recurse(7 + now);
  
  return kaisu + 1;
}

int main(){
  
  cin >> n;
  cout << recurse(n) << endl;
  return 0;
}

Compiler output:
a.cc:7:13: error: 'string' was not declared in this scope
    7 | int recurse(string now){
      |             ^~~~~~
a.cc:7:13: 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: In function 'int main()':
a.cc:20:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   20 |   cin >> n;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:21:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |   cout << recurse(n) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:18: error: 'recurse' cannot be used as a function
   21 |   cout << recurse(n) << endl;
      |           ~~~~~~~^~~
a.cc:21:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |   cout << recurse(n) << endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
#include<complex>
int n;
int ans = 0;
int recurse(string now){
  int kaisu;
  if(stoi(now) > n){
    return 0;
  }
  
  kaisu = recurse(3 + now) + recurse(5 + now) + recurse(7 + now);
  
  return kaisu + 1;
}

int main(){
  
  cin >> n;
  cout << recurse(n) << endl;
  return 0;
}

Compiler output:
a.cc:6:13: error: 'string' was not declared in this scope
    6 | int recurse(string now){
      |             ^~~~~~
a.cc:6:13: 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: In function 'int main()':
a.cc:19:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   19 |   cin >> n;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:20:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |   cout << recurse(n) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:18: error: 'recurse' cannot be used as a function
   20 |   cout << recurse(n) << endl;
      |           ~~~~~~~^~~
a.cc:20:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |   cout << recurse(n) << endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
int main () {
  int N;
  cin >> N;
  int dig, last, count, a, b, c;
  for (int i = 1; i <= N; i++) {
    a = 0, b= 0, c = 0;
    dig = i;
    for (;dig != 0;) {
      last = dig % 10;
      dig /= 10;
      if (last == 7) a++;
      if (last == 5) b++;
      if (last == 3) c++;
    }
    if(a>0 && b > 0 && c > 0) count++;
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   cout << count << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |   cout << count << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        System.out.println(count(0));
    }

    static long count(long a) {
        if (a > n) {
            return 0;
        }
        String as = String.valueOf(a);
        if (as.contains("7") && as.contains("5") && as.contains("3")) {
            return 1 + count(a * 10 + 7) + count(a * 10 + 5) + count(a * 10 + 3);
        }
        return count(a * 10 + 7) + count(a * 10 + 5) + count(a * 10 + 3);
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
        if (a > n) {
                ^
  symbol:   variable n
  location: class Main
1 error
Language: C++

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

   typedef long long ll;
   typedef pair<ll, ll> Pii;
   typedef vector<ll> Vi;
   typedef vector<Vi> VVi;

   const double EPS = (1e-7);
   const ll INF =(1e13);
   const double PI = (acos(-1));
   const ll MOD = ll(1e9) + 7;

   #define REP(i, n) for(ll i = 0; i < (ll)(n); i++)
   #define REPR(i, n) for(ll i = n; i > -1; i--)
   #define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
   #define ALL(x) (x).begin(),(x).end()
   #define SORT(x) sort((x).begin(), (x).end())
   #define RSORT(x) sort((x).rbegin(), (x).rend()
   #define REVERSE(x) reverse((x).begin(), (x).end())
   #define SZ(x) ((ll)(x).size())
   #define pb push_back
   #define mp make_pair

   //chmax(a, b): a>bならaをbで更新　更新したときにtrueを返す
   //chmin(a, b): a<bならaをbで更新　更新したときにtrueを返す
   template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
   template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

   #define dump(x) cerr<< #x << "= " << (x) << endl;

   ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
   ll pow(ll a, ll b){if (b == 0) return 1; else if (b % 2 == 0) return pow(a * a, b / 2); else return pow(a * a, b / 2) * a;}
   ll pow(ll a, ll b, ll m){if (b == 0) return 1; else if (b % 2 == 0) return (pow(a * a, b / 2, m) % m); else return (pow(a * a, b / 2) * a) % m;}


   ll dx[4]={1,0,-1,0};
   ll dy[4]={0,1,0,-1};

bool konami(ll n){
  if (!n) return true;
  ll temp = n;
  bool san = false, go = false, nana = false;
  while (temp > 0){
    san ||= (temp % 10 == 3);
    go ||= (temp %10 == 5);
    nana ||= (temp % 10 == 7);
    if (!(temp % 10 == 3 || temp % 10 == 5 || temp % 10 == 7)) return false;
    temp /= 10;
  }
  return (san && go && nana);
}

ll N;
ll dfs(ll n){
  if (n > N) return 0;
  if (!konami(n)) return 0;
  ll ret = 1;
  ret += dfs(n*10 + 3) + dfs(n*10 + 5) + dfs(n*10+7);
  return ret;
}

int main(){
  cin >> N;
  cout << dfs(0) << endl;
}


Compiler output:
a.cc: In function 'bool konami(ll)':
a.cc:45:11: error: expected primary-expression before '=' token
   45 |     san ||= (temp % 10 == 3);
      |           ^
a.cc:46:10: error: expected primary-expression before '=' token
   46 |     go ||= (temp %10 == 5);
      |          ^
a.cc:47:12: error: expected primary-expression before '=' token
   47 |     nana ||= (temp % 10 == 7);
      |            ^
Language: C++

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

   typedef long long ll;
   typedef pair<ll, ll> Pii;
   typedef vector<ll> Vi;
   typedef vector<Vi> VVi;

   const double EPS = (1e-7);
   const ll INF =(1e13);
   const double PI = (acos(-1));
   const ll MOD = ll(1e9) + 7;

   #define REP(i, n) for(ll i = 0; i < (ll)(n); i++)
   #define REPR(i, n) for(ll i = n; i > -1; i--)
   #define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
   #define ALL(x) (x).begin(),(x).end()
   #define SORT(x) sort((x).begin(), (x).end())
   #define RSORT(x) sort((x).rbegin(), (x).rend()
   #define REVERSE(x) reverse((x).begin(), (x).end())
   #define SZ(x) ((ll)(x).size())
   #define pb push_back
   #define mp make_pair

   //chmax(a, b): a>bならaをbで更新　更新したときにtrueを返す
   //chmin(a, b): a<bならaをbで更新　更新したときにtrueを返す
   template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
   template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

   #define dump(x) cerr<< #x << "= " << (x) << endl;

   ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
   ll pow(ll a, ll b){if (b == 0) return 1; else if (b % 2 == 0) return pow(a * a, b / 2); else return pow(a * a, b / 2) * a;}
   ll pow(ll a, ll b, ll m){if (b == 0) return 1; else if (b % 2 == 0) return (pow(a * a, b / 2, m) % m); else return (pow(a * a, b / 2) * a) % m;}


   ll dx[4]={1,0,-1,0};
   ll dy[4]={0,1,0,-1};

bool konami(ll n){
  if (!n) return true;
  ll temp = n;
  bool san = false, go = false, nana = false;
  while (temp > 0){
    san = san || (temp % 10 == 3);
    go = go || (temp %10 == 5);
    nana = nana || (temp % 10 == 7);
    if (!(temp % 10 == 3 || temp % 10 == 5 || temp % 10 == 7)) return false;
    temp /= 10;
  }
  return (san && go && nana);
}

ll dfs(ll n){
  if (n > N) return 0;
  if (!konami(n)) return 0;
  ll ret = 1;
  ret += dfs(n*10 + 3) + dfs(n*10 + 5) + dfs(n*10+7);
  return ret;
}

int main(){
  cin >> N;
  cout << dfs(0) << endl;
}


Compiler output:
a.cc: In function 'll dfs(ll)':
a.cc:55:11: error: 'N' was not declared in this scope
   55 |   if (n > N) return 0;
      |           ^
a.cc: In function 'int main()':
a.cc:63:10: error: 'N' was not declared in this scope
   63 |   cin >> N;
      |          ^
Language: C++


def check(s):
    counter = [False,False,False]
    for c in s:
        if c == "3":
            counter[0] = True
        elif c == "5":
            counter[1] = True
        elif c == "7":
            counter[2] = True
        if counter[0] and counter[1] and counter[2]:
            return True
    return False

def f(s,maxi):
    if int(s) > maxi:
        return 0
    if s == "0":
        s = ""
    if check(s):
        return f(s+"3",maxi) + f(s+"5",maxi) + f(s+"7",maxi) + 1
    
    return f(s+"3",maxi) + f(s+"5",maxi) + f(s+"7",maxi)
   
   
print(f("0",int(input())))

Compiler output:
a.cc:2:1: error: 'def' does not name a type
    2 | def check(s):
      | ^~~
Language: C++


def check(s):
    counter = [False,False,False]
    for c in s:
        if c == "3":
            counter[0] = True
        elif c == "5":
            counter[1] = True
        elif c == "7":
            counter[2] = True
        if counter[0] and counter[1] and counter[2]:
            return True
    return False

def f(s,maxi):
    if int(s) > maxi:
        #print("だめです")
        return 0
    if s == "0":
        s = ""
    if check(s):
        return f(s+"3",maxi) + f(s+"5",maxi) + f(s+"7",maxi) + 1
    
    return f(s+"3",maxi) + f(s+"5",maxi) + f(s+"7",maxi)
   
   
print(f("0",int(input())))

Compiler output:
a.cc:17:10: error: invalid preprocessing directive #print
   17 |         #print("だめです")
      |          ^~~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def check(s):
      | ^~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <ccomplex>
#include <unordered_map>
#include <cstring>
#include <iostream>
#include <numeric>
#include <sstream>
#include <set>

using namespace std;
#define MAX 1000000000

int main(){

    int N;
    cin >> N;

    int cnt = 0;
    set<char> sample;
    sample.insert('3');
    sample.insert('5');
    sample.insert('7');

    for (int i = 357; i <= N; i = i + 2){
        int contiFlg = false;
        string temp = to_string((_Longlong)i);
        for (int len = temp.size(); len > 3; len--){
            temp = temp.substr(temp.size() - len,temp.size());
            if ((temp[0] != '3') && (temp[0] != '5') && temp[0] != '7'){
                i += (int)pow(10.0, (int)temp.size() - 1);
                contiFlg = true;
                break;
            }
        }
        if (contiFlg) continue;
        temp = to_string((_Longlong)i);
        set<char> tempS;
        for (unsigned int i = 0; i < temp.size(); i++){
            tempS.insert(temp[i]);
        }
        if(tempS != sample) continue;

        /*if(false == tempS.find('3'))

        if ((temp.end() != find(temp.begin(), temp.end(), '0')) 
            || (temp.end() != find(temp.begin(), temp.end(), '1'))
            || (temp.end() != find(temp.begin(), temp.end(), '2'))
            || (temp.end() != find(temp.begin(), temp.end(), '4'))
            || (temp.end() != find(temp.begin(), temp.end(), '6'))
            || (temp.end() != find(temp.begin(), temp.end(), '8'))
            || (temp.end() != find(temp.begin(), temp.end(), '9'))){
                continue;
        }
        if ((temp.end() == find(temp.begin(), temp.end(), '3')) 
            || (temp.end() == find(temp.begin(), temp.end(), '5'))
            || (temp.end() == find(temp.begin(), temp.end(), '7'))){
                continue;
        }*/
        cnt++;
    }
    std::cout << cnt << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:34: error: '_Longlong' was not declared in this scope
   32 |         string temp = to_string((_Longlong)i);
      |                                  ^~~~~~~~~
a.cc:42:37: error: expected ')' before 'i'
   42 |         temp = to_string((_Longlong)i);
      |                         ~           ^
      |                                     )
Language: C++

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

bool func(long long n){
 	string s;
  	s = to_string(n);
  	bool flag_7=false, flag_5=false, flag_3=false;
  	for(long long i=s.size()-1; i >=0; --i){
     	if(s[i]=='7'){
          	flag_7 = true;
        }
      	else if (s[i]=='5'){
         	 flag_5 = true;
        }
      	else if (s[i]=='3'){
         	flag_3 = true; 
        }
      	else{
         	return false; 
        }
    }
  	if (flag_7 && flag_5 && flag_3)
  		return true;
  	else
      	return false;
}


int main(){
  	long long N, ans=0;
  	cin >> N;
  	if (N < 357){
     	
    }
	else if (N < 1000)
    {
     	for(long long i=357; i <= N; i+=2){
         	 if(func(i))
               ans+=1;
        }
    }
  	else
    {
      	int index = 3;
  		for(long long i=1000; ; i+*=10){
          	if(N >= i){
              	//cout << "bbb" << endl;
             	ans += pow(3,index) - 3*pow(2,index) +3;
              	index+=1;
            }
          	else{
              	//cout << "ccc" << endl;
              	for (long long j=(i/10)+1; j <= N; j+=2){
      				if(func(j))
        				ans+=1;
                }
              	break;
            } 
    	}
    }
  	if(ans > 0)
  		cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:43: error: expected primary-expression before '*=' token
   45 |                 for(long long i=1000; ; i+*=10){
      |                                           ^~
Language: C++

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

   typedef long long ll;
   typedef pair<ll, ll> Pii;
   typedef vector<ll> Vi;
   typedef vector<Vi> VVi;

   const double EPS = (1e-7);
   const ll INF =(1e13);
   const double PI = (acos(-1));
   const ll MOD = ll(1e9) + 7;

   #define REP(i, n) for(ll i = 0; i < (ll)(n); i++)
   #define REPR(i, n) for(ll i = n; i > -1; i--)
   #define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
   #define ALL(x) (x).begin(),(x).end()
   #define SORT(x) sort((x).begin(), (x).end())
   #define RSORT(x) sort((x).rbegin(), (x).rend()
   #define REVERSE(x) reverse((x).begin(), (x).end())
   #define SZ(x) ((ll)(x).size())
   #define pb push_back
   #define mp make_pair

   //chmax(a, b): a>bならaをbで更新　更新したときにtrueを返す
   //chmin(a, b): a<bならaをbで更新　更新したときにtrueを返す
   template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
   template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

   #define dump(x) cerr<< #x << "= " << (x) << endl;

   ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
   ll pow(ll a, ll b){if (b == 0) return 1; else if (b % 2 == 0) return pow(a * a, b / 2); else return pow(a * a, b / 2) * a;}
   ll pow(ll a, ll b, ll m){if (b == 0) return 1; else if (b % 2 == 0) return (pow(a * a, b / 2, m) % m); else return (pow(a * a, b / 2) * a) % m;}


   ll dx[4]={1,0,-1,0};
   ll dy[4]={0,1,0,-1};

bool konami(ll n){
  if (!n) return true;
  ll temp = n;
  bool san = false, go = false, nana = false;
  while (temp > 0){
    san ||= (temp % 10 == 3);
    go ||= (temp %10 == 5);
    nana ||= (temp % 10 == 7);
    if (!(temp % 10 == 3 || temp % 10 == 5 || temp % 10 == 7)) return false;
    temp /= 10;
  }
  return (san && go && nana);
}

ll dfs(ll n){
  if (n > N) return 0;
  if (!konami(n)) return 0;
  ll ret = 1;
  ret += dfs(n*10 + 3) + dfs(n*10 + 5) + dfs(n*10+7);
  return ret;
}

int main(){
  cin >> N;
  cout << dfs(0) << endl;
}


Compiler output:
a.cc: In function 'bool konami(ll)':
a.cc:45:11: error: expected primary-expression before '=' token
   45 |     san ||= (temp % 10 == 3);
      |           ^
a.cc:46:10: error: expected primary-expression before '=' token
   46 |     go ||= (temp %10 == 5);
      |          ^
a.cc:47:12: error: expected primary-expression before '=' token
   47 |     nana ||= (temp % 10 == 7);
      |            ^
a.cc: In function 'll dfs(ll)':
a.cc:55:11: error: 'N' was not declared in this scope
   55 |   if (n > N) return 0;
      |           ^
a.cc: In function 'int main()':
a.cc:63:10: error: 'N' was not declared in this scope
   63 |   cin >> N;
      |          ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<queue>

#define int long long

using namespace std;

int N;
int dfs(int x, int y,int num) {
	num = num * 10 + y;
	if (num > N) return 0;
	
	int tnum = num;
	int tmp = num;
	int s3 = 0, s5 = 0, s7 = 0;
	while (1) {
		if (tmp <= 0) break;
		tmp = tmp / 10 * 10;
		int tmp_num = tnum - tmp;
		if (tmp_num == 3) s3++;
		else if (tmp_num == 5) s5++;
		else if (tmp_num == 7) s7++;
		tmp /= 10;
		tnum /= 10;
	}

	if (s3 > 0 && s5 > 0 && s7 > 0) {
		return dfs(++x, 3, num) + dfs(++x, 5, num) + dfs(++x, 7, num)+1;
	}
	else {
		return dfs(++x, 3, num) + dfs(++x, 5, num) + dfs(++x, 7, num);
	}
}

void main() {
	cin >> N;
	int count = dfs(0, 3, 0) + dfs(0, 5, 0) + dfs(0, 7, 0);
	cout << count << endl;
}

Compiler output:
a.cc:37:1: error: '::main' must return 'int'
   37 | void main() {
      | ^~~~
Language: C++

#import"cstdio"
int n,m;
int d(long a,f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
main(){scanf("%d",&n);d(0,0);printf("%d",m);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import"cstdio"
      |  ^~~~~~
a.cc:3:14: error: 'f' has not been declared
    3 | int d(long a,f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |              ^
a.cc: In function 'int d(long int, int)':
a.cc:3:28: error: 'f' was not declared in this scope
    3 | int d(long a,f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |                            ^
a.cc:3:74: warning: no return statement in function returning non-void [-Wreturn-type]
    3 | int d(long a,f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |                                                                          ^
a.cc: At global scope:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){scanf("%d",&n);d(0,0);printf("%d",m);}
      | ^~~~
Language: C++

#import"cstdio"
n,m;
int d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
main(){scanf("%d",&n);d(0,0);printf("%d",m);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import"cstdio"
      |  ^~~~~~
a.cc:2:1: error: 'n' does not name a type
    2 | n,m;
      | ^
a.cc: In function 'int d(long int, int)':
a.cc:3:27: error: 'n' was not declared in this scope
    3 | int d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |                           ^
a.cc:3:29: error: 'm' was not declared in this scope
    3 | int d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |                             ^
a.cc:3:78: warning: no return statement in function returning non-void [-Wreturn-type]
    3 | int d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |                                                                              ^
a.cc: At global scope:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){scanf("%d",&n);d(0,0);printf("%d",m);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:20: error: 'n' was not declared in this scope
    4 | main(){scanf("%d",&n);d(0,0);printf("%d",m);}
      |                    ^
a.cc:4:42: error: 'm' was not declared in this scope
    4 | main(){scanf("%d",&n);d(0,0);printf("%d",m);}
      |                                          ^
Language: C++

#import"cstdio"
int n,m;
d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
main(){scanf("%d",&n);d(0,0);printf("%d",m);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import"cstdio"
      |  ^~~~~~
a.cc:3:1: error: ISO C++ forbids declaration of 'd' with no type [-fpermissive]
    3 | d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      | ^
a.cc: In function 'int d(long int, int)':
a.cc:3:74: warning: no return statement in function returning non-void [-Wreturn-type]
    3 | d(long a,int f){if(a<=n)m+=f==7,a*=10,d(a+ 3 ,f|1),d(a+5,f|2),d(a+7,f|4);}
      |                                                                          ^
a.cc: At global scope:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){scanf("%d",&n);d(0,0);printf("%d",m);}
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
long N;
long ret;
int dfs(int x, int mask)
{
  if(x > N)
    return 0;
  if(mask == 7);
  dfs(x*10+3, mask|1);
  dfs(x*10+5, mask|2);
  dfs(x*10+7, mask|4);
}

int main()
{
  unsigned int N;
  cin >> N;
  ret = 0;
  finder(0,0);
  cout << ret << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'finder' was not declared in this scope
   20 |   finder(0,0);
      |   ^~~~~~
a.cc: In function 'int dfs(int, int)':
a.cc:12:6: warning: control reaches end of non-void function [-Wreturn-type]
   12 |   dfs(x*10+7, mask|4);
      |   ~~~^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
long N;
long ret;
int dfs(int x, char mask)
{
  if(x > N)
    return 0;
  if(mask == 7);
  dfs(x*10+3, mask|1);
  dfs(x*10+5, mask|2);
  dfs(x*10+7, mask|4);
}

int main()
{
  unsigned int N;
  cin >> N;
  ret = 0;
  finder(0,0);
  cout << ret << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'finder' was not declared in this scope
   20 |   finder(0,0);
      |   ^~~~~~
a.cc: In function 'int dfs(int, char)':
a.cc:12:6: warning: control reaches end of non-void function [-Wreturn-type]
   12 |   dfs(x*10+7, mask|4);
      |   ~~~^~~~~~~~~~~~~~~~
Language: C++

/*
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <stack>
using namespace std;

bool divide(int n)
{
    int cnt_other = 0, cnt3 = 0, cnt5 = 0, cnt7 = 0;
    while(n > 0){
        int tmp = n % 10;
        switch(tmp) {
			case 3: cnt3++; break;
			case 5: cnt5++; break;
			case 7: cnt7++; break;
			default: cnt_other++; break;
		}
        n /= 10;
    }
    if (cnt_other == 0 && cnt3 > 0 && cnt5 > 0 && cnt7 > 0) {
        return true;
    } else {
        return false;
    }
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	scanf("%d", &n);

    int cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (divide(i)) {
            cnt++;
        }
    }
    printf("%d\n", cnt);
	return 0;
}
*/
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <functional>
#define ll long long
using namespace std;

// 求める数が何回出てきたかと10桁の整数を用意する
int cnt = 0;
string t(10, '#');

bool check753(string s)
{
    // 文字列'7', '5', '3'が出てきたか判断する
    bool seven = false, five = false, three = false;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == '7') seven = true;
        if (s[i] == '5') five = true;
        if (s[i] == '3') three = true;
    }
    if (seven && five && three) {
        return true;
    }
}

void generate753(int i, int n, string s) {
    if (i == n) {
        string num = t.substr(0, n);  // numはtのn桁目まで
        if (stoi(num) <= stoi(s) && check753(num)) {  // numがsより小さくnumが準753数のとき
            cnt++;
        }
        return;
    }
    // n桁の3or5or7で出来た数を作る
    t[i] = '3';
    generate753(i + 1, n, s);
    t[i] = '5';
    generate753(i + 1, n, s);
    t[i] = '7';
    generate753(i + 1, n, s);
}

int main(int argc, char const *argv[])
{
    string s;
    cin >> s;

    // 1桁からn桁まで準753数を作る
    for (int i = 1; i <= s.size(); i++) {
        generate(0, i, s);
    }

    cout << cnt << '\n';
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:50:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::generate(_FIter, _FIter, _Generator) [with _FIter = int; _Generator = __cxx11::basic_string<char>]':
a.cc:103:17:   required from here
  103 |         generate(0, i, s);
      |         ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4355:9: error: invalid type argument of unary '*' (have 'int')
 4355 |         *__first = __gen();
      |         ^~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4355:25: error: no match for call to '(std::__cxx11::basic_string<char>) ()'
 4355 |         *__first = __gen();
      |                    ~~~~~^~
a.cc: In function 'bool check753(std::string)':
a.cc:77:1: warning: control reaches end of non-void function [-Wreturn-type]
   77 | }
      | ^
Language: C++

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

bool func(int n){
 	string s;
  	s = to_string(n);
  	bool flag_7=false, flag_5=flase, flag_3=false;
  	for(int i=0; i < s.size(); ++i){
     	if(s[i]=='7'){
          	flag_7 = true;
        }
      	else if (s[i]=='5'){
         	 flag_5 = true;
        }
      	else if (s[i]=='3'){
         	flag_3 = true; 
        }
      	else{
         	return false; 
        }
    }
  	if (flag_7 && flag_5 && flag_3)
  		return true;
  	else
      	return false;
}

int main(){
  	int N, ans=0;
 	string S;
  	cin >> N;
  	for(int i=0; i < N; ++i){
      	if(func(i))
        	ans+=1;
    }
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'bool func(int)':
a.cc:7:35: error: 'flase' was not declared in this scope; did you mean 'fclose'?
    7 |         bool flag_7=false, flag_5=flase, flag_3=false;
      |                                   ^~~~~
      |                                   fclose
a.cc:16:17: error: 'flag_3' was not declared in this scope; did you mean 'flag_5'?
   16 |                 flag_3 = true;
      |                 ^~~~~~
      |                 flag_5
a.cc:22:33: error: 'flag_3' was not declared in this scope; did you mean 'flag_5'?
   22 |         if (flag_7 && flag_5 && flag_3)
      |                                 ^~~~~~
      |                                 flag_5
a.cc:26:1: warning: control reaches end of non-void function [-Wreturn-type]
   26 | }
      | ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
using namespace std;

std::vector<string> generateIncNum(std::vector<string> c, int digits)
{
    if(digits == 1)
        return c;
    
    std::vector<string> new_c;
    for(string s : c)
    {
        new_c.push_back("3" + s);
        new_c.push_back("5" + s);
        new_c.push_back("7" + s);
    }
    c = new_c;
    return generateIncNum(new_c, digits - 1);
}

int main()
{
//    string a = "999999999";
  	string a;
    cin >> a;
    int a_num = std::stoi(a);
 
    int ret = 0;
    int digits = a.size();
    if(digits < 3)
    {
        ret = 0;
    }
    else
    {
        for(int i = 3; i < digits; i++)
            ret += pow(3, i) - 3 * pow(2, i) + 3;
        
        std::vector<string> c = {"3", "5", "7"};
        auto cc = generateIncNum(c, digits);
        for(string s : cc)
        {
            int num = std::stoi(s);
            if (num <= a_num)
            {
                if(std::count_if( s.begin(), s.end(), []( char c ){ return c == '3';}) == 0)
                    continue;
                if(std::count_if( s.begin(), s.end(), []( char c ){ return c == '5';}) == 0)
                    continue;
                if(std::count_if( s.begin(), s.end(), []( char c ){ return c == '7';}) == 0)
                    continue;
                ret++;
            }
        }
        
    }
    
    cout << ret;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:25: error: 'count_if' is not a member of 'std'
   47 |                 if(std::count_if( s.begin(), s.end(), []( char c ){ return c == '3';}) == 0)
      |                         ^~~~~~~~
a.cc:49:25: error: 'count_if' is not a member of 'std'
   49 |                 if(std::count_if( s.begin(), s.end(), []( char c ){ return c == '5';}) == 0)
      |                         ^~~~~~~~
a.cc:51:25: error: 'count_if' is not a member of 'std'
   51 |                 if(std::count_if( s.begin(), s.end(), []( char c ){ return c == '7';}) == 0)
      |                         ^~~~~~~~