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

#include <iostream>
using namespace std;
 
long long N;
 
bool is_valid(int n) {
  bool is_3 = false;
  bool is_5 = false;
  bool is_7 = false;
  
  while(n!=0) {
    int res = n % 10;
    if(res==3) {
      is_3 = true;
    } else if(res==5) {
      is_5 = true;
    } else if(res==7) {
      is_7 = true;
    }
    if(is_3==true && is_5==true && is_7==true) {
      return true;
    }
    n /= 10;
  }
  
  return false;
}
 
long long func(long long n) {  
  if(n>N) {
    return 0;
  }
   
  int res = 0;
  if (is_valid(n)) {
    res = 1;
  }
  
  res += func(n*10+3);
  res += func(n*10+5);
  res += func(n*10+7);
 
  return res;
}
 
int main (){
  cin >> N;
  
  cout << func(0) << endl;  
  return 0;
}
#include <iostream>
using namespace std;
 
long long N;
 
bool is_valid(int n) {
  bool is_3 = false;
  bool is_5 = false;
  bool is_7 = false;
  
  while(n!=0) {
    int res = n % 10;
    if(res==3) {
      is_3 = true;
    } else if(res==5) {
      is_5 = true;
    } else if(res==7) {
      is_7 = true;
    }
    if(is_3==true && is_5==true && is_7==true) {
      return true;
    }
    n /= 10;
  }
  
  return false;
}
 
long long func(long long n) {  
  if(n>N) {
    return 0;
  }
   
  int res = 0;
  if (is_valid(n)) {
    res = 1;
  }
  
  res += func(n*10+3);
  res += func(n*10+5);
  res += func(n*10+7);
 
  return res;
}
 
int main (){
  cin >> N;
  
  cout << func(0) << endl;  
  return 0;
}

Compiler output:
a.cc:55:11: error: redefinition of 'long long int N'
   55 | long long N;
      |           ^
a.cc:4:11: note: 'long long int N' previously declared here
    4 | long long N;
      |           ^
a.cc:57:6: error: redefinition of 'bool is_valid(int)'
   57 | bool is_valid(int n) {
      |      ^~~~~~~~
a.cc:6:6: note: 'bool is_valid(int)' previously defined here
    6 | bool is_valid(int n) {
      |      ^~~~~~~~
a.cc:80:11: error: redefinition of 'long long int func(long long int)'
   80 | long long func(long long n) {
      |           ^~~~
a.cc:29:11: note: 'long long int func(long long int)' previously defined here
   29 | long long func(long long n) {
      |           ^~~~
a.cc:97:5: error: redefinition of 'int main()'
   97 | int main (){
      |     ^~~~
a.cc:46:5: note: 'int main()' previously defined here
   46 | int main (){
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
 
long long N;
 
bool is_valid(int n) {
  bool is_3 = false;
  bool is_5 = false;
  bool is_7 = false;
  
  while(n!=0) {
    int res = n % 10;
    if(res==3) {
      is_3 = true;
    } else if(res==5) {
      is_5 = true;
    } else if(res==7) {
      is_7 = true;
    }
    if(is_3==true && is_5==true && is_7==true) {
      return true;
    }
    n /= 10;
  }
  
  return false;
}
 
long long func(long long n) {  
  if(n>N) {
    return 0;
  }
   
  int res = 0;
  if (is_valid(n)) {
    res = 1;
  }
  
  res += func(n*10+3);
  res += func(n*10+5);
  res += func(n*10+7);
 
  return res;
}
 
int main (){
  cin >> N;
  
  cout << func(0) << endl;  
  return 0;
}
#include <iostream>
using namespace std;
 
long long N;
 
bool is_valid(int n) {
  bool is_3 = false;
  bool is_5 = false;
  bool is_7 = false;
  
  while(n!=0) {
    int res = n % 10;
    if(res==3) {
      is_3 = true;
    } else if(res==5) {
      is_5 = true;
    } else if(res==7) {
      is_7 = true;
    }
    if(is_3==true && is_5==true && is_7==true) {
      return true;
    }
    n /= 10;
  }
  
  return false;
}
 
long long func(long long n) {  
  if(n>N) {
    return 0;
  }
   
  int res = 0;
  if (is_valid(n)) {
    res = 1;
  }
  
  res += func(n*10+3);
  res += func(n*10+5);
  res += func(n*10+7);
 
  return res;
}
 
int main (){
  cin >> N;
  
  cout << func(0) << endl;  
  return 0;
}
提出情報
提出日時	2019-09-21 09:12:30
問題	

Compiler output:
a.cc:104:22: error: invalid digit "9" in octal constant
  104 | 提出日時        2019-09-21 09:12:30
      |                      ^~
a.cc:104:28: error: invalid digit "9" in octal constant
  104 | 提出日時        2019-09-21 09:12:30
      |                            ^~
a.cc:55:11: error: redefinition of 'long long int N'
   55 | long long N;
      |           ^
a.cc:4:11: note: 'long long int N' previously declared here
    4 | long long N;
      |           ^
a.cc:57:6: error: redefinition of 'bool is_valid(int)'
   57 | bool is_valid(int n) {
      |      ^~~~~~~~
a.cc:6:6: note: 'bool is_valid(int)' previously defined here
    6 | bool is_valid(int n) {
      |      ^~~~~~~~
a.cc:80:11: error: redefinition of 'long long int func(long long int)'
   80 | long long func(long long n) {
      |           ^~~~
a.cc:29:11: note: 'long long int func(long long int)' previously defined here
   29 | long long func(long long n) {
      |           ^~~~
a.cc:97:5: error: redefinition of 'int main()'
   97 | int main (){
      |     ^~~~
a.cc:46:5: note: 'int main()' previously defined here
   46 | int main (){
      |     ^~~~
a.cc:103:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
  103 | 提出情報
      | ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
 
int N;
 
int func(int n, bool has_3, bool has_5, bool has_7) {
  if(n>N) {
    return 0;
  }
  
  int res = 0;
  if (has_3==true && has_5==true && has_7==true) {
    res += 1;
  }
  
  res += func(n*10+3, true, has_5, has_7);
  res += func(n*10+5, has_3, true, has_7);
  res += func(n*10+7, has_3, has_5, true);
 
  return res;
}
 
int main (){
  cin >> N;
  
  cout << func(0, false, false, false); << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:41: error: expected primary-expression before '<<' token
   26 |   cout << func(0, false, false, false); << endl;
      |                                         ^~
Language: C++

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

bool check(const std::string& ss)
{
    if (ss.length() >= 10) return;

    std::string s = ss;

    std::sort(std::begin(s), std::end(s));
    s.erase(std::unique(std::begin(s), std::end(s)), std::end(s));

    return (s == "357");
}

void rec(const std::string& ss, const std::string& n, std::vector<std::string>& c)
{
    if (ss.length() >= 10) return;

    for (int i = 0; i <= ss.length(); i++) {
        std::string s = ss;
        s.insert(i, n);
        c.push_back(s);
        rec(s, "3", c);
        rec(s, "5", c);
        rec(s, "7", c);
    }
}

int main()
{
    long long N;
    std::cin >> N;

    std::vector<std::string> c;
    for (long long i = 357; i <=753; i++) {
        std::string s = std::to_string(i);
        if (check(s)) {
            c.push_back(s);
            rec(s, "3", c);
            rec(s, "5", c);
            rec(s, "7", c);
        }
    }

    std::vector<long long> ll(c.size());
    int i = 0;
    for (auto & s : c) {
        ll[i++] = std::stoll(s);
    }

    std::sort(std::begin(ll), std::end(ll));

    long long ans = 0;
    for (long long i = 0; i < ll.size(); i++) {
        if (ll[i] <= N) ans++;
        else break;
    }


    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'bool check(const std::string&)':
a.cc:8:28: error: return-statement with no value, in function returning 'bool' [-fpermissive]
    8 |     if (ss.length() >= 10) return;
      |                            ^~~~~~
Language: C++

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

bool check(const std::string& ss)
{
    if (ss.length() >= 10) return;

    std::string s = ss;

    std::sort(std::begin(s), std::end(s));
    s.erase(std::unique(std::begin(s), std::end(s)), std::end(s));

    return (s == "357");
}

void rec(const std::string& ss, const std::string& n, std::vector<std::string>& c)
{
    if (ss.length() >= 10) return;

    for (int i = 0; i <= s.length(); i++) {
        std::string s = ss;
        s.insert(i, n);
        c.push_back(s);
        rec(s, "3", c);
        rec(s, "5", c);
        rec(s, "7", c);
    }
}

int main()
{
    long long N;
    std::cin >> N;

    std::vector<std::string> c;
    for (long long i = 357; i <=753; i++) {
        std::string s = std::to_string(i);
        if (check(s)) {
            c.push_back(s);
            rec(s, "3", c);
            rec(s, "5", c);
            rec(s, "7", c);
        }
    }

    std::vector<long long> ll(c.size());
    int i = 0;
    for (auto & s : c) {
        ll[i++] = std::stoll(s);
    }

    std::sort(std::begin(ll), std::end(ll));

    long long ans = 0;
    for (long long i = 0; i < ll.size(); i++) {
        if (ll[i] <= N) ans++;
        else break;
    }


    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'bool check(const std::string&)':
a.cc:8:28: error: return-statement with no value, in function returning 'bool' [-fpermissive]
    8 |     if (ss.length() >= 10) return;
      |                            ^~~~~~
a.cc: In function 'void rec(const std::string&, const std::string&, std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:22:26: error: 's' was not declared in this scope
   22 |     for (int i = 0; i <= s.length(); i++) {
      |                          ^
Language: C++

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

bool check(const std::string& ss)
{
    if (ss.length() >= 10) return;

    std::string s = ss;

    std::sort(std::begin(s), std::end(s));
    s.erase(std::unique(std::begin(s), std::end(s)), std::end(s));

    return (s == "357");
}

void rec(const std::string& ss, const std::string& n, std::vector<std::string>& c)
{
    if (ss.length() >= 10) return;

    for (int i = 0; i <= s.length(); i++) {
        std::string s = ss;
        s.insert(i, n);
        c.push_back(s);
        rec(s, "3", c);
        rec(s, "5", c);
        rec(s, "7", c);
    }
}

int main()
{
    long long N;
    std::cin >> N;

    std::vector<std::string> c;
    for (long long i = 357; i <=753; i++) {
        std::string s = std::to_string(i);
        if (check(s)) {
            c.push_back(s)
            rec(s, "3", c);
            rec(s, "5", c);
            rec(s, "7", c);
        }
    }

    std::vector<long long> ll(c.size());
    int i = 0;
    for (auto & s : c) {
        ll[i++] = std::stoll(s);
    }

    std::sort(std::begin(ll), std::end(ll));

    long long ans = 0;
    for (long long i = 0; i < ll.size(); i++) {
        if (ll[i] <= N) ans++;
        else break;
    }


    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'bool check(const std::string&)':
a.cc:8:28: error: return-statement with no value, in function returning 'bool' [-fpermissive]
    8 |     if (ss.length() >= 10) return;
      |                            ^~~~~~
a.cc: In function 'void rec(const std::string&, const std::string&, std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:22:26: error: 's' was not declared in this scope
   22 |     for (int i = 0; i <= s.length(); i++) {
      |                          ^
a.cc: In function 'int main()':
a.cc:41:27: error: expected ';' before 'rec'
   41 |             c.push_back(s)
      |                           ^
      |                           ;
   42 |             rec(s, "3", c);
      |             ~~~
Language: C++

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

int main()
{
    long long N;
    std::cin >> N;

    long long ans = 0;
    for (int i = 1; i <=N; i++) {
        std::string s = std::to_string(i);
        if (s.length() < 3) continue;

        s.sort(std::begin(s), std::end(s));
        if (s[0] != '3' || s[s.length()-1] != '7') continue;

        bool three = false;
        bool five = false;
        bool seven = false;
        for (int j = 0; j < s.length(); j++) {
            if (s[j] == '3') three = true;
            else if (s[j] == '5') five = true;
            else if (s[j] == '7') seven = true;
            else break;
        }

        if (three && five && seven) ans++;
    }

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sort'
   16 |         s.sort(std::begin(s), std::end(s));
      |           ^~~~
Language: C++

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

int main()
{
    long long N;
    std::cin >> N;

    long long ans = 0;
    for (int i = 1; i <=N; i++) {
        std::string s = std::to_string(i);
        if (s.length() < 3) continue;

        s.sort(std::begin(s), std::end(s));
        if (s[0] != '3' || s[s.length()-1] != '7') continue;

        bool three = false;
        bool five = false;
        bool seven = false;
        for (int j = 0; j < s.length(); j++) {
            if (s[j] == '3') three = true;
            else if (s[j] == '5') five = true;
            else if (s[j] == '7') seven = true;
            else break;
        }

        if (three && five && seven) ans++;
    }

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sort'
   15 |         s.sort(std::begin(s), std::end(s));
      |           ^~~~
Language: Java

import java.util.*;
public class Main{
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int res = 0;
	public static void main(String[] args){
      dfs(0,false,false,false);
      System.out.println(res);
    }
    static void dfs(long num,boolean a,boolean b,boolean c){
    	if(num > n)return;
      if(a&&b&&c)res++;
      dfs(num*10+3,true,b,c);
      dfs(num*10+5,a,true,c);
      dfs(num*10+7,a,b,true);
    }
}

Compiler output:
Main.java:8: error: non-static variable res cannot be referenced from a static context
      System.out.println(res);
                         ^
Main.java:11: error: non-static variable n cannot be referenced from a static context
    	if(num > n)return;
    	         ^
Main.java:12: error: non-static variable res cannot be referenced from a static context
      if(a&&b&&c)res++;
                 ^
3 errors
Language: C++

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

ll n;
int ans=0;
vector<ll> v(2000);

void dfs(int x){
  if(x<1000000000){
    if(x!=0)v.push_back(x);
    dfs(10*x+3);
    dfs(10*x+5);
    dfs(10*x+7);
  }
}

int main(){
  cin>>n;
  dfs(0);
  
  for(auto x:v){
    bool p3=0,p5=0,p7=0;
    while(x>0){
      if(x%10==3)p3=1;
      if(x%10==5)p5=1;
      if(x%10==7)p7=1;
      x/=10;
    }
    if(p1+p2+p3==3)ans++;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:8: error: 'p1' was not declared in this scope; did you mean 'p7'?
   30 |     if(p1+p2+p3==3)ans++;
      |        ^~
      |        p7
a.cc:30:11: error: 'p2' was not declared in this scope; did you mean 'p7'?
   30 |     if(p1+p2+p3==3)ans++;
      |           ^~
      |           p7
Language: C++

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

int itoa(int source) {
    
}

int main() {
    int n;
    int elements[10];
    int current;
    int ans = 0;
    int digits = 0;
    string s;
    
    cin >> n;
    current = n;
    
    for (int i = 0; ; i++) {
        s = itoa(i, 3);
        digits = s.length();
        current = 0;
        
        for (int ii = 0; ii < digits; ii++) {
            current = current * 10;
            
            if (s[ii] == '0') {
                current += 3;
            }
            else if (s[ii] == '1') {
                current += 5;
            }
            else if (s[ii] == '2') {
                current += 7;
            }
        }
        
        cout << "i=" << i << ", s=" << s << ", current=" << current << endl;
        
        if (current > n) {
            break;
        }
        
        for (int ii = 0; ii < 10; ii++) {
            elements[ii] = 0;
        }
        
        while (current) {
            elements[current % 10]++;
            current /= 10;
        }
        
        if (
            (elements[3] > 0) &&
            (elements[5] > 0) &&
            (elements[7] > 0)
        ) {
            ans++;
        }
    }
    
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int itoa(int)':
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^
a.cc: In function 'int main()':
a.cc:21:17: error: too many arguments to function 'int itoa(int)'
   21 |         s = itoa(i, 3);
      |             ~~~~^~~~~~
a.cc:5:5: note: declared here
    5 | int itoa(int source) {
      |     ^~~~
Language: C++

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

int main(){

    int N;cin>>N;
    int ans=0;
    if(log10(N)>=2){
        int flag;
        vector<int> a;

        int k;
        int p;
        for(int i=357;i<=min(777777753,N);i++){
            p=log10(i)+1;
            flag=0;
            k=i;
            a.clear();
            for(int j=0;j<p;j++){
                a.push_back(k%10);
                if(k%10!=3 && k%10!=5 && k%10!=7){
                    flag=1;
                    break;
                }
                k/=10;
            }
            if(flag)continue;
            else{
                int count3=0,count5=0,count7=0;
                for(int j=0;j<a.size();j++){
                    if(a.at(j)==3)count3++;
                    else if(a.at(j)==5)count5++;
                    else count7++;
                }
                if(count3!=0 && count5!=0 && count7!=0){
                    ans++;
                }
            }
        }
    }
    cout<<ans<<endl;

    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope
    6 |     int N;cin>>N;
      |           ^~~
a.cc:8:8: error: 'log10' was not declared in this scope
    8 |     if(log10(N)>=2){
      |        ^~~~~
a.cc:10:9: error: 'vector' was not declared in this scope
   10 |         vector<int> a;
      |         ^~~~~~
a.cc:10:16: error: expected primary-expression before 'int'
   10 |         vector<int> a;
      |                ^~~
a.cc:14:26: error: 'min' was not declared in this scope; did you mean 'main'?
   14 |         for(int i=357;i<=min(777777753,N);i++){
      |                          ^~~
      |                          main
a.cc:18:13: error: 'a' was not declared in this scope
   18 |             a.clear();
      |             ^
a.cc:41:5: error: 'cout' was not declared in this scope
   41 |     cout<<ans<<endl;
      |     ^~~~
a.cc:41:16: error: 'endl' was not declared in this scope
   41 |     cout<<ans<<endl;
      |                ^~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<regex>
#include <string> 

int main(void)
{
  int n, a, i;
  regex b("[357]*");
  scanf("%d", &n);
  for (i = 1;i <= n;n++)
  {
    if (regex_match(std::to_string(i), b))
    {
      a++;
    }
  }
  printf("%d", a)
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'regex' was not declared in this scope; did you mean 'std::__cxx11::regex'?
    9 |   regex b("[357]*");
      |   ^~~~~
      |   std::__cxx11::regex
In file included from /usr/include/c++/14/regex:68,
                 from a.cc:3:
/usr/include/c++/14/bits/regex.h:879:32: note: 'std::__cxx11::regex' declared here
  879 |   typedef basic_regex<char>    regex;
      |                                ^~~~~
a.cc:13:40: error: 'b' was not declared in this scope
   13 |     if (regex_match(std::to_string(i), b))
      |                                        ^
a.cc:18:18: error: expected ';' before 'return'
   18 |   printf("%d", a)
      |                  ^
      |                  ;
   19 |   return 0;
      |   ~~~~~~
Language: C++

/*
ID: espr1t
TASK: 
KEYWORDS: 
*/

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

using namespace std;

const int MAX = 1024;

int ans;
int limit;

void recurse(long long num, int mask) {
    if (num > limit)
        return;
    if ((mask & 7) == 7)
        ans++;
    recurse(num * 10 + 3, mask | 1);
    recurse(num * 10 + 5, mask | 2);
    recurse(num * 10 + 7, mask | 4);
}

int main(void) {
	cin >> limit;
	
	recurse(0, 0);
	cout << ans << "\n";
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:9: error: 'cin' was not declared in this scope
   31 |         cin >> limit;
      |         ^~~
a.cc:12:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   11 | #include <string>
  +++ |+#include <iostream>
   12 | 
a.cc:34:9: error: 'cout' was not declared in this scope
   34 |         cout << ans << "\n";
      |         ^~~~
a.cc:34:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

/*
ID: espr1t
TASK: 
KEYWORDS: 
*/

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

using namespace std;

const int MAX = 1024;

int ans;
int limit;

void recurse(long long num, int mask) {
    if (num > limit)
        return;
    if ((mask & 7) == 7)
        ans++;
    recurse(num * 10 + 3, mask | 1);
    recurse(num * 10 + 5, mask | 2);
    recurse(num * 10 + 7, mask | 4);
}

int main(void) {
	// in = fopen("C.in", "rt");
	
	scanf(in, "%d", &limit);
	
	recurse(0, 0);
	printf(out, "%d\n", ans);
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:15: error: 'in' was not declared in this scope; did you mean 'int'?
   33 |         scanf(in, "%d", &limit);
      |               ^~
      |               int
a.cc:36:16: error: 'out' was not declared in this scope
   36 |         printf(out, "%d\n", ans);
      |                ^~~
Language: Java

import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
	int n = Integer.parseInt(sc.next());
    int ans = 0;
    String s;
    
    for (int i=1; i<n; i+=2){
      s = i.toString(i);
      if (!(s.contains("3")||s.contains("5")||s.contains("7"))) {
        ans++;
      }
    }
    
    System.out.println(ans);

  }
}


Compiler output:
Main.java:11: error: int cannot be dereferenced
      s = i.toString(i);
           ^
1 error
Language: C++

n=int(input())
def dfs(s):
    if int(s)>n:
        return 0 
    if all(s.count(i) for i in '753'):
        ans=1
    else:
        ans=0
    for i in '753':
        ans+=dfs(s+i)
    return ans
print(ans)

Compiler output:
a.cc:5:32: warning: multi-character character constant [-Wmultichar]
    5 |     if all(s.count(i) for i in '753'):
      |                                ^~~~~
a.cc:9:14: warning: multi-character character constant [-Wmultichar]
    9 |     for i in '753':
      |              ^~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <utility>
#include <numeric>
using namespace std;

const string i2c = "753";
const map<char, int> c2i = {{'7', 0}, {'5', 1}, {'3', 2}};

int main() {
    int N; cin >> N;
    int res = 0;

    for (int d = 3; d < 10; d++) {
        for (int b = 0; b < pow(3, d); b++) {
            string S;
            int cb = b;
            for (int i = 0; i < d; ++i) {
                S.push_back(i2c[cb % 3]);
                cb /= 3;
            }
            bool count[3]; fill(count, count + 3, false);
            for (auto c : S) count[c2i[c]] = true;
            bool judge = true;
            for (int i = 0; i < 3; ++i) if (!cnt[i]) judge = false;
            if (!judge) continue;
            if (stoi(S) <= N) res++;
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc:13:7: error: 'map' does not name a type
   13 | const map<char, int> c2i = {{'7', 0}, {'5', 1}, {'3', 2}};
      |       ^~~
a.cc: In function 'int main()':
a.cc:28:36: error: 'c2i' was not declared in this scope
   28 |             for (auto c : S) count[c2i[c]] = true;
      |                                    ^~~
a.cc:30:46: error: 'cnt' was not declared in this scope; did you mean 'int'?
   30 |             for (int i = 0; i < 3; ++i) if (!cnt[i]) judge = false;
      |                                              ^~~
      |                                              int
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(var, n) for (int var = 0; var < (n); ++var)

vector<int> num_to_vec(int x, int base = 10) {
    if (x == 0) return vector<int>{0};
    vector<int> v;
    while (x) {
        int q = x / base, r = x % base;
        v.push_back(r);
        x = q;
    }
    reverse(v.begin(), v.end());
    return v;
}

int solve(int N) {
    vector<int> a = num_to_vec(N, 10);
    int K = a.size();

    int dp[K + 1][2][2][2][2][2][2];
    mset(dp, 0);

    dp[0][0][0][0][0][0][0] = 1;

    rep(i, K) rep(j, 2) rep(k, 2) rep(l, 2) rep(m, 2) rep(n, 2) rep(o, 2) {
        int lim = j ? 9 : a[i];
        rep(d, lim + 1) {
            bool non357 = n ? (d != 3 && d != 5 && d != 7)
                            : (d != 0 && d != 3 && d != 5 && d != 7);
            dp[i + 1][j || d < lim][k || d == 7][l || d == 5][m || d == 3][n || d][o || non357]
               += dp[i][j][k][l][m][n][o];
        }
    }

    int ans = 0;
    rep(j, 2) rep(k, 2) rep(l, 2) rep(m, 2) rep(n, 2) rep(o, 2) {
        if (k == 1 && l == 1 && m == 1 && o == 0) ans += dp[K][j][k][l][m][n][o];
    }
    return ans;
}

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

Compiler output:
a.cc: In function 'int solve(int)':
a.cc:22:5: error: 'mset' was not declared in this scope
   22 |     mset(dp, 0);
      |     ^~~~
Language: Java

vimport java.util.*;
import java.text.*;

public class Main {
    static long n;
    static int ans;
    public static void main(String[] args) throws Exception{
      Scanner sc = new Scanner(System.in);
      n = sc.nextLong();

      dfs(0);

      System.out.println(ans);
    }
    public static void dfs(long x) {
      System.out.println(x);
      if (x > n) {
        return;
      }
      String x_str = String.valueOf(x);
      if(x_str.contains("7") && x_str.contains("5") &&x_str.contains("3")) {
        ans++;
      }
      dfs(10 * x + 7);
      dfs(10 * x + 5);
      dfs(10 * x + 3);
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
vimport java.util.*;
^
Main.java:2: error: class, interface, enum, or record expected
import java.text.*;
^
2 errors
Language: C++

n = int(input())

a = []


def func(s):
    if s:
        a.append(int(s))
    if len(s) == len(str(n)):
        return
    func(s + '3')
    func(s + '5')
    func(s + '7')


func('')

print(len([x for x in a if x <= n and len(set(str(x))) == 3]))


Compiler output:
a.cc:16:6: error: empty character constant
   16 | func('')
      |      ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

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

int N;

unsigned int GetDigit(long long N){
  std::string s = std::to_string(N);
  int digit = (int)s.size();
  return digit;
}

int make_num(int depth, long long Num){
  if(depth == 0){
    std::string num_str = std::to_string(Num);
    if((int)num_str.size()<=2){
      return 0;
    }
    bool check3 = std::any_of(num_str.begin(), num_str.end(), [](char c){return c == '3';});
    bool check5 = std::any_of(num_str.begin(), num_str.end(), [](char c){return c == '5';});
    bool check7 = std::any_of(num_str.begin(), num_str.end(), [](char c){return c == '7';});
    bool check0 = std::none_of(num_str.begin(), num_str.end(), [](char c){return c == '0';});
    if(check3 + check5 + check7 + check0 == 4){
      if(Num <= N){
		return 1;
      }else{
		return 0;
      }
    }else{
      return 0;
    }
  }
  int num3 = std::pow(10 ,depth - 1) * 3 + Num;
  int num5 = std::pow(10 ,depth - 1) * 5 + Num;
  int num7 = std::pow(10 ,depth - 1) * 7 + Num;
  int num0 = std::pow(10 ,depth - 1) * 0 + Num; 
  int init3 = make_num(depth - 1, num3);
  int init5 = make_num(depth - 1, num5);
  int init7 = make_num(depth - 1, num7);
  int init0 = make_num(depth - 1, num0);
  return init3 + init5 + init7 + init0;
}

int main(){
  std::cin >> N;
  int digit = GetDigit(N);
  if(digit <= 2){
    std::cout<< 0 << std::endl;
    return 0;
  }
  int num_753 = 0;
  num_753 += make_num(digit, 0);
  std::cout << num_753 << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int make_num(int, long long int)':
a.cc:21:24: error: 'any_of' is not a member of 'std'
   21 |     bool check3 = std::any_of(num_str.begin(), num_str.end(), [](char c){return c == '3';});
      |                        ^~~~~~
a.cc:22:24: error: 'any_of' is not a member of 'std'
   22 |     bool check5 = std::any_of(num_str.begin(), num_str.end(), [](char c){return c == '5';});
      |                        ^~~~~~
a.cc:23:24: error: 'any_of' is not a member of 'std'
   23 |     bool check7 = std::any_of(num_str.begin(), num_str.end(), [](char c){return c == '7';});
      |                        ^~~~~~
a.cc:24:24: error: 'none_of' is not a member of 'std'
   24 |     bool check0 = std::none_of(num_str.begin(), num_str.end(), [](char c){return c == '0';});
      |                        ^~~~~~~
Language: C++

#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a,int b){return a*b/gcd(a,b);}

using namespace std;

const int mod=1e9+7;

void run();

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

signed f(int num){
    if(num%2==0)return num/2;
    else return num*3+1;
}

void run(){
    int n;
    cin >> n;
    int ans=1;
    while(n!=0)
    {
        if(n%10>=7||n%10==0)
        {
            ans*=3;
        }
        else if(n%10>=5)
        {
            ans*=2
        }
        n/=10;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'void run()':
a.cc:57:19: error: expected ';' before '}' token
   57 |             ans*=2
      |                   ^
      |                   ;
   58 |         }
      |         ~
Language: C++

n = int(input())

def dfs(s):
    if int(s) > n:
        return 0
#     print(s)
    ret = 1 if all(s.count(c) > 0 for c in "753") else 0
    for c in "753":
        ret += dfs(s + c)
    return ret

print(dfs('0'))#avoid line4's contition
        

Compiler output:
a.cc:6:7: error: invalid preprocessing directive #print
    6 | #     print(s)
      |       ^~~~~
a.cc:12:16: error: stray '#' in program
   12 | print(dfs('0'))#avoid line4's contition
      |                ^
a.cc:12:28: warning: missing terminating ' character
   12 | print(dfs('0'))#avoid line4's contition
      |                            ^
a.cc:12:28: error: missing terminating ' character
   12 | print(dfs('0'))#avoid line4's contition
      |                            ^~~~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n =1e9,c=0;
set<int> st;
int a[3]={3,5,7};
int b[4]={3,3,5,7};
int c[4]={3,5,5,7};
int d[4]={3,5,7,7};
int main(){
	int x;
	cin>>x;
	do{
		st.insert(a[0]*100+a[1]*10+a[2]);
	}while(next_permutation(a,a+3));
	do{
		st.insert(b[0]*1000+b[1]*100+b[2]*10+b[3]);
	}while(next_permutation(a,a+4));
	do{
		st.insert(c[0]*1000+c[1]*100+c[2]*10+c[3]);
	}while(next_permutation(a,a+4));
	do{
		st.insert(d[0]*1000+d[1]*100+d[2]*10+d[3]);
	}while(next_permutation(a,a+4));
	for(set<int>::iterator it=st.begin();it!=st.end();it++){
		if(*it<x) c++;
	}	
	printf("%d",c);
	return 0;
}

Compiler output:
a.cc:7:5: error: conflicting declaration 'int c [4]'
    7 | int c[4]={3,5,5,7};
      |     ^
a.cc:3:12: note: previous declaration as 'int c'
    3 | int n =1e9,c=0;
      |            ^
a.cc: In function 'int main()':
a.cc:19:28: error: invalid types 'int[int]' for array subscript
   19 |                 st.insert(c[0]*1000+c[1]*100+c[2]*10+c[3]);
      |                            ^
a.cc:19:38: error: invalid types 'int[int]' for array subscript
   19 |                 st.insert(c[0]*1000+c[1]*100+c[2]*10+c[3]);
      |                                      ^
a.cc:19:47: error: invalid types 'int[int]' for array subscript
   19 |                 st.insert(c[0]*1000+c[1]*100+c[2]*10+c[3]);
      |                                               ^
a.cc:19:55: error: invalid types 'int[int]' for array subscript
   19 |                 st.insert(c[0]*1000+c[1]*100+c[2]*10+c[3]);
      |                                                       ^
Language: C

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

int xianqi(int num){
	int res=0,flag=0;
	int count7=0,count5=0,count3=0;
	while(num!=0){
		if(num%10==7||num%10==5||num%10==3){
			if(num%10==7){
				count7=1;
			}
			if(num%10==5){
				count5=1;
			}
			if(num%10==3){
				count3=1;
			}
			num /= 10;
		}else{
			flag = 1;
			break;
		}
	}
	
	if(flag!=1&&count7==1&&count5==1&&count3==1){
		res=1;
	}
	return res;
}


int main(){
	int i,T,res=0;
	scanf("%d",&T);
	
	if(T>700000000){
		res = 20434;
		for(i=700000000;i<=T;i++){
			res += xianqi(i);
		}
	}else if(T>500000000){
		res = 14384;
		for(i=400000000;i<=T;i++){
			res += xianqi(i);
		}
	}else if(T>300000000){
		res = 8334;
		for(i=300000000;i<=T;i++){
			res += xianqi(i);
		}
	}else{
		for(i=357;i<=T;i++){
			res += xianqi(i);
		}
	}
	printf("%d",res);
	return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

N = int(input())
Nstr = str(N)

def dfs(s):
  if(int(s) > N):
    return 0
  
  ret = 1 if all(s.count(c) > 0 for c in '753') else 0
  for c in '753':
    ret+=dfs(s+c)
    
  return ret

print(dfs('0'))

Compiler output:
a.cc:8:42: warning: multi-character character constant [-Wmultichar]
    8 |   ret = 1 if all(s.count(c) > 0 for c in '753') else 0
      |                                          ^~~~~
a.cc:9:12: warning: multi-character character constant [-Wmultichar]
    9 |   for c in '753':
      |            ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define repr(i,n) for(inti=(n)-1;i>=0;i--)

int ret,n;



void dfs(int x,int x3=0,int x5=0,int x7=0){
	if (x>n)return;

		if(x3>0 && x5>0 && x7>0)ret++;		
		dfs(10*x+3,x3+1,x5,x7);
		dfs(10*x+5,x3,x5+1,x7);
		dfs(10*x+7,x3,x5,x7+1);

	}

}

int main(){
	cin>>n;
	ret=0;
	dfs(0);
	cout<<ret<<endl;	

	}	



Compiler output:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define repr(i,n) for(inti=(n)-1;i>=0;i--)

int ret,n;

void dfs(int x){
	if (x<=n){
		if(is357(x))ret++;
		dfs(10*x+3);
		dfs(10*x+5);
		dfs(10*x+7);

	}

}


bool is357(int x){
	map<int,int>cnt;
	while(x>0){
		cnt[x%10]++;
		x/=10;
	}
	if (cnt[3]>0&&cnt[5]>0&&cnt[7]>0)return true;
	else return false;
}



int main(){
	cin>>n;
	ret=0;
	dfs(0);
	cout<<ret<<endl;	

	}	



Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:10:20: error: 'is357' was not declared in this scope
   10 |                 if(is357(x))ret++;
      |                    ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define repr(i,n) for(inti=(n)-1;i>=0;i--)

int ret,n;

void dfs(int x){
	if (x<=n){
		if(is357(x))ret++;
		dfs(10*x+3);
		dfs(10*x+5);
		dfs(10*x+7);

	}

}


bool is357(int x){
	map<int,int>cnt;
	while(x>0){
		cnt[x%10]++;
		x/=10;
	}
	if (cnt[3]>0&&cnt[5]>0&&cnt[7]>0)return true;
	else return false;
}



int main(){
	cin>>n;
	ret=0;
	dfs(0);
	cout<<ret<<endl;	

	}	



vector

}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:10:20: error: 'is357' was not declared in this scope
   10 |                 if(is357(x))ret++;
      |                    ^~~~~
a.cc: At global scope:
a.cc:44:1: error: expected unqualified-id before '}' token
   44 | }
      | ^
a.cc:44:1: error: expected declaration before '}' token
Language: C++

//hinagata.cpp
/*includes*/
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <stdio.h>
#include <numeric>
#include <iomanip>
#include <limits>
/*namespace*/
using namespace std;
using lint=long long;
/*define macro*/
#define REP(i,n) for(int i=0;i<(n);i++)
#define REPi(i,a,b) for(int i=(a);i<(b);i++)
#define REPRi(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(x) (x).begin(),(x).end()
int N;
#define RADIX 2;//0-index;

int shichi(vector<int> &A,int dizit){
    int rad=RADIX;
    vector<int> trinary(dizit);
    REP(i,pow(3,dizit)){
        int K=0;
        REP(i,dizit){
            if(trinary[i]==0){
                K+=3*pow(10,i);
            }else if(trinary[i]==1){
                K+=5*pow(10,i);
            }else{
                K+=7*pow(10,i);
            }
        }
        A.push_back(K);
        int carry=1;
        REPRi(i,dizit-1,-1){
            if(carry==1&&trinary[i]<rad){
                trinary[i]+=1;
                carry=0;
            }else if(carry==1&&trinary[i]==rad){
                trinary[i]=0;
            }
        }
        if(carry==1){
            break;
        }
    }
    return 0;
}


int main(){
    int N;
    cin>>N;
    vector<int> A;
    REPi(i,3,10){
        shichi(A,i);
    }
    int ans;
    REP(i,A.size()){
        string S=to_string(A[i]);
        if(S.find('7')!=SIZE_T_MAX&&S.find('5')!=SIZE_T_MAX&&S.find('3')!=SIZE_T_MAX){
            if(N>=A[i]){
                ans+=1;
            }
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:25: error: 'SIZE_T_MAX' was not declared in this scope
   66 |         if(S.find('7')!=SIZE_T_MAX&&S.find('5')!=SIZE_T_MAX&&S.find('3')!=SIZE_T_MAX){
      |                         ^~~~~~~~~~
Language: C++

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

const int MOD = 1000000007;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

//最大公約数 
unsigned gcd(unsigned a, unsigned b) {
  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}

void dfs(ll x, bool flag3, bool flag5, bool flag7){
    if(x > N) return;
    if(flag3 && flag5 && flag7) ans++;

    dfs(10 * x + 3, true, flag5, flag7);
    dfs(10 * x + 5, flag3, true, flag7);
    dfs(10 * x + 7, flag3, flag5, true);

}

}
  
int main() {
int N;
cin >> N;

dfs(0, 0, 0, 0);

print(ans);



}

Compiler output:
a.cc: In function 'void dfs(ll, bool, bool, bool)':
a.cc:34:12: error: 'N' was not declared in this scope
   34 |     if(x > N) return;
      |            ^
a.cc:35:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |     if(flag3 && flag5 && flag7) ans++;
      |                                 ^~~
      |                                 abs
a.cc: At global scope:
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
a.cc: In function 'int main()':
a.cc:51:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 | print(ans);
      |       ^~~
a.cc:10:26: note: in definition of macro 'print'
   10 | #define print(x) cout << x << endl
      |                          ^
Language: C++

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

int main(){
  long long n; cin>>n;
  int ans=0;
  for(int i=1;i<=n;i++){
    int thr=0,fiv=0,sev=0;
    for(int j=0;j<i.size();j++){
      if(i%10==3){thr++;i/=10;}
      else if(i%10==5){fiv++;i/=10;}
      else if(i%10==7){sev++;i/=10;}
      else{
        thr=0;
        fiv=0;
        sev=0;
        break;
      }
    }
    if(thr>=1&&fiv>=1&&sev>=1)ans++;
  }
  cout<<ans<<endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: request for member 'size' in 'i', which is of non-class type 'int'
    9 |     for(int j=0;j<i.size();j++){
      |                     ^~~~
Language: C++

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

int main(){
  long long n; cin>>n;
  int ans=0;
  for(int i=1;i<=n;i++){
    int thr=0,fiv=0,sev=0;
    for(int j=0;j<i.length();j++){
      if(i%10==3){thr++;i/=10;}
      else if(i%10==5){fiv++;i/=10;}
      else if(i%10==7){sev++;i/=10;}
      else{
        thr=0;
        fiv=0;
        sev=0;
        break;
      }
    }
    if(thr>=1&&fiv>=1&&sev>=1)ans++;
  }
  cout<<ans<<endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: request for member 'length' in 'i', which is of non-class type 'int'
    9 |     for(int j=0;j<i.length();j++){
      |                     ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

long long N;

void func(long long a, int flag, long long counter){
    /*ベースケース */
    if(a > N) return;
    /*753フラグが立ってる時にcounter増やす */
    if(falg = 0b111) counter++;

    /*7を付け足す */
    func(a * 10 + 7, flag | 0b001, counter);

    /*この時点で7スタートのカウントができてる */

    /*5を付け足す */
    func(a * 10 + 5, flag | 0b010, counter);

    /*この時点で以下略 */

    /*3を付け足す */
    func(a * 10 + 3, flag | 0b100, counter);

    /*値を返さないvoid関数だが、counterが答えに変わってる */
}

int main() {
    cin >> N;
    long long res = 0;
    func(0, 0, res);
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'void func(long long int, int, long long int)':
a.cc:11:8: error: 'falg' was not declared in this scope; did you mean 'flag'?
   11 |     if(falg = 0b111) counter++;
      |        ^~~~
      |        flag
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <string>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
int n,ans;
int dfs(int sum, int cnt3, int cnt5, int cnt7) {
	if (sum > n) return;
	if (cnt3 > 0 || cnt5 > 0 || cnt7 > 0) ans++;
	dfs(sum * 10 + 3, cnt3 + 1, cnt5, cnt7);
	dfs(sum * 10 + 5, cnt3, cnt5 + 1, cnt7);
	dfs(sum * 10 + 7, cnt3, cnt5, cnt7 + 1);
}
int main() {
	cin >> n;
	dfs(0, 0, 0, 0);
	cout << ans << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int dfs(int, int, int, int)':
a.cc:10:22: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |         if (sum > n) return;
      |                      ^~~~~~
a.cc:14:12: warning: control reaches end of non-void function [-Wreturn-type]
   14 |         dfs(sum * 10 + 7, cnt3, cnt5, cnt7 + 1);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

using namespace std;

const int DFS(const int digit, const int rem, const bool used3, const bool used5, const bool used7)
{
    if (rem == 0)
    {
        if (used3 && used5 && used7)
        {
            return 1;
        }
        else
        {
            return 0;
        }
    }
    if (rem / digit < 3)
    {
        return DFS(digit / 10, digit - 1, false, false, false);
    }
    else if (rem / digit == 3)
    {
        return DFS(digit / 10, rem - digit * 3, true, used5, used7);
    }
    else if (rem / digit < 5)
    {
        return DFS(digit / 10, digit - 1, true, used5, used7);
    }
    else if (rem / digit == 5)
    {
        return DFS(digit / 10, digit - 1, true, used5, used7)
            + DFS(digit / 10, rem - digit * 5, used3, true, used7);
    }
    else if (rem / digit < 7)
    {
        return DFS(digit / 10, digit - 1, true, used5, used7)
            + DFS(digit / 10, digit - 1, used3, true, used7);
    }
    else if (rem / digit == 7)
    {
        return DFS(digit / 10, digit - 1, true, used5, used7)
            + DFS(digit / 10, digit - 1, used3, true, used7)
            + DFS(digit / 10, rem - digit * 7, used3, used5, true);
    }
    else
    {
        return DFS(digit / 10, digit - 1, true, used5, used7)
            + DFS(digit / 10, digit - 1, used3, true, used7)
            + DFS(digit / 10, digit - 1, used3, used5, true);
    }
}

int main()
{
    string N;
    cin >> N;
    int len = N.length() - 1;
    int digit = static_cast<int>(pow(10, len));
    cout << DFS(digit, stoi(N), false, false, false) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:34: error: 'pow' was not declared in this scope
   63 |     int digit = static_cast<int>(pow(10, len));
      |                                  ^~~
Language: C++

# 2019/06/08
# AtCoder Beginner Contest 114 - C

def makeval(in_sn):
    div = int(in_sn / 4)
    rem = in_sn % 4
    if div == 0:
        if rem == 0:
            return "X"
        elif rem == 1:
            return "3"
        elif rem == 2:
            return "5"
        elif rem == 3:
            return "7"
    else:
        ret = makeval(div)
        if rem == 0:
            return ret + "3"
        elif rem == 1:
            return ret + "5"
        elif rem == 2:
            return ret + "7"
        elif rem == 3:
            return "X"
# Input
n = int(input())

wval = 1
cnt = 0
idx = 1

while(wval <= n):
    wstr = makeval(idx)
    if ("X" in wstr) == False:
        if ("3" in wstr) == True and ("5" in wstr) == True and ("7" in wstr) == True :
            wval = int(wstr)
            cnt += 1
    
    idx += 1

cnt -= 1

# Output
print(cnt)


Compiler output:
a.cc:1:7: error: "/" is not a valid filename
    1 | # 2019/06/08
      |       ^
a.cc:2:3: error: invalid preprocessing directive #AtCoder
    2 | # AtCoder Beginner Contest 114 - C
      |   ^~~~~~~
a.cc:26:3: error: invalid preprocessing directive #Input
   26 | # Input
      |   ^~~~~
a.cc:44:3: error: invalid preprocessing directive #Output
   44 | # Output
      |   ^~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def makeval(in_sn):
      | ^~~
Language: C++

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

int N;

int count_753(int n) {
  if (n > N) {
    return 0;
  }
  
  int digits = 1;
  while (n > pow(10, digits)) {
    digits++;
  }
  
  int factor = pow(10, digits);
  
  return 1 + count_753(n + 3 * factor) + count_753(n + 5 * factor) + count_753(n + 7 * factor);
}

int main() {
  cin >> N;
  
  int nums = {357, 375, 537, 573, 735, 753};
  int total = 0;
  
  for (int i = 0; i < 6; i++) {
    total += count_753(nums[i]);
  }
  
  cout << total << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: scalar object 'nums' requires one element in initializer
   24 |   int nums = {357, 375, 537, 573, 735, 753};
      |       ^~~~