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):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()
ans=10**100
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        b=n//i
        tmp=max(len(str(i)),len(str(b)))
        ans=min(tmp,ans)
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, n//i))

    divisors.sort()
    return divisors

from math import log10
N = int(input())
div = make_divisors(N)

def F(A, B):
    return max(int(log10(A))+1, int(log10(B))+1)
ans = 10**9
for a, b in div:
    ans = min(ans, F(a, b))
print(ans)

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

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

Solution (Python):
n=int(input())
for i in  range(int(n**0.5//1)+1,0,-1):
    if n%i==0:
        t=n//i
        ans=max(len(str(i)),len(str(t)))
        break
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, n//i))

    divisors.sort()
    return divisors

from math import log10
N = int(input())
div = make_divisors(N)

def F(A, B):
    return max(log10(A)+1, log10(B)+1)
ans = 10**9
for a, b in div:
    ans = min(ans, F(a, b))
print(int(ans))

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

Solution (Python):
import math
n = int(input())
w = math.sqrt(n)


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


ans = 10**4
for i in range(1, int(w)+2):
    if n % i != 0:
        continue
    j = n//i
    ans = min(f(i, j), ans)
print(ans)

Solution (Python):
def main():
    num = int(input())
    i = 2
    answer = len(str(num))
    while i * i <= num:
        if not num % i:
            answer = max(len(str(i)), len(str(num // i)))
        i += 1
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
def bunkai(num):
    a = []
    while num % 2 == 0:
        a.append(2)
        num //= 2
    f = 3
    while f * f <= num:
        if num % f == 0:
            a.append(f)
            num //= f
        else:
            f += 2
    a.append(num)
    if len(a) == 1:
        a.append(1)
    return a
def kake(klist):
    dst = 1
    for i in klist:
        dst *= i
    return dst
src = int(input())
kumi = bunkai(src)
kumiawase = []
for i in range(1, len(kumi)):
    for k in range(len(kumi) - i + 1):
        nums = kake(kumi[k:k + i])
        if nums not in kumiawase:
            kumiawase.append(nums)
dsti = []
for i in range(len(kumiawase)):
    dsti.append((src//kumiawase[i], kumiawase[i]))
fx = lambda x, y: len(str(x)) if len(str(x)) > len(str(y)) else len(str(y))
dst = min([fx(*i) for i in dsti])
print(dst)

Solution (Python):

from math import floor
from math import sqrt
def g(x):
    cnt = 0
    if x == 0:
        return 1
    while x:
        x //= 10
        cnt += 1
    return cnt

def F(x, y):
    return max(g(x), g(y))

def main():
    n = int(input())
    ans = 100
    for a in range(1, floor(sqrt(n))+1):
        if n%a == 0:
            b = n//a
            ans = min(ans, F(a, b))
    print(ans)
main()

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

Solution (Python):
n = int(input())
min_f = 10
for i in range(1, n + 1):
    if i ** 2 > n:
        break
    if n % i != 0:
        continue
    min_seq = max(len(str(i)), len(str(n // i)))
    if min_seq < min_f:
        min_f = min_seq
print(min_f)

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

print(ans)

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

    
    return divisors
print(min(make_divisors(N)))

Solution (Python):
import math

n = int(input())

def f(a, b):
    c = len(str(a))
    d = len(str(b))
    return c if c > d else d

ans = n
lim = math.floor(math.sqrt(n))

for i in range(1, lim + 1):
    if n % i == 0:
        temp = f(i, n // i)
        if temp < ans:
            ans = temp
    
print(ans)

Solution (Python):
import numpy as np
N=int(input())
F_ab=len(str(N))
sqrt_N=int(np.sqrt(N))
for a in range(2,sqrt_N+1):
    if N%a==0:
        F_ab=min(F_ab,max(len(str(a)),len(str(N//a))))
    
print(F_ab)

Solution (Python):

import math
n = int(input())
ans = 10

def fun(a,b):
    if len(str(a)) <= len(str(b)):
        return(len(str(b)))
    else:
        return(len(str(a)))



b =int(math.sqrt(n+1) // 1) + 1


for i in range(1,b):
    if n % i == 0:

        if ans > fun(i,int(n/i)):
            ans = fun(i,int(n/i))


print(ans)

Solution (Python):
import math

n = int(input())
res = float("inf")
for i in range(1, int(math.sqrt(n))+1):
    if n % i == 0 and res > max(len(str(int(n/i))), len(str(i))):
        res = max(len(str(int(n/i))), len(str(i)))

print(res)

Solution (Python):
from itertools import combinations
from functools import reduce
from operator import mul
def prime_dec(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(n)
  return table

n = int(input())
ps = prime_dec(n)
ps = [1] if len(ps) == 0 else ps
ps_com = []
for i in range(len(ps)):    
    ps_com += set(combinations(ps, i+1))
divs = [reduce(mul, k) for k in ps_com if not len(k) == 0]
divs_twin = [(k, int(n/k)) for k in divs]
divs_twin = set(divs_twin)
divs_twin_len = [max(len(str(k[0])) ,len(str(k[1])))  for k in divs_twin]

print(min(divs_twin_len))

Solution (Python):
def args():
    return int(input())


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


def solve(N):
    import math

    res = len(str(N))
    for a in range(1, int(math.ceil(math.sqrt(N))) + 1):
        if N % a == 0:
            b = N // a
            res = min(res, F(a, b))

    return res


if __name__ == '__main__':
    n = args()
    ans = solve(n)
    print(ans)

Solution (Python):
def func(A,B):
  cntA=1
  while A//10:
    A//=10
    cntA+=1
  cntB=1
  while B//10:
    B//=10
    cntB+=1
  return max(cntA,cntB)
ans=10000000001
N=int(input())
NN=int((N+1)**0.5)
for i in range(1,NN+1):
  if N%i==0:
    j=N//i
    tmp=func(i,j)
  ans=min(ans,tmp)
print(ans)

Solution (Python):
import math
N = int(input())
ans = N
for i in range(1, 1+math.floor(math.sqrt(N))):
    if N % i == 0:
        ans = min(ans, len(str(N//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

n = int(input())
div1 = make_divisors(n)
div2 = [0] * len(div1)
for i in range(len(div1)):
    div2[i] = n // div1[i]

pair = [0] * len(div1)
for i in range(len(div1)):
    pair[i] = (div1[i], div2[i])

ans = 100000
for i in pair:
    ans = min(ans, max(len(str(i[0])), len(str(i[1]))))
print(ans)

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

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


ma=int(n**0.5)

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

Solution (Python):
import sys
import math
input = sys.stdin.readline
 
N = int(input())
a = int(math.sqrt(N))
 
A = 0
B = 0
for i in reversed(range(1, a + 1)):
  if not N % i:
    A = i
    B = N // A
    break
 
print(max(len(str(A)), len(str(B))))

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

def digit10(X, Y) :
    dig_X = 0
    dig_Y = 0
    while X :
        dig_X += 1
        X //= 10
    while Y :
        dig_Y += 1
        Y //= 10
    return max(dig_X, dig_Y)

root_N = int(N ** 0.5)
ans = 100

for A in range(1,root_N+1) :
    if N%A == 0 :
        B = N // A
        ans = digit10(A, B)

print(ans)

Solution (Python):

import sys


def solve(N: int):
    result = len(str(N))
    for A in range(1, int(N ** 0.5) + 1):

        if N % A == 0:
            B = N // A
            f_value = max(len(str(A)), len(str(B)))
            result = min(result, f_value)

    print(result)
    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):
def main():
    N = int(input())
    min_len = 0
    if float.is_integer(N ** 0.5):
        print(len(str(int(N ** 0.5))))
        return
    A = int(N ** 0.5) + 1
    for a in range(A, 0, -1):
        if N % a == 0:
            print(len(str(N // a)))
            break


if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
nsqrt = int(math.sqrt(N))
ans = 10**9
for i in range(1, nsqrt+1):
    if N % i == 0:
        stri = str(i)
        strdiv = str(N // i)
        ans = min(ans, max(len(stri), len(strdiv)))
print(ans)

Solution (Python):
def f(a,b):
    return max(len(str(a)),len(str(b)))
def solve():
    n = int(input())
    l = f(n,1)
    for i in range(1,int(n**.5)+1):
        if n%i==0:
            l_ = f(i,n//i)
            if l>l_:
                l=l_
    print(l)
solve()

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

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

def main():
    N = int(input())
    f_vals = []
    for A in range(1, int(math.sqrt(N))+1):
        if N % A != 0:
            continue
        B = int(N / A)
        f_vals.append(max(len(str(A)), len(str(B))))
    print(min(f_vals))


if __name__ == '__main__':
    main()

Solution (Python):

import math


def check(A,B):
    digit_list=[]
    for num in [A,B]:
        count=0
        tmp_num=num
        while tmp_num != 0:
            tmp_num //= 10
            count += 1
        
        digit_list += [count]
    
    return max(digit_list)


N = int(input().strip())

min_f=10
for i in range( 1, math.ceil( N**(1/2) ) + 1 ):
    if (N % i) == 0:
        A,B = i,(N / i)
        digit = check(A,B)
        
        if min_f > digit:
            min_f = digit

print(min_f)

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):
import math
n=int(input())
rootn=int(math.sqrt(n))
ketamin=12
for i in range(1,rootn+2):
    if n%i==0:
        fab=max(i,n//i)
        fabstr=str(fab)
        keta=len(fabstr)
        if ketamin>keta:
            ketamin=keta
print(ketamin)

Solution (Python):
N = int(input())
ans = 9999999999999
n = 1
while n*n <= N:
    if not N % n:
        ans = min(ans, max(len(str(N//n)), len(str(n))))
    n += 1
print(ans)

Solution (Python):
N=int(input())
i=int(N**(1/2))
while N%i!=0:
    i-=1
print(len(str(N//i)))

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

M = int(N**(1/2))
min_ans = len(str(N))
ans = 0

for i in range(1,M+1):
    a, b = divmod(N, i)
    if b==0:
        ans = max(len(str(a)),len(str(i)))
        if min_ans >= ans:
            min_ans = ans

print(min_ans)

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

ans = 999
a = 1
while a*a <= N:
    if N%a == 0:
        b = N // a
        ans = min(ans, len(str(b)))
    a += 1
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
  
N=int(input())
divs=make_divisors(N)
print(len(str(divs[len(divs)//2])))

Solution (Python):
N = int(input())
ans = 10**9+7
def divisore(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(reverse=True)
    return divisors
li = divisore(N)
n = len(li)
if n % 2 == 0:
    for i in range(n//2):
        j = i+1
        j = j * (-1)
        left = len(str(li[i]))
        right = len(str(li[j]))
        k = max(left,right)
        if k <= ans:
            ans = k
    print(ans)
    exit()
else:
    l = int(N**(1/2))
    print(len(str(l)))

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

def myfunc(a, b):
    if len(str(a)) > len(str(b)):
        return len(str(a))
    return len(str(b))

ans = len(str(n))
i = 1
sqrt_n = n ** 0.5
while i <= sqrt_n:
    if n % i == 0:
        ans = min(ans, myfunc(i, n // i))
    i += 1

print(ans)

Solution (Python):

import sys
import numpy as np

def list_prime(max):
    primes = []
    for i in range(1, max):
        if max % i == 0:
            primes.append(i)
        if i >= np.sqrt(max):
            break
    if len(primes) <= 1:
        primes.append(max)
    return primes

def solve(N: int):
    print(len(str(max(int(N / list_prime(N)[-1]), list_prime(N)[-1]))))
    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):
import math

N=int(input())

P=math.sqrt(N)
ans=float("inf")
for i in range (1,int(P+1)):
	if N%i==0:
		tmp=max(len(str(i)),len(str(N//i)))
		ans=min(ans,tmp)

print(ans)

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

from math import sqrt

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

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

num=int(n**0.5)+1
mini=float('inf')
for k in range(1,num+1):
    i=k
    j=0
    if n%i==0:
        j=n//i
    if j!=0 and len(str(j))<=mini:
        mini=len(str(j))
print(mini)

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


def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


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


if __name__ == "__main__":
    main()

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

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

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

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

print(ans)

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

    def trial_division(n):
        divs = []
        for i in range(1, int(n**0.5)+1):
            if n % i == 0 and i != n//i:
                divs.append((i, n//i))
            elif n % i == 0 and i == n//i:
                divs.append((i, i))
        return divs
    ans = 10**13
    divs = trial_division(N)
    for a, b in divs:
        ans = min(ans, max(len(str(a)), len(str(b))))
    print(ans)


if __name__ == '__main__':
    main()

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


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


ans = 10**9
for i in range(1, int(N ** 0.5) + 1):
    if N % i == 0:
        j = N // i
        ans = min(ans, F(i, j))

print(ans)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N = I()

    def f(x,y):
        return max(len(str(x)), len(str(y)) )

    ans = inf
    for i in range(1,int(sqrt(N)+1)):
        if N%i==0:
            ans = min(ans, f(i, N//i))
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
def max_digit(numA, numB):
    a = len(str(numA))
    b = len(str(numB))
    return max(a, b)
ans = 10
n = int(input())
for i in range(1, int(n ** 0.5) + 1):
    if n % i != 0:
        continue
    result = max_digit(i, n // i)
    if ans > result:
        ans = result
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()

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

arr=mdiv(n)

print(len(str(min(arr))))

Solution (Python):
n=int(input())
ans=10**20
for x in range(1,10**5+1):
    if n%x==0:
        ans=min(ans,max(len(str(x)),len(str(n//x))))
print(ans)

Solution (Python):
import math

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

for i in range(a + 1, 0, -1):
    if n % i == 0:
        
        print(max(len(str(i)), len(str(n // i))))
        exit()

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
l=make_divisors(N)
if len(l)%2==0:
    A=l[-2]
    B=l[-1]
    a=str(A)
    b=str(B)
    ans=max(len(a),len(b))
else:
    A=l[-1]
    B=l[-1]
    a=str(A)
    ans=len(a)
print(ans)

Solution (Python):
def f(a, b):
    A = 1
    B = 1

    while True:
        if a // 10 > 0:
            A += 1
            a = a // 10
        else:
            break

    while True:
        if b // 10 > 0:
            B += 1
            b = b // 10
        else:
            break

    return max(A, B)


N = int(input())

ans = 10 ** 10
for i in range(1, int(N ** (1/2) + 1)):
    if N % i == 0:
        A = i
        B = N // i
        ans = min(ans, f(A, B))
    else:
        pass

print(ans)

Solution (Python):
def MaxDigits(A, B):
    Adig = 0
    while A > 0:
        A //= 10
        Adig += 1
    Bdig = 0
    while B > 0:
        B //= 10
        Bdig += 1
    return max(Adig, Bdig)

N = int(input())
infinity = float('inf')
ans = infinity

for i in range(1, int(N**0.5) + 1):
    if N%i == 0:
        if ans > MaxDigits(i, N/i):
            ans = MaxDigits(i, N/i)
print(ans)

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


def digits(n):
    return len(list(str(n)))


digit_list = []
for a in range(1, int(N**(1/2))+1):
    b = N // a if N % a == 0 else 0
    if b != 0:
        digit_list += [max(digits(a), digits(b))]

print(min(digit_list))

Solution (Python):
n = int(input())
sn = int(n**.5)
if (sn)*(sn)==n:
    print(len(str(sn)))
    quit()

divisors = []
c = 0
for i in range(int(n**.5)+1, 0, -1):
    if n % i == 0:
        divisors.append(i)
        c += 1
        if i != n // i:
            divisors.append(n//i)
            c += 1
    if c >= 2:
        break

print(len(str(max(divisors))))

Solution (Python):
from math import floor, sqrt

def solve(n):
    rn = floor(sqrt(n)) + 1
    for i in range(rn, 0, -1):
        if n % i == 0:
            return max(len(str(n // i)), len(str(i)))

_n = int(input())
print(solve(_n))

Solution (Python):
from itertools import combinations

N = int(input())

def int_len(n):
    return len(str(n))

a = i = 1
list = []
while a <= N:
    if N % i == 0:
        b = N // i
        c = N // b
    list.append(max(int_len(b), int_len(b)))
    
    i += 1
    a = i ** 2

ans = min(list)
print(ans)

Solution (Python):
def make_divisors(n):
    divisors = []
    ans = float('INF')
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            c = max(len(str(i)), len(str(n//i)))
            if c < ans:
                ans = c
    print(ans)
    
    return divisors

n = int(input())
div = make_divisors(n)

Solution (Python):
import math
def F(A,B):return max(len(str(A)),len(str(B)))
N = int(input())
ans = float("inf")
for i in range(1,int(math.sqrt(N))+1):
    if N%i==0:
        ans = min(ans,F(i,N//i))
print(ans)

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

Solution (Python):
from numpy import sqrt
n=int(input())
r=int(sqrt(n))
for i in range(r):
  if n % (r-i) == 0:
    m = n // (r-i)
    print(len(str(m)))
    exit()

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

f = 10**11
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        f = min(f, max(len(str(i)), len(str(n//i))))

print(f)

Solution (Python):
def fab(x):
    if x == 1:
        return x

    ans = 0
    for i in range(1 , x + 1):
        if -(-x // i) < i:
            return ans
        if x % i == 0:
            ans = len(str(int(x / i)))

def main():
    n = int(input())
    print(fab(n))

if __name__ == '__main__':
    main()

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

Solution (Python):
def sqrt(n):
    i=0
    while n>=(i+1)**2:
        i=i+1
    return i

def digit(n):
    if n<10:
        return 1
    else:
        return 1+digit(n//10)

N=int(input())
i=sqrt(N)
while i>0:
    if N%i==0:
        print(digit(N//i))
        break
    else:
        i=i-1

Solution (Python):
N = int(input())
answer = 10**10
M = int(N**0.5)+1

for a in range(1,M):
    if N%a==0:
        b = N//a
        F = max(len(str(a)),len(str(b)))
        answer = min(answer,F)
print(answer)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

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

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):

import math
n = int(input())
def max_digit(p,q):
    p_i = 0
    q_i = 0
    while p+q != 0:
        if p: 
            p //= 10
            p_i +=  1
        if q:
            q //= 10
            q_i += 1
    return max(p_i,q_i)
for i in range(math.ceil(n**(1/2)),0,-1):
    if n % i == 0:
        print(max_digit(i,n//i))
        exit()

Solution (Python):

import math
N = int(input())

T = []
for a in range(1, int(math.sqrt(N))+1):
  if N % a == 0:
    b = N // a
    T.append((a, b))

ans = float("inf")
for (a, b) in T:
  a = len(str(a))
  b = len(str(b))
  ans = min(ans, max(a, b))

print(ans)

Solution (Python):
N = int(input())
print(min(max(len(str(i)), len(str(N//i))) for i in range(1, int(N**.5)+1) if i*(N//i) == N))

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

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

for i in range(1, 10**5+1):
  if n%i==0:
    temp = max(len(str(i)), len(str(n//i)))
    ans = min(ans, temp)
    
print(ans)

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    def f(a,b):return max(len(str(a)),len(str(b)))
    n=II()
    if n==1:
        print(1)
        exit()
    ans=100
    for d in range(1,n):
        if d**2>n:break
        if n%d==0:
            ans=min(ans,f(d,n//d))
    print(ans)

main()

Solution (Python):
N = int(input())
import math
n = math.floor(N**0.5)
for i in range(n):
    x = n - i
    if N % x == 0:
        y = N//x
        break
print(len(str(y)))

Solution (Python):
import math

if __name__ == '__main__':

	
	N = int(input())
	ans = 11

	ref = int(math.sqrt(N)) + 1

	for i in range(1,ref):
		if N % (ref - i) == 0:
			bigger_one = max(i, int(N/(ref-i)))
			keta = int(math.log10(bigger_one)) + 1
			ans = keta
			break

	print(ans)

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


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


ans = 10 ** 10
for i in range(1, int(sqrt(n)) + 1):
    if n % i != 0:
        continue
    j = n // i
    ans = min(ans, calc_f(i, j))

print(ans)

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

cList = []
for i in range(1,n):
  cal = n//i
  if i > cal:
    break
  if n % i == 0:
    cList.append([i,cal])

sL = n
for i in range(len(cList)):
  sT = max(len(str(cList[i][0])),len(str(cList[i][1])))
  if sL > sT:
    sL = sT

print(sL)

Solution (Python):
import math
n = int(input())
s = int(math.sqrt(n))+1
m = len(str(n))

for i in range(1, s+1):
    if n % i == 0:
        m = min(m, max(len(str(i)), len(str(n//i))))
print(m)

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


ans = 10**9

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

print(ans)

Solution (Python):
import sys
import numpy as np


n = int(input())


n_sqrt = np.sqrt(n)


divisors_a = []
divisors_b = []
for i in np.arange(1, n_sqrt + 1):
    if n % i == 0:
        
        divisors_a.append(int(i))
        divisors_b.append(int(n / i))


print(len(str(divisors_b[-1])))

Solution (Python):

def divisor(N):
    
    divs = []
    for i in range(1, int(N**0.5)+1):
        if N % i == 0:
            divs.append(i)
            divs.append(N//i)
    return divs
def f(a, b):
    return max(len(str(a)), len(str(b)))

N = int(input())
divs = divisor(N)
ans = float("inf")
for i in range(0, len(divs), 2):
    a, b = divs[i], divs[i+1]
    ans = min(ans, f(a, b))
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


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 main():
    N = int(input())

    divs = make_divisors(N)
    ans = float("inf")
    for d in divs:
        ans = min(ans, max(len(str(N // d)), len(str(d))))

    print(ans)

    

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
ans = len(str(N))
for a in range(1, int(N ** .5) + 1):
    if N % a == 0:
        ans = min(ans, max(len(str(a)), len(str(N // a))))
print(ans)