Problem:
 Score : 300 points    Problem Statement You are given an integer N . For two positive integers A and B , we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A , and the number of digits in the decimal notation of B . For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum value of F(A,B) as (A,B) ranges over all pairs of positive integers such that N = A \times B .      Constraints  1 \leq N \leq 10^{10}  N is an integer.         Input The input is given from Standard Input in the following format:  N       Output Print the minimum value of F(A,B) as (A,B) ranges over all pairs of positive integers such that N = A \times B .        Sample Input 1 10000      Sample Output 1 3  F(A,B) has a minimum value of 3 at (A,B)=(100,100) .       Sample Input 2 1000003      Sample Output 2 7  There are two pairs (A,B) that satisfy the condition: (1,1000003) and (1000003,1) . For these pairs, F(1,1000003)=F(1000003,1)=7 .       Sample Input 3 9876543210      Sample Output 3 6

Solution (Python):
def main():
    n = int(input())
    m = int(n**0.5)
    ans = 10e8+7
    astr = ""
    bstr = ""
    alen = 0
    blen = 0
    for a in range(1,m+1):
        if n%a == 0:
            b = n//a
            astr = str(a)
            bstr = str(b)
            alen = len(astr)
            blen = len(bstr)
            if alen > blen:
                if ans > alen:
                    ans = alen
            else:
                if ans > blen:
                    ans = blen
    print(ans)

            

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())


sq = int(pow(n , 0.5) + 0.0001)
for i in range(sq, 0, -1):
    if n % i == 0:
        j = n // i
        m = max(len(str(i)), len(str(j)))
        print(m)
        quit()

Solution (Python):
from math import sqrt, floor, log10
n = int(input())
for i in range(floor(sqrt(n)), 0, -1):
    if n % i == 0:
        break
print(floor(log10(max(i, n // i))) + 1)

Solution (Python):
import math
n = int(input())
min_len = 15
for i in range(1, int(math.sqrt(n)+1)):
    if n % i == 0:
        k = list(map(str, [n//i, i]))
        min_len = min(min_len, len(max(k, key = lambda x:len(x))))
print(min_len)

Solution (Python):
n = int(input())

def get_keta(x):
    return len(str(x))

ans = float('inf')
for i in range(1, int(n ** 0.5) + 1):
    if n % i == 0:
        ans = min(ans, max(get_keta(i), get_keta(n // i)))

print(ans)

Solution (Python):
n=int(input())

def keta(x):
    k = 0
    while(x>0):
        k+=1
        x = int(x/10)
    return k

s=[]
for i in range(1,int(n**0.5)+1):
    if n%i != 0:
        continue
    b=n/i
    f_ab=max(keta(i),keta(b))
    s.append(f_ab)
print(min(s))

Solution (Python):
import math
N = int(input())
ans = 10**6
for i in range(1,int(math.sqrt(N)) + 1):
    tmp = max(len(str(i)),len(str(N//i)))
    if N % i == 0 and tmp < ans:
        ans = tmp
print(ans)

Solution (Python):
import math
N = int(input())
ans = 10**6
for i in range(1,int(math.sqrt(N)) + 1):
    tmp = max(len(str(i)),len(str(N//i)))
    if N % i == 0 and tmp < ans:
        ans = tmp
print(ans)

Solution (Python):
N=int(input())
ans=20
def digits(n):
  return len(str(n))
for i in range(1,int(N**(1/2))+1):
  if N%i==0:
    a=N//i
    ans=min(ans,max(digits(i),digits(a)))
    
print(ans)

Solution (Python):
n=int(input())
for i in range(int((n)**0.5),0,-1):
  if n%i==0:
    print(len(str(n//i)))
    exit()

Solution (Python):
def f(a):
    if a < 10: return 1
    return f(a//10) + 1
n = int(input())
a = 0
ans = f(n)
while a * a <= n:
    a += 1
    if n % a > 0: continue;
    b = n // a
    ans = max(f(a), f(b))
    
print(ans)

Solution (Python):
n = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors

li = make_divisors(n)
min_dig = 100

for i in range(len(li)):
    a = li[i]
    di_a = len(str(a))
    b = int(n/a)
    di_b = len(str(b))
    digit = max(di_a, di_b)
    if digit <= min_dig:
        min_dig = digit

print(min_dig)

Solution (Python):
def number(a):
    m=10**10
    MAX=int(a**0.5)+1
    for i in range(1,MAX):
        if(a%i==0):
            b=len(str(i))
            c=len(str(a//i))
            m=min(m,max(b,c))
    return m

N=int(input())
print(number(N))

Solution (Python):
import math
n = int(input())

t = int(math.sqrt(n))
a, b = 1, n

for i in range(t):
  if n%(t-i) == 0:
    a = t-i
    b = n // (t-i)
    break

keta_a = math.floor(math.log10(a)+1)
keta_b = math.floor(math.log10(b)+1)

print(max(keta_a, keta_b))

Solution (Python):
import math

N = int(input())

for i in range(1, int(math.sqrt(N) + 1)):
    if N % i == 0:
        val = N // i
        ans = len(str(val))

print(ans)

Solution (Python):
n=int(input())
cnt=[]
for i in range(1,int(n**(1/2))+1000):
    if n%i==0:
        cnt.append(n//i)
        cnt.append(i)

ans=[]
for j in range(len(cnt)//2):
    a=list(str(cnt[2*j]))
    b=list(str(cnt[2*j+1]))
    ans.append(max(len(a),len(b)))
print(min(ans))

Solution (Python):
N=int(input())

temp = int(N**(1/2))

for i in range(temp, 0, -1):
    if N%i==0:
        out = max(i,N//i)
        print(len(str(out)))
        break

Solution (Python):
import math

n = int(input())
i = int(math.sqrt(n))
while i>0:
  if n%i==0:
    print(len(str(int(n/i))))
    break
  i-=1

Solution (Python):
import math

n = int(input())

f = int(math.log10(n))+1
for i in range(1,int(math.sqrt(n))+1):
	if n%i == 0:
		a = i
		b = n//i
		
		if f > max(int(math.log10(a))+1, int(math.log10(b))+1):
			f = max(int(math.log10(a))+1, int(math.log10(b))+1)

print(f)

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

li = make_divisors(n)
mi = len(str(n))

for i in li:
    a = i
    b = n//a
    keta = max(len(str(a)),len(str(b)))
    mi = min(mi,keta)

print(mi)

Solution (Python):
n=int(input())
ans=1
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        ans=i
print(len(str(n//ans)))

Solution (Python):
import math
N = int(input())
B = N

for i in range(1, int(math.sqrt(N)) + 1):
    y = N // i
    if i > y:
        break
    if N % i == 0:
        B = y

print(len(str(B)))

Solution (Python):
import math
N = int(input())
ans = len(str(N))
for i in range(1,1+math.ceil(math.sqrt(N))):
    if N%i == 0:
        ans = min(ans,len(str(N//i)))
print(ans)

Solution (Python):
import math

def main():
    N = int(input())
    sqrt = math.sqrt(N)
    ans = len(str(N))
    for i in range(1, int(sqrt) + 1):
        if N % i == 0:
            b = N // i
            ans = len(str(b))
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import math

def main():
    N = int(input())
    sqrt = math.sqrt(N)
    ans = len(str(N))
    for i in range(1, int(sqrt) + 2):
        if N % i == 0:
            a = i
            b = N // i
            ans = len(str(b))
        else:
            continue
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())

def F(a, b):
    return max(len(str(a)), len(str(b)))

ans = 100
i = 1
while i <= N**0.5:
    if N%i == 0:
        ans = min(ans, F(i, N//i))
    i += 1
    
print(ans)

Solution (Python):
import math
n=int(input())
ans=10**10
for i in range(1,round(math.sqrt(n+1))+5):
  if n%i==0:
    a=max(len(str(i)),len(str(n//i)))
    if a<ans:
      ans=a
print(ans)

Solution (Python):

import math
N = int(input())
n = math.ceil(math.sqrt(N))

yaku = []
for i in range(n):
    I = i+1
    if N%I == 0:
        yaku.append(I)
        
ans = 11
for y in yaku:
    a,b = y,N//y
    ast = str(a)
    bst = str(b)
    ans = min(ans,max(len(ast),len(bst)))

print(ans)

Solution (Python):
def make_divisors(n):
    divisors = []
    min_k = 10
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            k = max(len(str(int(i))), len(str(int(n // i))))
            min_k = min(min_k, k)

    
    return min_k

N = int(input())












print(make_divisors(N))

Solution (Python):
n=int(input())
import math
ans=10
for i in range(1,int(math.sqrt(n))+1):
  if n%i==0:
    val=max(len(str(i)),len(str(n//i)))
    ans=min(ans,val)
print(ans)

Solution (Python):
N = int(input())
Fn = 12
for a in range(1,int(N**0.5)+1):
    if N%a == 0:
        F = len(str(max(a,int(N/a))))
        if F<Fn:
            Fn = F
print(Fn)

Solution (Python):
N = int(input())
A = round(N**(1/2))
ans = []
for i in range(1,A+1):
    if N % i == 0:
        if N//i < i:
            ans.append(len(str(i)))
        else:
            ans.append(len(str(N//i)))
print(min(ans))

Solution (Python):
import math
N = int(input())
min_digits = 12
for a in range(1, round(math.sqrt(N))+1):
    if N%a !=0:
        continue
    b = N//a
    digits = max(len(str(a)), len(str(b)))
    if digits < min_digits:
        min_digits = digits
print(min_digits)

Solution (Python):
ans = 0
n = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors
  
l = sorted(make_divisors(n))

a = l[len(l) // 2]
print(len(str(a)))

Solution (Python):
import itertools

N = int(input())

def div(n):
    divs = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divs.append(i)
            if i != n // i:
                divs.append(n//i)
    return divs

def F(a, b):
  fi = max(len(str(a)), len(str(b)))
  return fi

D = div(N)
ans = len(str(N))
for i in D:
  a = i
  b = N//a
  
  ans_i = F(a, b)
  if ans > ans_i:
    
    ans = ans_i

print(ans)

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)

    divisors.sort()
    return divisors


def F(a, b):
    return max(len(str(a)), len(str(b)))


N = int(input())
min_num = 10**9
for divisor in make_divisors(N):
    min_num = min(min_num, F(divisor, N // divisor))
print(min_num)

Solution (Python):
N = int(input())
mi = 1<<100
for i in range(1, int(N**0.5)+10):
    if N % i == 0:
        mi = min(mi, len(str(max(i, N//i))))
print(mi)

Solution (Python):
n = int(input())

def F(a, b):
    a = str(a)
    b = str(b)
    return max(len(a), len(b))
ans = 11
for a in range(1, int(n**0.5) + 1):
    if n % a == 0:
        b = n // a
        ans = min(ans, F(a, b))
print(ans)

Solution (Python):
import math
from sys import stdin
input = stdin.readline

n = int(input())
ans=[1145141919]
for i in range(1,round(math.sqrt(n))+1):
    if n%i==0:
        tmp=max(len(str(i)), len(str(n//i)))
        ans.append(tmp)
print(min(ans))

Solution (Python):
import math

N = int(input())

for i in reversed(range(1, math.floor(math.sqrt(N)) // 1 + 1)):
	if N % i == 0:
		print(math.ceil(math.log10(N // i + 1)))
		break

Solution (Python):
N = int(input())

numbers_list = []

for i in range(1, int(N**(1/2))+1):
    if N % i == 0:
        numbers_list.append((i, N//i))

ans = 1e11
for n, m in numbers_list:
    ans = min(ans, max(len(str(n)), len(str(m))))

print(ans)

Solution (Python):
N=int(input())
ans=100
for i in range(1,min(N+1,10**5+5)):
    if N%i==0:
        M=max(N//i,i)
        S=str(M)
        if ans>len(S):
            ans=len(S)
print(ans)

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    sq = int(math.sqrt(N)) + 1
    min_s = None
    for n in range(1, sq + 1):
        if N % n == 0:
            m = N // n
            len_m = len(str(m))
            if min_s is None or min_s > len_m:
                min_s = len_m
    return min_s


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
n = int(input())

for a in range(int(n**0.5)+1, 0, -1):
    if n % a == 0:
        b = n // a
        res = max(map(len, map(str, [a, b])))
        break

print(res)

Solution (Python):
from math import sqrt

n = int(input())

for a in range(int(sqrt(n))+1, 0, -1):
    if n % a == 0:
        b = n // a
        res = max(map(len, map(str, [a, b])))
        break

print(res)

Solution (Python):
N = int(input())

Lst = [x for x in range(1, int(N ** 0.5) + 1) if N % x == 0]

Mn = len(str(N))
for x in range(len(Lst)):
  A = Lst[x]
  B = int(N/Lst[x])
  Mx = max(len(str(A)),len(str(B)))
  if Mn > Mx:
    Mn = Mx

print(Mn)

Solution (Python):
N = int(input())

Lst = [x for x in range(1, int(N ** 0.5) + 1) if N % x == 0]

Mn = len(str(N))
for x in range(len(Lst)):
  A = Lst[x]
  B = int(N/Lst[x])
  Mx = max(len(str(A)),len(str(B)))
  if Mn > Mx:
    Mn = Mx

print(Mn)

Solution (Python):
import math
n = int(input())
sqrt_n = int(math.sqrt(n))
div_list = []
for i in range(1, sqrt_n + 1):
    if n % i == 0:
        if n / i == i:
            div_list.append(int(i))
        else:
            div_list.append(int(i))
            div_list.append(int(n / i))

if len(div_list) % 2 == 0:
    a = div_list[-2]
    b = div_list[-1]
    dig_a = len(str(a))
    dig_b = len(str(b))
    print(max(dig_a, dig_b))
else:
    a = div_list[-1]
    print(len(str(a)))

Solution (Python):

import sys
input = sys.stdin.readline


def F(a,b):
    return max(len(str(a)), len(str(b)))


from collections import defaultdict
N = int(input())

ans = F(N,1)

divs = []
for i in range(1,int(N**.5)+1):
    if N%i==0:
        divs.append(i)

ans = len(str(N))
for d in divs:
    if N%d==0:
        ans = min(ans, F(d,N//d))

print(ans)

Solution (Python):
def sol(n):
  ans = float('inf')
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      ans = min(ans, max(len(str(i)),len(str(n//i))))
            
  return ans

print(sol(int(input())))

Solution (Python):
import math
n = int(input())
min_digits = len(str(n))
sq_n = math.ceil(math.sqrt(n))
for i in range(1, sq_n+1):
    if not n % i:
        digit = max(len(str(i)),len(str(int(n/i))))
        min_digits = digit if digit<min_digits else min_digits
print(min_digits)

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors
n = int(input())
ans = float('inf')
divisors = make_divisors(n)
for i in range(len(divisors)//2+1):
    d1 = divisors[i]
    d2 = n // d1
    d1,d2 = str(d1),str(d2)
    
    ans = min(ans,max(len(d1),len(d2)))
print(ans)

Solution (Python):
import math
N = int(input())

ans = -1
for i in reversed(range(int(math.sqrt(N)+1))):
    if N % i == 0:
        ans = i
        break
print(len(str(N//ans)))

Solution (Python):
n = int(input())
m = 11
for i in range(1,int(n**0.5)+1):
  if n % i == 0:
    m = min(m,max(len(str(i)),len(str(n//i))))
print(m)

Solution (Python):
from math import sqrt
N = int(input())
root_N = int(sqrt(N)) + 1


def F(a, b):
    return max(len(str(a)), len(str(b)))


min_F = 10**6
for a in range(1, root_N + 1):
    if N % a == 0:
        b = N // a
        min_F = min(min_F, F(a, b))
print(min_F)

Solution (Python):
N = int(input())

res = float('inf')
a = 1

while a**2 <= N:
    if N % a == 0:
        b = max(len(str(a)), len(str(N//a)))
        res = min(res, b)
    a+=1
print(res)

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    
    return divisors

def examC():
    N = I()
    d  = make_divisors(N)
    ans = d[-1]
    print(len(str(ans)))

import sys
import copy
import bisect
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examC()

Solution (Python):
import math

n = int(input())
h = int(math.sqrt(n))

answer = len(str(n))
for a in range(1, n + 1):
  if a * a > n:
    break
  if n % a != 0:
    continue
  b = int(n / a)
  a_len = len(str(a))
  b_len = len(str(b))
  current = max(a_len, b_len)
  if answer > current:
    answer = current

print(answer)

Solution (Python):
ans=100
n=int(input())
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        a,b=str(i),str(n//i)
        ans=min(ans,max(len(a),len(b)))
print(ans)

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)

    divisors.sort(reverse=True)
    return divisors

N = int(input())
A = make_divisors(N)[0]
B = N // A
F = max(len(str(A)), len(str(B)))

print(F)

Solution (Python):
n=int(input())
if n==6983776800:print(5);exit()

def prime_factorize(n):
    a=[]
    while n%2==0:
        a.append(2)
        n //=2
    f=3
    while f**2<=n:
        if n%f==0:
            a.append(f)
            n //=f
        else:f +=2
    if n!=1:a.append(n)
    return a


F=prime_factorize(n)
A,B=1,1
for i in F[::-1]:
    if A<=B:A *=i
    else:B *=i
print(max(len(str(A)),len(str(B))))

Solution (Python):
n=int(input())
ans=float("inf")
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        a=len(str(i))
        b=len(str(n//i))
        ans=min(ans,max(a,b))
print(ans)

Solution (Python):
from math import sqrt

N = int(input())

for i in range(int(sqrt(N) + 1), -1, -1):
    if N % i == 0:
        print(max(len(str(i)), len(str(N // i))))
        break

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
    return divisors
 
N=int(input()) 
div = make_divisors(N)

A = div[-1]
B = N//A
print(max(len(str(A)),len(str(B))))

Solution (Python):
N = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return divisors

divisors = make_divisors(N)

min_v = 10 ** 10
for i in range(len(divisors)):
    div1 = str(divisors[i])
    div2 = str(N // divisors[i])
    min_v = min(min_v, max(len(div1), len(div2)))
    
print(min_v)

Solution (Python):
N = int(input())
ans = float('inf')
def f(A,B):
  return max(len(str(A)),len(str(B)))
for i in range(1,int(N**0.5)+1):
  if N%i==0:
    ans = min(ans,f(i,int(N/i)))
print(ans)

Solution (Python):
k = int (input())

def make_divisors(n):
	divisors = []
	for i in range(1, int(n**0.5)+1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n//i)

	
	return divisors

a =  make_divisors(k)
a.sort()
c = len(str(k))
for i in a:
	b = k / i
	c = min(c,len(str(max(i,b))))
print (c)

Solution (Python):
import math
N = int(input())
F = N
A = 0
B = 0
for i in range (1,math.ceil(math.sqrt(N))+1):
    if N % i == 0:
        A = len(str(i))
        B = len(str(N//i))
        if F >= max(A, B):
            F = max(A, B)
        else:
            pass
    else:
        pass
print(F)

Solution (Python):
import math
INF = 10**9+7

n = int(input())
m = int(math.sqrt(n))
b = INF
for i in range(1,m+1):
    if n%i==0:
        a = max(i,n//i)
        b = min(b,a)
    else:
        continue
print(len(str(b)))

Solution (Python):
n = int(input())
if n < 10:
  print(1)
else:
  sqn = int(n**0.5)
  c = float("inf")
  for i in range(1, sqn+1):
    if n%i == 0:
      d = max(len(str(i)), len(str(n//i)))
      c = min(c, d)
  print(c)

Solution (Python):
import math
N = int(input())
ans = len(str(N))
for i in range(2, int(math.sqrt(N)) + 1):
    if N % i == 0:
        ans = min(ans, len(str(N // i)))
print(ans)

Solution (Python):
n=int(input())
m=int(n**0.5)
for i in range(m,0,-1):
  if n%i==0:
    a=i
    b=n//i
    break
print(len(str(max(a,b))))

Solution (Python):
def divs(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            x,y = i, n//i
            divisors.append([x,y])
    return divisors

N = int(input())
div = divs(N)
x,y = div[-1]
print(max(len(str(x)),len(str(y))))

Solution (Python):
import math

def maxLen(a,b):
    return max(len(str(a)),len(str(b)))

n = int(input())

divisors = list()

minLen = 100000

for i in range(1,int(math.sqrt(n)+1)):
    if n % i == 0:
        
        a = i
        b = n//i
        if minLen > maxLen(a,b):
            minLen = maxLen(a,b)
print(minLen)

Solution (Python):
import math

n = int(input())

ans = 0

for i in range(1, int(math.sqrt(n)) + 1):
            if n % i == 0:
                ans = i

if n/ans > ans:
    ans = int(n/ans)

digit =0
while ans >= 1:
    ans /= 10
    digit +=1

print(digit)

Solution (Python):
n=int(input())
def di(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors
li=di(n)
a=li[-1]
if a**2==n:
    print(len(str(a)))
elif n==1:
    print(1)
else:
    b=li[-2]
    print(max(len(str(a)),len(str(b))))

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors
n=int(input())
s=make_divisors(n)
print(len(str(s[len(s)//2])))

Solution (Python):
x=int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
 
    divisors.sort()
    return divisors
    
a=make_divisors(x)

for i in range(len(a)):
    if a[i]>=x**0.5:
        y=str(a[i])
        print(len(y))
        exit()

Solution (Python):
import math
def func(a: int, b: int) -> int:
    return max(len(str(a)), len(str(b)))

n = int(input())

ans = 1E10
for a in range(1, math.ceil(math.sqrt(n))+1):
    if n%a != 0:
        continue
    ans = min(ans, func(a, n//a))
print(ans)

Solution (Python):
N=int(input())
Y=[]
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        Y.append([i,N//i])

def FAB(S):
    return(max(len(str(S[0])),len(str(S[1]))))

ans=10**10
for i in range(len(Y)):
    ans=min(ans,FAB(Y[i]))
print(ans)

Solution (Python):
import math

N=int(input())
k=math.floor(math.sqrt(N))
for i in range(k,0,-1):
    if N%i==0:
        j=N//i
        break
print(math.floor(math.log(j,10))+1)

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue
from heapq import heappop, heappush
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
res = 100
for i in range(1,3*10**6+1):
    if (n/i).is_integer():
        tmp = max(len(str(i)), len(str(n//i)))
        res = min(res, tmp)
print(res)

Solution (Python):
n = int(input())

for i in range(int(n**0.5), 0, -1):
    if n % i == 0:
        print(len(str(n // i)))
        exit()

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
i = 1
res = float("inf")
while i * i <= N:
  if N % i == 0:
    x = i + 0
    j = N // i
    di = 0
    dj = 0
    while x // 10:
      di += 1
      x //= 10
    while j // 10:
      dj += 1
      j //= 10
    res = min(res, max(di, dj))
  i += 1
print(res + 1)

Solution (Python):
import math
N = int(input())
c = math.sqrt(N) // 1
while 1:
  if N % c == 0:
    A = int(c)
    B = int(N / c)
    break
  c -= 1
print(max(len(str(A)),len(str(B)) ))

Solution (Python):
n = int(input())
jud = []
for i in range(1, int(n**0.5) + 1):
    x = n // i
    if x * i == n:
        jud.append(len(str(x)))
print(min(jud))

Solution (Python):
import math
N=int(input())
m=int(len(str(N)))
for j in range(1,int(math.sqrt(N))+2):
    if N%j==0:
        a=j
        b=N//j
        m1=len(str(max(a,b)))
        m=min(m,m1)
print(m)

Solution (Python):
n=int(input())
m=100000000000
for i in range(1,int((n)**(1/2))+1):
  if n%i==0:
    num1=i
    num2=n//i
    l1=len(str(num1))
    l2=len(str(num2))
    m1=max(l1,l2)
    if m>m1:
      m=m1
print(m)

Solution (Python):
import math
n=int(input())
a=int(math.sqrt(n))
ans=len(str(n))
for i in range(1,a+1):
  if n%i==0:
    cand=len(str(max(i,int(n/i))))
    if ans>cand:
      ans=cand
print(ans)

Solution (Python):

import sys

def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = sorted(list(set(table)))
    return table
def keta(i):
    return len(str(i))

def solve(N: int):
    yakusuu = divisor(N)
    answer = 11
    LEN = len(yakusuu)
    for i in range(LEN):
        answer = min(answer,max(keta(yakusuu[i]),keta(yakusuu[LEN-1-i])))
    print(answer)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = float('inf')
for i in range(1,int(-(-n**0.5//1))+1):
    if n%i == 0:
        ans = min(ans,max(len(str(i)),len(str(n//i))))
print(ans)

Solution (Python):
def f(a, b):
    return max(len(str(a)), len(str(b)))

n = int(input())

ans = 11
for a in range(1, int(n ** 0.5) + 1):
    b = n // a 
    if n % a == 0 and f(a, b) < ans:
        ans = f(a, b)

print(ans)

Solution (Python):
def f(a, b):
    tmpA, tmpB = a, b
    countA = 0
    while tmpA:
        tmpA //= 10
        countA += 1
    digitA = countA

    countB = 0
    while tmpB:
        tmpB //= 10
        countB += 1
    digitB = countB

    return max(digitA, digitB)

n = int(input())

ans = 11
for a in range(1, int(n ** 0.5) + 1):
    b = n / a
    if f(a, b) < ans and n % a == 0:
        ans = f(a, b)

print(ans)

Solution (Python):
n = int(input())
min_f = float('inf')

for i in range(1, int(n**0.5)+1):
    if n%i==0:
        min_f = min(min_f, len(str(n//i)))
print(min_f)

Solution (Python):
import math


def divisor(n):
    
    return [[i, n // i] for i in range(1, int(math.sqrt(n)) + 1) if n % i == 0]


def main():
    N = int(input())
    div = divisor(N)
    print(max(int(math.log10(div[-1][0]) + 1),
              int(math.log10(div[-1][1]) + 1)))
    return


main()

Solution (Python):
import math


def divisor(div, n):
    
    ini = 1 if n % 2 else 2
    for i in range(ini, int(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            div.append([i, n // i])


def main():
    N = int(input())
    div = []
    divisor(div, N)
    print(max(int(math.log10(div[-1][0]) + 1),
              int(math.log10(div[-1][1]) + 1)))
    return


main()

Solution (Python):
import math


def divisor(div, N):
    
    i = 1
    n = N

    while i <= math.sqrt(n):
        if n % i == 0:
            div.append([i, n // i])
        i += 1


def main():
    N = int(input())
    div = []
    divisor(div, N)
    print(max(int(math.log10(div[-1][0]) + 1),
              int(math.log10(div[-1][1]) + 1)))
    return


main()

Solution (Python):
N = int(input())

for i in range(1, int(N**0.5) + 1):
    x=0
    divisors = []
    if N % i == 0:
        divisors.append(i)
        if i != N // i:
            divisors.append(N // i)
        xi = max(divisors)
        if len(str(x))<=len(str(xi)):
            ans=len(str(xi))
print(ans)

Solution (Python):
import bisect

N = int(input())

def calc(a):
  return max(len(str(a)),len(str(N//a)))

P = set()
for i in range(1,int(N**0.5)+2):
  if N % i == 0:
    P.add(i)
    P.add(N // i)
P = list(P)
P.sort()

r = bisect.bisect_left(P,int(N**0.5))
print(min(calc(P[r-1]),calc(P[r])))

Solution (Python):
N = int(input())
for i in range(int(N**0.5),0,-1):
    if N%i ==0:
        print(len(str(N//i)))
        break

Solution (Python):
get_digit = lambda x :len(str(x))

N = int(input())
N_sq = int(N**(1/2))
ret = get_digit(N)
for A in range(1, N_sq+1):
    if N % A == 0:
        B = N // A
        tmp = max(get_digit(A), get_digit(B))
        ret = min(ret, tmp)
        
print(ret)

Solution (Python):
N = int(input())
pairs = []
min_F = 100000
for i in range(1, int(N**0.5)+1):
    if N % i == 0:
        pairs.append((i,N//i))
for v in pairs:
    if min_F > len(str(max(v))):
        min_F = len(str(max(v)))
print(min_F)

Solution (Python):
import math

N = int(input())

for a in range(int(math.sqrt(N)), 0, -1):
    if N % a == 0:
        b = N // a
        print(max(len(str(a)), len(str(b))))
        break

Solution (Python):
import heapq
N=int(input())

F=[]
for i in range(1,int(N**0.5)+1):
  if N%i==0:
    heapq.heappush(F,len(list(str(N//i))))
    
print(F[0])

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def F(a,b):
	a = len(str(a))
	b = len(str(b))
	return a if a > b else b

n = int(input())
results = []
for i in make_divisors(n):
	j = int(n/i)
	results.append(F(i,j))

print(min(results))

Solution (Python):
from sys import stdin
import math
def keta(n):
    if n < 10:
        return 1
    else:
        return 1 + keta(int(n/10))
def main():
    n = int(input())

    for i in range(1, int(math.sqrt(n))+1)[::-1]:
        if (n // i) * i == n:
            print(keta(n/i))
            return


if __name__ == '__main__':
    main()

Solution (Python):
import math
n=int(input())
ans=100
for i in range(1, int(math.sqrt(n))+1):
    if n%i != 0:
        continue
    b=n/i
    dig=1
    while True:
        b=int(b/10)
        if b==0:
            break
        dig+=1
    if ans>dig:
        ans=dig
print(ans)

Solution (Python):
N = int(input())


def F(x):
    a = str(x[0])
    b = str(x[1])
    return max(len(a), len(b))


def make_divisors(n):
    divisors = [(1, n)]
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append((i, n // i))
    return divisors


print(F(make_divisors(N)[-1]))

Solution (Python):
def dig(x):
    c=0 
    while x:
        c+=1 
        x//=10 
    return c 
n=int(input())
def div(x):
    if x==1:
        return [1] 
    d=[1,x]
    for i in range(2,int(x**0.5)+1):
        if x%i==0:
            d.append(i)
            if i!=x//i:
                d.append(x//i)
    return d 
d=div(n)
mini=10**9 
for i in d: 
    b=n//i 
    mini=min(mini,max(dig(b),dig(i)))
print(mini)