Language: C++

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

bool check(int x){
  bool lack3=true , lack5=true, lack7=true;
  
  while(x>0){
    if(x%10==3)
      lack3=false;
    if(x%10==5)
      lack5=false;
    if(x%10==7)
      lack7=false;
    x/=10;
  }
  
  if(lack3||lack5||lack7)
    return true;
  else
    return false;
}


int count(int x,int n){
  int c=0;
  
  if(x>n)
    return 0;
  
  
  c+= count(10*x+3)+count(10*x+5)+count(10*x+7);
  
  if(check(x))
    return c;
  else
    return c+1;
  
}


int main(){
  int n;
  cin>>n;
  
  cout<<count(0,n);
}


  

Compiler output:
a.cc: In function 'int count(int, int)':
a.cc:31:12: error: no matching function for call to 'count(int)'
   31 |   c+= count(10*x+3)+count(10*x+5)+count(10*x+7);
      |       ~~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: candidate: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note:   candidate expects 4 arguments, 1 provided
a.cc:24:5: note: candidate: 'int count(int, int)'
   24 | int count(int x,int n){
      |     ^~~~~
a.cc:24:5: note:   candidate expects 2 arguments, 1 provided
a.cc:31:26: error: no matching function for call to 'count(int)'
   31 |   c+= count(10*x+3)+count(10*x+5)+count(10*x+7);
      |                     ~~~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: candidate: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note:   candidate expects 4 arguments, 1 provided
a.cc:24:5: note: candidate: 'int count(int, int)'
   24 | int count(int x,int n){
      |     ^~~~~
a.cc:24:5: note:   candidate expects 2 arguments, 1 provided
a.cc:31:40: error: no matching function for call to 'count(int)'
   31 |   c+= count(10*x+3)+count(10*x+5)+count(10*x+7);
      |                                   ~~~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: candidate: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note:   candidate expects 4 arguments, 1 provided
a.cc:24:5: note: candidate: 'int count(int, int)'
   24 | int count(int x,int n){
      |     ^~~~~
a.cc:24:5: note:   candidate expects 2 arguments, 1 provided