Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
    int N;
    string S;
    cin >> N >> S;

    int ans = 0;
    for (int i = 0; i < 10; i++)
    {
        for (int j = 0; j < 10; j++)
        {
            for (int k = 0; k < 10; k++)
            {
                if (find(S.begin(), S.end(), '0' + i) != S.end())
                {
                    if (find(find(S.begin(), S.end(), '0' + i) + 1, S.end(), '0' + j) != S.end())
                    {
                        if (find(find(find(S.begin(), S.end(), '0' + i) + 1, S.end(), '0' + j) + 1, S.end(), '0' + k) != S.end())
                        {
                            ans++;
                        }
                    }
                }
            }
        }
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, int)'
   19 |                 if (find(S.begin(), S.end(), '0' + i) != S.end())
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:19:25: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   19 |                 if (find(S.begin(), S.end(), '0' + i) != S.end())
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:21:34: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, int)'
   21 |                     if (find(find(S.begin(), S.end(), '0' + i) + 1, S.end(), '0' + j) != S.end())
      |                              ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:21:34: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   21 |                     if (find(find(S.begin(), S.end(), '0' + i) + 1, S.end(), '0' + j) != S.end())
      |                              ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:23:43: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, int)'
   23 |                         if (find(find(find(S.begin(), S.end(), '0' + i) + 1, S.end(), '0' + j) + 1, S.end(), '0' + k) != S.end())
      |                                       ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:23:43: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   23 |                         if (find(find(find(S.begin(), S.end(), '0' + i) + 1, S.end(), '0' + j) + 1, S.end(), '0' + k) != S.end())
      |                                       ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~