Language: C++

#include<iostream>
#include<cmath>

using namespace std;

unsigned long long int N, l, max = 9999999999999;

unsigned long long int ten(unsigned long long int ou);

int main(){
	for(unsigned long long int i ;i < sqrt(N); i++){
		if(N % i==0 ){
			l = ten(N/i);
			if(l < max) max = l;
		}
	}
	cout << max;
}

unsigned long long int ten(unsigned long long int ou){
	unsigned long long int i;
	for(i = 1; ;i++){
		ou /= 10;
		if(in == 0) break;
	}
	return i;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: reference to 'max' is ambiguous
   14 |                         if(l < max) max = l;
      |                                ^~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:30: note:                 'long long unsigned int max'
    6 | unsigned long long int N, l, max = 9999999999999;
      |                              ^~~
a.cc:14:37: error: reference to 'max' is ambiguous
   14 |                         if(l < max) max = l;
      |                                     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:30: note:                 'long long unsigned int max'
    6 | unsigned long long int N, l, max = 9999999999999;
      |                              ^~~
a.cc:17:17: error: reference to 'max' is ambiguous
   17 |         cout << max;
      |                 ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:30: note:                 'long long unsigned int max'
    6 | unsigned long long int N, l, max = 9999999999999;
      |                              ^~~
a.cc: In function 'long long unsigned int ten(long long unsigned int)':
a.cc:24:20: error: 'in' was not declared in this scope; did you mean 'i'?
   24 |                 if(in == 0) break;
      |                    ^~
      |                    i