Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#define int long long
using namespace std;
int kt(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
signed main() {
 	int N;
 	cin >> N;
 	int answer = 100;
 	for(int i = 1;i * i <= N;i++) {
 		if(N % i == 0) {
 			int A = N / i;
 			int count =kt(a);
 			}
 			answer = min(answer,count);
 		}
 	}
 	cout << answer << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:39: error: 'a' was not declared in this scope
   23 |                         int count =kt(a);
      |                                       ^
a.cc:25:37: error: no matching function for call to 'min(long long int&, <unresolved overloaded function type>)'
   25 |                         answer = min(answer,count);
      |                                  ~~~^~~~~~~~~~~~~~
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:233:5: note: candidate: 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = long long int]'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const long long int&'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |                         ~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:25:37: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   25 |                         answer = min(answer,count);
      |                                  ~~~^~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:28:9: error: 'cout' does not name a type
   28 |         cout << answer << endl;
      |         ^~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^