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

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


int main(){
    long long n;
    cin >> n;
    int note = 100;
    for (int i=1; i <= sqrt(n)+1;i++){
        if (n%i == 0){
			long long b = n/i;
			int a = to_string(max(i,b)).length();
			note = min(note,a);
        }
    }
    cout << note << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:46: error: no matching function for call to 'max(int&, long long int&)'
   12 |                         int a = to_string(max(i,b)).length();
      |                                           ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:46: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   12 |                         int a = to_string(max(i,b)).length();
      |                                           ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: '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:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:46: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |                         int a = to_string(max(i,b)).length();
      |                                           ~~~^~~~~
Language: C++

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


int main(){
    long long n;
    cin >> n;
    int note = 100;
    for (int i=1; i <= sqrt(n)+1;i++){
        if (n%i == 0){
			long long b = n/i;
			int a = to_string(max(i,b)).length();
			note = min(note,a);
        }
    }
    cout << note << endl;
	cout << max(1,1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:46: error: no matching function for call to 'max(int&, long long int&)'
   12 |                         int a = to_string(max(i,b)).length();
      |                                           ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:46: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   12 |                         int a = to_string(max(i,b)).length();
      |                                           ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: '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:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:46: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |                         int a = to_string(max(i,b)).length();
      |                                           ~~~^~~~~
Language: C++

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

int main(){
    int n;
    cin >> n;
    vector<int> note(0);
    for (int i=1; i <= n**0.5+1,i++){
        if (n%i == 0){
            int a = to_string( max(i,n/i) ).length();
            note.push_back(a);
        }
    }
    cout << min(note) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: invalid type argument of unary '*' (have 'double')
    8 |     for (int i=1; i <= n**0.5+1,i++){
      |                          ^~~~
a.cc:8:36: error: expected ';' before ')' token
    8 |     for (int i=1; i <= n**0.5+1,i++){
      |                                    ^
      |                                    ;
a.cc:14:16: error: no matching function for call to 'min(std::vector<int>&)'
   14 |     cout << min(note) << endl;
      |             ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/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, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/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:   template argument deduction/substitution failed:
a.cc:14:16: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   14 |     cout << min(note) << endl;
      |             ~~~^~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;

int c_get_keta(long long int a) {
	int a_cnt = 0;
	while (a > 0){
		a_cnt++;
		a /= 10;
	}

	return a_cnt;
}

void c_digits_in_multiplication(void) {
	long long int n;
	int min_tmp;
	int ans_min = 10000000;
	cin >> n;
	int n_end = int(sqrt(long double(n)));

	for (long long int a = 1; a <= (n_end); a++) {
		if (n % a != 0) continue;
		//cout << a << endl;
		long long int b = n / a;
		if (a > b) {
			min_tmp = c_get_keta(a);
		}
		else {
			min_tmp = c_get_keta(b);
		}
		//cout << "n, a,b:" << n<<","<<a << "," << b << endl;
		if (min_tmp < ans_min) ans_min = min_tmp;
	}

	cout << ans_min << endl;
}

int main()
{
	c_digits_in_multiplication();
    return 0;
}

Compiler output:
a.cc: In function 'void c_digits_in_multiplication()':
a.cc:23:21: error: expected primary-expression before 'int'
   23 |         int n_end = int(sqrt(long double(n)));
      |                     ^~~
Language: C++

#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;

int c_get_keta(long long int a) {
	int a_cnt = 0;
	while (a > 0){
		a_cnt++;
		a /= 10;
	}

	return a_cnt;
}

void c_digits_in_multiplication(void) {
	long long int n;
	int min_tmp;
	int ans_min = 10000000;
	cin >> n;
	long long int n_end = long(long( int(sqrt(long double(n)))));

	for (long long int a = 1; a <= (n_end); a++) {
		if (n % a != 0) continue;
		//cout << a << endl;
		long long int b = n / a;
		if (a > b) {
			min_tmp = c_get_keta(a);
		}
		else {
			min_tmp = c_get_keta(b);
		}
		//cout << "n, a,b:" << n<<","<<a << "," << b << endl;
		if (min_tmp < ans_min) ans_min = min_tmp;
	}

	cout << ans_min << endl;
}

int main()
{
	c_digits_in_multiplication();
    return 0;
}

Compiler output:
a.cc: In function 'void c_digits_in_multiplication()':
a.cc:23:31: error: expected primary-expression before 'long'
   23 |         long long int n_end = long(long( int(sqrt(long double(n)))));
      |                               ^~~~
Language: C++

#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;

int c_get_keta(long long int a) {
	int a_cnt = 0;
	while (a > 0){
		a_cnt++;
		a /= 10;
	}

	return a_cnt;
}

void c_digits_in_multiplication(void) {
	long long int n;
	int min_tmp;
	int ans_min = 10000000;
	cin >> n;
	long long int n_end = long int(sqrt(long double(n)));

	for (long long int a = 1; a <= (n_end); a++) {
		if (n % a != 0) continue;
		//cout << a << endl;
		long long int b = n / a;
		if (a > b) {
			min_tmp = c_get_keta(a);
		}
		else {
			min_tmp = c_get_keta(b);
		}
		//cout << "n, a,b:" << n<<","<<a << "," << b << endl;
		if (min_tmp < ans_min) ans_min = min_tmp;
	}

	cout << ans_min << endl;
}

int main()
{
	c_digits_in_multiplication();
    return 0;
}

Compiler output:
a.cc: In function 'void c_digits_in_multiplication()':
a.cc:23:31: error: expected primary-expression before 'long'
   23 |         long long int n_end = long int(sqrt(long double(n)));
      |                               ^~~~
Language: C++

#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;

int c_get_keta(long long int a) {
	int a_cnt = 0;
	while (a > 0){
		a_cnt++;
		a /= 10;
	}

	return a_cnt;
}

void c_digits_in_multiplication(void) {
	long long int n;
	int min_tmp;
	int ans_min = 10000000;
	cin >> n;
	long long int n_end = long long int(sqrt(long double(n)));

	for (long long int a = 1; a <= (n_end); a++) {
		if (n % a != 0) continue;
		//cout << a << endl;
		long long int b = n / a;
		if (a > b) {
			min_tmp = c_get_keta(a);
		}
		else {
			min_tmp = c_get_keta(b);
		}
		//cout << "n, a,b:" << n<<","<<a << "," << b << endl;
		if (min_tmp < ans_min) ans_min = min_tmp;
	}

	cout << ans_min << endl;
}

int main()
{
	c_digits_in_multiplication();
    return 0;
}

Compiler output:
a.cc: In function 'void c_digits_in_multiplication()':
a.cc:23:31: error: expected primary-expression before 'long'
   23 |         long long int n_end = long long int(sqrt(long double(n)));
      |                               ^~~~
Language: C++

from math import sqrt
n = int(input())
n2 = n
pfs = []
i = 2
while n2 > 0 and n2 >= i:
    if n2 % i == 0:
        n2 //= i
        pfs.append(i)
    else:
        i += 1

a, b = 1, 1
for i in range(len(pfs)-1, -1, -1):
    c = pfs[i]
    if a <= b:
        a *= c
    else:
        b *= c

def digits(n):
    ans = 0
    while n > 0:
        ans += 1
        n //= 10
    return ans

print (max(digits(a), digits(b)))

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from math import sqrt
      | ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include <iomanip>
#include <cmath>
#include <string.h>
#include <stdio.h>

using namespace std;



int main(){

	int A, B, C, X, Y;
	cin >> A >> B >> X >> Y;
 
	int res = A*X + B*Y;
  	for(int i=1; i<= max(X, Y); i++){
    	int ab = i*2;
      	int candC*ab + A*(X-i) +B*(Y-i);
    }
  
  cout << res << endl;
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: expected initializer before '*' token
   21 |         int candC*ab + A*(X-i) +B*(Y-i);
      |                  ^
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		long res = Long.MAX_VALUE;
		for (long i = 1; i <= n; i++) {
			if (n % i == 0) {
				int tmpRes = 
						Math.max(
								String.valueOf(i).length(), 
								String.valueOf(n / i).length());
				if (tmpRes < res)
					res = tmpRes;
			}
		}
		System.out.println(res);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main(){
  int N;
  cin >> N;
  int A,B;
  N=A*B;
  
  for(int i=0;i<10000000000;i++){
   
    A=i;
    int Ad=0;
   while(Ad>0){
    Ad=A/10;Ad++;
  }
  
    B=i;
    int Bd=0;  
    while(Bd>0){
    Bd=B/10;Bd++;
  }
    
  if(N=A*B) cout<<Ad<<endl;
  }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
int lg(int a) {
  int k = 1;
  int ret = 1;
  while (k * 10 <= a) {
    k *= 10;
    ret ++;
  }
  return ret;
}
int F(int a, int b) {
  int c = lg(a);
  int d = lg(b);
  return max(c, d);
}
int main () {
  int N;
  cin >> N;
  int ans = 100;
  for (int i = 1; i * i <= N; i ++) {
    if (N % i == 0) {
      ans = F(i, N / i);
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int F(int, int)':
a.cc:14:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
   14 |   return max(c, d);
      |          ^~~
      |          std::max
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:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc: In function 'int main()':
a.cc:18:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   18 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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

    int Max;
    int Min = 10;
    for(int i = 1; i <= N; i++){
        if(N % i == 0){
            string str1 = to_string(i);
            string str2 = to_string(N/i);
            Max = max(str1.size(), str2.size());
            Min = min(min, max);
        }
    }

    cout << Min << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: no matching function for call to 'min(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   15 |             Min = min(min, max);
      |                   ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:15:22: note:   couldn't deduce template parameter '_Tp'
   15 |             Min = min(min, max);
      |                   ~~~^~~~~~~~~~
/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:
/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:15:22: note:   couldn't deduce template parameter '_Tp'
   15 |             Min = min(min, max);
      |                   ~~~^~~~~~~~~~
Language: C++

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

int main(){
long long n;
  bool st=true;
  cin>>n;
  int a=0;
  int b;
  int count=0;
 for(int i=1;i*i<=n;i++){
   a++;
 }
  for(int i=a;st;i--){
    if(n%a==0){
 b=n/a;
      st=false;
    }
  }
for(int i=0;b>=10;i++){
  b/=10;
  c++;
}
  cout<<c<<endl;

}


  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'c' was not declared in this scope
   22 |   c++;
      |   ^
a.cc:24:9: error: 'c' was not declared in this scope
   24 |   cout<<c<<endl;
      |         ^
Language: C++

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

int main(){
long long n;
  bool st=true;
  cin>>n;
  int a=0;
  int count=0;
 for(int i=1;i*i<=n;i++){
   a++;
 }
  for(int i=a;st;i--){
    if(n%a==0){
int b=n/a;
      st=false;
    }
  }
for(int i=0;b>=10;i++){
  b/=10;
  c++;
}
  cout<<c<<endl;

}


  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'b' was not declared in this scope
   19 | for(int i=0;b>=10;i++){
      |             ^
a.cc:21:3: error: 'c' was not declared in this scope
   21 |   c++;
      |   ^
a.cc:23:9: error: 'c' was not declared in this scope
   23 |   cout<<c<<endl;
      |         ^
Language: C++

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

int main(){
long long n,b;
  double a;
  int c=0;
  int d;
  int e=0;
  cin>>n;
a=sqrt(n);
  b=(long long)a;
  for(int i=b;c==0;i--){
    if(n%i==0){
      d=n/i;
      break;
    }
  }
  for(i=0;d>=10;i++){
    e++;
    d/=10;
  }
  cout<<e<<endl;
}


  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   for(i=0;d>=10;i++){
      |       ^
Language: Java

public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        List<String> b = new ArrayList<>();
        List<Long> c = new ArrayList<>();
        int ans = Long.toString(a).length();
        for(long i=1; i<=a/2; i++) {
            if(a%i ==0) {
                c.add(i);
            }
        }
        for(long e : c) {
            for(long f: c) {
                if(a == e*f) {
                    long g = e > f ? e : f;
                    b.add(Long.toString(g));
                }
            }
        }
        for(String d : b) {
            if(ans > d.length()) {
                ans = d.length();
            }
        }
        System.out.println(ans);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        List<String> b = new ArrayList<>();
        ^
  symbol:   class List
  location: class Main
Main.java:6: error: cannot find symbol
        List<String> b = new ArrayList<>();
                             ^
  symbol:   class ArrayList
  location: class Main
Main.java:7: error: cannot find symbol
        List<Long> c = new ArrayList<>();
        ^
  symbol:   class List
  location: class Main
Main.java:7: error: cannot find symbol
        List<Long> c = new ArrayList<>();
                           ^
  symbol:   class ArrayList
  location: class Main
6 errors
Language: C++

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

int calc_digit(long long N) {
    int res = 0;
    while (N) {
        ++res;
        N /= 10;
    }
    return res;
}

ll calc(ll n){
  ll res=pow(10,11);
  for(int i=1;i*i<=n;i++){
    if(n%i==0){
      res = min(res,calc_digit(n/i));
    }
  }
  return res;
}
 
int main(){
  ll n;
  cin >> n;
  auto res = calc(n);
  cout << res;
  return 0;
}

Compiler output:
a.cc: In function 'll calc(ll)':
a.cc:19:16: error: no matching function for call to 'min(ll&, int)'
   19 |       res = min(res,calc_digit(n/i));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:19:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |       res = min(res,calc_digit(n/i));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/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:
/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:19:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |       res = min(res,calc_digit(n/i));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;
int digit(long long n){
  int d = 0;
  while(n > 0){n /= 10; ++d;}
  return max(1, d);
}
int main(){
  long long n; int a = 1e9; cin >> n;
  rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i)));
  cout << a << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:75: error: expected ';' before ')' token
   11 |   rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i)));
      |                                                                           ^
      |                                                                           ;
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(long long i = 0; i < n; ++i)
using namespace std;
long long digit(long long n){
  long long d = 0;
  while(n > 0){n /= 10; ++d;}
  return max(1, d);
}
int main(){
  long long n, a = 1e15; cin >> n;
  rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i)));
  cout << a << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'long long int digit(long long int)':
a.cc:7:13: error: no matching function for call to 'max(int, long long int&)'
    7 |   return max(1, d);
      |          ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:7:13: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    7 |   return max(1, d);
      |          ~~~^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: '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:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:7:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |   return max(1, d);
      |          ~~~^~~~~~
a.cc: In function 'int main()':
a.cc:11:75: error: expected ';' before ')' token
   11 |   rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i)));
      |                                                                           ^
      |                                                                           ;
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(long long i = 0; i < n; ++i)
using namespace std;
int digit(long long n){
  int d = 1;
  while(n > 0){n /= 10; ++d;}
  return max(1, d);
}
int main(){
  long long n, a = 1e15; cin >> n;
  rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i));
  cout << a << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:45: error: no matching function for call to 'min(long long int&, int)'
   11 |   rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i));
      |                                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:11:45: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   11 |   rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i));
      |                                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:
/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:11:45: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   11 |   rep(i, sqrt(n)) if(n % (i+1) == 0) a = min(a, digit(n/(i+1))-digit(n/i));
      |                                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main(){
   ll N;
   cin >> N;
    int f = 100;
    int s;
   for(int i = 1; i <= sqrt(N); i++) {
       s = 0; 
       int it;

       if(N % i == 0) {
        it = N / i;
       while(it > 0) {
           it /= 10;
           s++;
       }
        if(f > s) f = s;
       }  
   }

   cout << f;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: 'll' was not declared in this scope
    5 |    ll N;
      |    ^~
a.cc:6:11: error: 'N' was not declared in this scope
    6 |    cin >> N;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define rep(i,m,n) for(int i=m;i<n;i++)
ll mod=1e9+7;

int main(){
  ll n;
  cin>>n;
  ll ans=810;
  for(ll i=1;i*i<=n;i++){
    if(n%i==0){
      string s=to_string(i);
      string t=to_string(n/i);
      int a=s.size();
      int b=t.size();
      ans=min(ans,max(a,b));
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: no matching function for call to 'min(ll&, const int&)'
   18 |       ans=min(ans,max(a,b));
      |           ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:18:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 |       ans=min(ans,max(a,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:
/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:18:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 |       ans=min(ans,max(a,b));
      |           ~~~^~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <cmath>
#include <map>
#include <iomanip>
#include <unordered_map>
#include <stack>
#include <cstring>

using namespace std;
typedef long long  ll;
const ll INF = 1000000007;
const ll mod = 998244353;

ll check(ll N)
{
	ll ans = INF;
	for (ll i = 1; i * i <= N; i++)
	{
		if (N % i == 0)
		{
			ll target = N / i;
			ll temp = 0;
			while (target >= 1)
			{
				target /= 10;
				temp++;
			}
			ans = min(ans, temp);
		}
	}
	return temp;
}

int main()
{
	ll N;
	cin >> N;
	const auto& res = check(N);
	cout << res << endl;
	return 0;
}

Compiler output:
a.cc: In function 'll check(ll)':
a.cc:34:16: error: 'temp' was not declared in this scope; did you mean 'tm'?
   34 |         return temp;
      |                ^~~~
      |                tm
Language: C++

#include<bits/stdc++.h>
#define LL long long
using namespace std;
int main(){
  LL N;
  cin>>N;
  LL A,B,ans=10000000;
  for(int i=1;i*i<=N;i++){
    if(N%i==0){
      A=N%i;
      string a=to_string(A);
      LL ma=a;
      ans=min(ans,ma);
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'long long int' in initialization
   12 |       LL ma=a;
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<bits/stdc++.h>
#define LL long long
using namespace std;
int main(){
  LL N;
  cin>>N;
  LL A,B,ans=10000000;
  for(int i=1;i*i<=N;i++){
    if(N%i==0){
      A=N%i;
      string a=to_string(A);
      ans=min(ans,a.size());
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no matching function for call to 'min(long long int&, std::__cxx11::basic_string<char>::size_type)'
   12 |       ans=min(ans,a.size());
      |           ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:12:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   12 |       ans=min(ans,a.size());
      |           ~~~^~~~~~~~~~~~~~
/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:
/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:12:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |       ans=min(ans,a.size());
      |           ~~~^~~~~~~~~~~~~~
Language: C

#include<stdio.h>
 
int max(long a,long b){
	if(a>b){
    	return a;
    }else{
    	return b;
    }
}
 
int min(long a,long b){
	if(a>b){
    	return b;
    }else{
    	return a;
    }
}
 
int f(long a,long b){
  long c=max(a,b);
  int keta=1;
  for(int i=0;i<10;i++){
  	if(c/10>0){
    	keta++;
      	c/=10;
    }
  }
  return keta;
}
 
 
 
int main(void){
  
  long N=0;
  int minnum=11;
  scanf("%ld",&N);
  
  for(long a=1;a*a<N;a++){
    long b=0;
  	if(N%a == 0){
      b=N/a;
      b=f(a,b);
      minnum=min(res,minnum);
    }
  }
  
  printf("%d",minnum);
  
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:44:18: error: 'res' undeclared (first use in this function)
   44 |       minnum=min(res,minnum);
      |                  ^~~
main.c:44:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int max(long a,long b){
	if(a>b){
    	return b;
    }else{
    	return a;
    }
}

int min(long a,long b){
	if(a>b){
    	return b;
    }else{
    	return a;
    }
}

int f(long a,long b){
  c=max(a,b);
  keta=1;
  for(int i=0;i<10;i++){
  	if(c/10>0){
    	keta++;
      	c/=10;
    }
  }
  return keta;
}



int main(void){
  
  long long int N=0;
  int minnum=11;
  scanf("%lld",&N);
  
  for(int a=1;a*a<N;a++){
  	if(N%a == 0){
      int b=N/a;
      int res=f(a,b);
      if(res<minnum){
      	minnum=res;
      }
    }
  }
  
  printf("%d",minnum);
  

return 0;
}

Compiler output:
main.c: In function 'f':
main.c:20:3: error: 'c' undeclared (first use in this function)
   20 |   c=max(a,b);
      |   ^
main.c:20:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:3: error: 'keta' undeclared (first use in this function)
   21 |   keta=1;
      |   ^~~~
Language: C

#include<stdio.h>
int main(void){

  int N=0,A=0,B=0,remA=0,remB=0;ketaA=0,ketaB=0;
  int res=0,ans=0,min=10000000000;
  scanf("%d",&N);
  
  for(i=1;i<=10000000000;i++){
  	A=i;
    if(N%B == 0){
    	B=N/B;
      while(remA!=1){
      	remA = A%10;
        remA = (A-remA)/10;
        ketaA++;
      }
      while(remB!=1){
      	remB = A%10;
        remB = (A-remB)/10;
        ketaB++;
      }
      if(ketaA>ketaB){
      	res=ketaA;
      }else{
      	res=ketaB;
      }
      if(min>res){
      	ans=res;
      }
    }
  }
  
  printf("%d",ans);


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:33: error: 'ketaA' undeclared (first use in this function)
    4 |   int N=0,A=0,B=0,remA=0,remB=0;ketaA=0,ketaB=0;
      |                                 ^~~~~
main.c:4:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:41: error: 'ketaB' undeclared (first use in this function)
    4 |   int N=0,A=0,B=0,remA=0,remB=0;ketaA=0,ketaB=0;
      |                                         ^~~~~
main.c:5:23: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
    5 |   int res=0,ans=0,min=10000000000;
      |                       ^~~~~~~~~~~
main.c:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=1;i<=10000000000;i++){
      |       ^
Language: C++

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

using namespace std;

int _count_digit( long long num){
    int count = 1;
    while(num / 10 > 0){
        count++;
        num /=10;
    }

    return count;
}

int get_large_digit(long long A, long long B){
    return max( _count_digit(A), _count_digit(B) );
}

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

    int ans = INT_MAX;
    for (long long i = 1; i * i <= N; ++i) {

        if (N % i == 0) {
            int tmp = get_large_digit( i, N/i );
            ans = min(ans, tmp);
        }
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: 'INT_MAX' was not declared in this scope
   25 |     int ans = INT_MAX;
      |               ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 |
Language: C++

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

#define rep(i, cc, n) for (int i = cc; i < n; ++i)
using ll = long long;

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

    int ans = cnt_digits(N);

    for (ll A = 1; A * A <= N; A++)
    {
        if (N % A != 0)
        {
            continue;
        }

        const int cur = max(cnt_digits(A), cnt_digits(N / A));

        if (cur > ans)
        {
            ans = cur;
        }
    }

    cout << ans << endl;

    return 0;
}

int cnt_digits(ll N)
{
    int digits = 0;

    while (N > 0)
    {
        N / 10;
        digits++;
    }

    return digits;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |     cin >> N;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:15: error: 'cnt_digits' was not declared in this scope
   13 |     int ans = cnt_digits(N);
      |               ^~~~~~~~~~
a.cc:22:25: error: 'max' was not declared in this scope; did you mean 'std::max'?
   22 |         const int cur = max(cnt_digits(A), cnt_digits(N / A));
      |                         ^~~
      |                         std::max
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:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:30:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |     cout << ans << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |     cout << ans << endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

#define rep(i, cc, n) for (int i = cc; i < n; ++i)
using ll = long long;
using namespace std;

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

    int ans = cnt_digits(N);

    for (ll A = 1; A * A <= N; A++)
    {
        if (N % A != 0)
        {
            continue;
        }

        const int cur = max(cnt_digits(A), cnt_digits(N / A));

        if (cur > ans)
        {
            ans = cur;
        }
    }

    cout << ans;

    return 0;
}

int cnt_digits(ll N)
{
    int digits = 0;

    while (N > 0)
    {
        N / 10;
        digits++;
    }

    return digits;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'cnt_digits' was not declared in this scope
   14 |     int ans = cnt_digits(N);
      |               ^~~~~~~~~~
Language: C++

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

int f(ll x, ll y){
  int cnt=0;
  ll z=max(x,y);
  while(z>0){
    z/=10;
    cnt++;
  }
  return cnt;
}

int main() {
  ll n; cin >> n;
    ll ans=f(n,1);
  for(ll i=1LL;i*i<n;i++){
    if(n%i==0){
      ll p=n/i;
      int e=f(i,p);
       ans=min(ans,e);
      }
    }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: no matching function for call to 'min(ll&, int&)'
   22 |        ans=min(ans,e);
      |            ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:22:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   22 |        ans=min(ans,e);
      |            ~~~^~~~~~~
/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:
/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:22:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   22 |        ans=min(ans,e);
      |            ~~~^~~~~~~
Language: C++

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

int f(ll x, ll y){
  int cnt=0;
  ll z=max(x,y);
  while(z>0){
    z/=10;
    cnt++;
  }
  return cnt;
}

int main() {
  ll ans=11;
  ll n; cin >> n;
  for(ll i=1LL;i*i<n;i++){
    if(n%i==0){
      const ll p=n/i;
      const ll e=f(i,p);
       ans=min(ans,e);
      }
    }



  cout << ans << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int f(ll, ll)':
a.cc:7:8: error: 'max' was not declared in this scope
    7 |   ll z=max(x,y);
      |        ^~~
a.cc: In function 'int main()':
a.cc:17:9: error: 'cin' was not declared in this scope
   17 |   ll n; cin >> n;
      |         ^~~
a.cc:22:12: error: 'min' was not declared in this scope; did you mean 'main'?
   22 |        ans=min(ans,e);
      |            ^~~
      |            main
a.cc:28:3: error: 'cout' was not declared in this scope
   28 |   cout << ans << endl;
      |   ^~~~
a.cc:28:18: error: 'endl' was not declared in this scope
   28 |   cout << ans << endl;
      |                  ^~~~