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 fdigit(a,b):
    if len(str(a)) > len(str(b)):
        return len(str(a))
    else:
        return len(str(b))

N = int(input())
result = 10000000000
goal = int((N**0.5)//1)

for i in range(1, goal+1):
    if N%i ==0:
        
        if result > fdigit(i, N//i):
            result = fdigit(i, N//i)
            

print(result)

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

N = int(readline())

ans = 10
for a in range(1, int(N ** 0.5) + 1):
  if N % a == 0:
    b = N // a
    f = max(len(str(a)),len(str(b)))
    if ans > f:
      ans = f
print(ans)

Solution (Python):
import math

N = int(input())

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

print(ans)

Solution (Python):
import sys
import itertools
import copy

input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

n = I()

def make_divisors(n):
    result = []
    i = 1
    while i*i <= n:
        if n % i == 0:
            result.append(max(len(str(i)), len(str(n // i))))
        i += 1
    return result

result = make_divisors(n)
print(min(result))

Solution (Python):

import sys
input = sys.stdin.readline




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




N = int(input())

ds = set()
dl = list()
for i in range(1,10**5+1):
    if N%i == 0:
        ds.add(i)
        dl.append(i)
for d in dl:
    ds.add(N//d)
D = sorted(list(ds))

ans = 100
for d in D:
    ans = min(ans,F(d,N//d))

print(ans)

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

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

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


a = int(n**0.5)


while n % a != 0:
      a -= 1

b = n//a

print(len(str(max(a,b))))

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

def makediv(n):
	lower_divisors , upper_divisors = [], []
	i = 1
	while i*i <= n:
		if n % i == 0:
			lower_divisors.append(i)
			if i != n // i:
				upper_divisors.append(n//i)
		i += 1
	return lower_divisors + upper_divisors[::-1]

ans = 10**18
divn = makediv(n)
for i in divn:
	if i*i <= n:
		ans = min(max(len(str(n//i)), len(str(i))), ans)
print(ans)

Solution (Python):
import numpy
s = list(map(int, input().split()))
n=s[0]
ans=11
for a in range(1,int(numpy.sqrt(n))+1):
    b=n/a
    if b.is_integer():
        b=int(b)
        if max(len(str(a)),len(str(b)))<ans:
            ans = max(len(str(a)), len(str(b)))
print(ans)

Solution (Python):
def func(i, j):
  il = len(str(i))
  jl = len(str(j))
  if il > jl:
    return il
  return jl

n = int(input())
min = len(str(n))
for i in range(1, n+1):
  if i**2 > n:
    break
  if n % i == 0:
    fr = func(i, int(n/i))
    if min > fr:
      min = fr
print(min)

Solution (Python):
import math

N = int(input())

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

print(len(str(max(sosuu, B))))

Solution (Python):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

N = int(input())

res = 1e+9
for i in make_divisors(N):
    j = N//i
    ans = max(len(str(i)),len(str(j)))
    res = min(res,ans)

print(res)

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

Solution (Python):
n = int(input())
l = []
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        a = i
        b = n // i
        if a * b == n:
            l.append(max(len(str(a)), len(str(b))))

print(min(l))

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

i = 1
ab = set()
while i ** 2 <= n:
    if n % i == 0:
        ab.add((i, n // i))
    i += 1

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

ans = 10 ** 10
for a, b in ab:
    ans = min(ans, max(digit(a), digit(b)))

print(ans)

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

count=0
lis=[]


for i in range(1,N+1):
	if N/i < i:
		break
	if N/i==N//i:
		lis.append(i)

llis=[]
for x in lis:
	y = N / x
	mm=max([x,y])

	ketasuu=len(str(int(mm)))
	llis.append(ketasuu)


print(min(llis))

Solution (Python):
def divisors_lower(n):
    lower = []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower.append(i)
        i += 1
    return lower

n = int(input())

ans = 10 ** 11
A = divisors_lower(n)
for a in A:
    b = n // a
    a, b = str(a), str(b)
    l = max(len(a), len(b))
    ans = min(ans, l)
print(ans)

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

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

ans = n
for q in range(1, int(n ** 0.5) + 1):
    if not n % q:
        ans = min(ans, len(str(n // q)))

print(ans)

Solution (Python):
import math
inp = int(input())
searchMax = int(math.sqrt(inp))
min = 100
for i in range(1, searchMax + 1, 1):
    if inp % i == 0:
        maxLen = len(str(i)) if len(str(i)) > len(str(int(inp / i))) else len(str(int(inp / i)))
        min = min if min < maxLen else maxLen
print(min)

Solution (Python):
def list_divisor(x):
    res = []
    i = 1

    while i ** 2 <= x:
        if x % i == 0:
            res.append(i)
            if i ** 2 != x:
                res.append(x // i)

        i += 1

    return res

def resolve():
    n = int(input())
    divisors = sorted(list_divisor(n))

    l = len(divisors)
    if l % 2 == 0:
        print(max(len(str(divisors[l // 2 - 1])), len(str(divisors[l // 2]))))

    else:
        print(len(str(divisors[l // 2])))
        
resolve()

Solution (Python):
def enum_divisors(N):
    
    import math as m
    a = set()
    for i in range(1, int(m.sqrt(N)) + 1):
        if N % i == 0:
            a.add(i)
            a.add(N // i)
    a = list(a)
    a.sort()
    return a


def resolve():
    N = int(input())
    a = enum_divisors(N)
    print(len(str(a[len(a) // 2])))


resolve()

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

Solution (Python):
n = int(input())
f_min = len(str(n))
for i in range(2, int(n**0.5)+1):
    if n % i != 0:
        continue
    a = i
    b = int(n / a)
    f = max(len(str(a)), len(str(b)))
    f_min = min(f_min, f)

print(f_min)

Solution (Python):
import math
n = int(input())
a = int(math.sqrt(n))
b = n
while a >= 1:
    if n % a == 0:
        b = n // a
        break
    else:
        a-=1
a = len(str(a))
b = len(str(b))
print(max(a,b))

Solution (Python):

N = int(input())
divisor_bigger_length = []
for i in range(1,int(N**0.5)+1):
    if N % i ==0:
        divisor_bigger_length.append(max( len(str(i)), len(str(N//i)) ))

print(min(divisor_bigger_length))

Solution (Python):

n = int(input())
def divisor(n):
    div_list = []
    for i in range(1, int(1+ n**0.5)):
        if n%i == 0 and i**2 == n:
            div_list.append(i)
        elif n%i == 0:
            div_list.append(i)
            div_list.append(int(n/i))
    return div_list
ln = sorted(divisor(n))

a = 12
for i in range(len(ln)):
    if a > max(len(str(ln[i])), len(str(ln[-i-1]))):
        a = max(len(str(ln[i])), len(str(ln[-i-1])))
print(a)

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

Solution (Python):
def get_digit(n): 
    return len(str(n))

def func(n):
    a = 1
    res = float('inf')
    while a**2 <= n:
        if n % a == 0:
            b = n // a
            res = min(res, max(get_digit(a), get_digit(b)))

        a += 1
    return res    

n = int(input())
print(func(n))

Solution (Python):
n = int(input())
ans = 11
for i in range(1,n+1):
    if i*i > n:
        break
    else:
        if n % i != 0:
            continue
        else:
            a = i
            b = n//i
            tmp = max(len(str(a)),len(str(b)))
            ans = min(ans,tmp)
print(ans)

Solution (Python):
n = int(input())
def main(n):
    i = 1
    ans = len(str(n))
    while i**2 <= n:
        if n % i == 0:
            ans = min(ans, len(str(max(i, int(n/i)))))
        i += 1
    print(ans)

main(n)

Solution (Python):
n = int(input())
for i in range(1, int(n**0.5) + 1):
  if n % i == 0:
    maxi = i

print(len(str(n//maxi)))

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())
p = make_divisors(n)
ans = 1000000

for i in range((len(p)+1)//2):
    x = p[i]
    y = p[-1-i]
    z = max(len(str(x)),len(str(y)))
    if z < ans:
        ans = z

print(ans)

Solution (Python):

"""
Created on Sun May 31 17:19:32 2020

@author: NEC-PCuser
"""

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
                arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

def multiplication(n):
    ans = len(str(n))
    for i in range(2, int(-(-n**0.5//1))+1):
        if (n % i == 0):
            ans = max([len(str(i)), len(str(n // i))])
    return ans
        

if __name__ == "__main__":
    N = int(input())
    """
    l = factorization(N)
    """
    print(multiplication(N))
    """
    minimu = 10 ** 10
    ans = 0
    for i in range(0, 2**len(l)):
        a = 1
        b = 1
        for j in range(0, len(l)):
            if ((i >> j) & 1):
                a *= l[j]
            else:
                b *= l[j]
        if (abs(a - b) < minimu):
            minimu = abs(a - b)
            ans = max([len(str(a)), len(str(b))])
    print(ans)
    """

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

Solution (Python):
n = int(input())
b = n
for i in range(1, n + 1):
  if i * i > n:
    break
  if n % i == 0:
    b = n // i
ans = 0
while b > 0:
  b //= 10
  ans += 1
print(ans)

Solution (Python):
import math
n = int(input())
ans = float('inf')
for i in range(1, int(math.sqrt(n))+1):
    if n % i == 0:
        j = n//i
        ans = min(ans, len(str(j)))
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())
l = make_divisors(n)
print(len(str(max(l[len(l) // 2], l[len(l) - len(l) // 2 - 1]))))

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

        
        return divisors

from sys import stdin
def main():
    
    readline=stdin.readline
    n=int(readline())
    ds=make_divisors(n)

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

    print(ans)
    
if __name__=="__main__":
    main()

Solution (Python):
import math

__DEUBG__ = 1
N = int(input())

def factor(num):
    for i in range(1, 1+int(math.sqrt(num))):
        q, r = divmod(num, i)
        if r == 0:
            yield i, q

minimum = N
for pair in factor(N):
    tmp = max(map(lambda x:len(str(x)), pair))
    if tmp < minimum:
        minimum = tmp

print(minimum)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


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
n=I()
ans=inf
for i in make_divisors(n):
    u=n//i
    val=max(len(str(u)),len(str(i)))
    ans=min(ans,val)
print(ans)

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
from fractions import gcd
import copy
from itertools import permutations
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

from itertools import permutations
from math import factorial, hypot





N = getN()

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

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


N = int(input())

div = divisor(N)
ans = 0
for a in div:
    b = N // a
    A = str(a)
    B = str(b)
    ans = max(len(A),len(B))
print(ans)

Solution (Python):
def div(n):
    
    ret = list()
    a = 1
    while a ** 2 <= n:
        if n % a == 0:
            ret.append(a)
        a += 1
    return ret


def f(A, B):
    return max([len(str(A)), len(str(B))])


def main():
    N = int(input())
    ans = len(str(N))
    for d in div(N):
        ans = min([ans, f(d, N // d)])
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
num = 1
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
       num = i

ans = len(str(max(num, n // num)))
print(ans)

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


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


li = make_divisors(n)

ans = float("inf")

for i in li:
    x = n // i
    ans = min(ans, max(len(str(i)), len(str(x))))

print(ans)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

def int1(x): return int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def SI(): return input().split()

def printlist(lst, k='\n'): print(k.join(list(map(str, lst))))
INF = float('inf')

from math import ceil, floor, log2
from collections import deque
from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product
from heapq import heapify, heappop, heappush


def solve():
    n = II()

    fact = []
    for i in range(1, int(pow(n, 0.5))+1):
        if n % i == 0:
            fact.append((i, n//i))
    

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

    ans = INF
    for (x, y) in fact:
        ans = min(ans, f(x, y))
    print(ans)

if __name__ == '__main__':
    solve()

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

Solution (Python):
import math

n = int(input())
end = int(math.sqrt(n)) + 1
ans = float("inf")
for i in range(1, end):
    if n % i == 0:
        f_ab = len(str(n // i))
        ans = min(ans, f_ab)
print(ans)

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

Solution (Python):

import math
N = int(input())
yakusuu = []

for i in range(1, math.ceil(N ** (1/2))+1):
    if N % i == 0:
        yakusuu.append([i, int(N/i)])
keta1 = 0
keta2 = 10 ** 10
for i in yakusuu:
    if len(str(i[0])) >= keta1 and len(str(i[1])) <= keta2:
        keta1 = len(str(i[0]))
        keta2 = len(str(i[1]))
print(max(keta1, keta2))

Solution (Python):
n = int(input())
ans = int(1e16)
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))))
print(ans)

Solution (Python):
N = int(input())
A = 0
B = 0
num = 0
ans = 10**10

for i in range(1, int((N)**(1/2)+1)):
  if N%i == 0:
    A = len(str(i))
    B = len(str(N//i))
    num = max(A, B)
    ans = min(ans, num)
print(ans)

Solution (Python):
import math

N = int(input())
n = 1
divisor = []

while n*n<= N:
  if(N % n == 0):
    divisor.append(n)
  n+= 1
  
max_divisor = divisor[-1]

print(len(str(N// max_divisor)))

Solution (Python):
import math

n = int(input())
res = None
for i in range(1, int(math.sqrt(n))+2):
  if n % i == 0:
    if res is None:
      res = max(len(str(i)), len(str(n//i)))
    elif max(len(str(i)), len(str(n//i))) < res:
      res = max(len(str(i)), len(str(n//i)))
print(res)

Solution (Python):
def main():
    from math import floor, log10

    N = int(input())

    def G(x):
        return floor(log10(x)) + 1

    def F(a, b):
        return max(map(G, (a, b)))

    st = [F(1, N)]
    d = 2
    while d * d <= N:
        if N % d == 0:
            st.append(F(d, N // d))  
        d += 1

    print(min(st))


if __name__ == '__main__':
    main()

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)

    divisors.sort()
    return divisors
m = 10**100
for v in make_divisors(N):
    A = v
    B = N // v
    m = min(m, max(len(str(A)), len(str(B))))

print(m)

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

Solution (Python):
n = int(input())
sq = int(n**0.5)

ans = 11
for i in range(1, sq+1):
    if n % i == 0:
        j = n // i
        ans = min(ans, max(len(str(i)), len(str(j))))
        
print(ans)

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())

    ans = 100
    for i in range(1, N+1):
        if N % i == 0:
            ans = min(ans, max(len(str(i)), len(str(N//i))))
        if i*i >= N:
            break
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import math

N = int(input())

ans = N

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

print(ans)

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

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)
    
    return divisors


N = int(input())
A = make_divisors(N)
print(len(str(A[-1])))

Solution (Python):


import sys

import math




























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    small_divisor = []
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0:
            small_divisor.append(i)
    
    assert(n % small_divisor[-1] == 0)
    a, b = small_divisor[-1], n // small_divisor[-1]
    print(max(len(str(a)), len(str(b))))



if __name__ == "__main__":
    main()

Solution (Python):
import math

def f(A, B):
    digit_A = len(str(A))
    digit_B = len(str(B))

    return max(digit_A, digit_B)

n = int(input())

ans = 99999

for i in range(1, math.floor(math.sqrt(n)) + 1):
    if n % i != 0:
        continue
    A = i
    B = n // i
    ans = min(ans, f(A, B))

print(ans)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


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 gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





N = I()
d = make_divisors(N)

MIN = INF

for i in d:
  MIN = min(MIN,max(len(str(i)),len(str(N//i))))
print(MIN)

Solution (Python):
import math

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

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

        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

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

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

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

print(ans)

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

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

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

print(ans)

Solution (Python):
N = int(input())
sqrt_N = int(N**0.5)
ans = 10**18

for A in range(1, sqrt_N+1):
    if N % A == 0:
        B = str(N//A)
        A = str(A)
        ans = min(ans, max(len(A),len(B)))

print(ans)

Solution (Python):
n = int(input())
limit = int(n ** 0.5 + 1)

ans = 10 ** 10
for i in range(1, limit):
    if n % i == 0:
        f = max(len(str(i)), len(str(n // i)))
        ans = min(ans, f)

print(ans)

Solution (Python):
def count_digit(n):
    d = 0
    while n > 0:
        n //= 10
        d += 1
    return d


n = int(input())

i = 1
ans = 11
while i * i <= n:
    if n % i == 0:
        temp = max(count_digit(i), count_digit(n // i))
        if ans > temp:
            ans = temp
    i += 1
print(ans)

Solution (Python):
import numpy as np

def divisor(n):
    for i in reversed(range(1, int(np.sqrt(n)) + 1)):
        if n % i == 0:
            return i


n = int(input())
small = divisor(n)
big = n // small

print(len(str(big)))

Solution (Python):
n = int(input())
INF = 10**18
ans = INF


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


for i in range(1, int(n**.5)+1):
    if n % i == 0:
        ans = min(f(i, n//i), ans)

print(ans)

Solution (Python):
n = int(input())
INF = 10**18
ans = INF


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


for i in range(1, int(n**.5)+1):
    if n % i == 0:
        x = F(i, n//i)
        if x < ans:
            ans = x
print(ans)

Solution (Python):

import math
n = int(input())
m = math.floor(n**(1/2))
ans = 11
for a in range(1,m+1):
    if n % a == 0:
        b = n // a
        ans = min(ans, max(len(str(a)),len(str(b))))
print(ans)

Solution (Python):
from math import ceil, log10, sqrt

n = int(input())
ans = 0
for i in range(1, ceil(sqrt(n))+1)[::-1]:
    if n % i == 0:
        a = i
        b = n//i
        ans = max(len(str(a)), len(str(b)))
        break
print(ans)

Solution (Python):
def calc_digit(n):
    d = 0
    while n > 0:
        d += 1
        n //= 10
    return d


n = int(input())
temp = -1
ans = 12
i = 1
while i * i <= n:
    if n % i == 0:
        temp = max(calc_digit(i), calc_digit(n // i))
    ans = min(temp,ans)
    i += 1
print(ans)

Solution (Python):
n = int(input())
i = 1
divisor = n ** 0.5
min_value = 10 ** 10 + 1
while i < divisor + 1:
    if n % i == 0:
        min_value = min(min_value,max(len(str(i)),len(str(n // i))))
    i += 1
print(min_value)

Solution (Python):
n = int(input())
res = []
for i in range(1, int(n**0.5)+1):
    if n%i == 0:
        res.append([i, int(n/i)])
ans = 10**9+1
for i in range(len(res)):
    tmp = max(len(str(res[i][0])), len(str(res[i][1])))
    if ans > tmp:
        ans = tmp
print(ans)

Solution (Python):

import math

N = int(input())
def checklen(A, B):
    return max(len(str(A)), len(str(B)))

ans = float("inf")
M = round(math.sqrt(N))
for i in range(1, M+1):
    if N % i == 0:
        m = round(N/i)
        ans = min(checklen(i, m), ans)
print(ans)

Solution (Python):
N = int(input())
result = 1000000000000
for i in range(1, int(N ** 0.5) + 1):
    if N % i == 0:
        count = max(len(str(i)), len(str(N // i)))
        result = min(result, count)
print(result)

Solution (Python):
n = int(input())
import math
result_list = []
for i in range(1,math.floor(math.sqrt(n)) + 1):
  if n % i == 0:
    result_list.append(max(len(str(i)), len(str(n//i))))
    
    
print(min(result_list))

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

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



def VI(N, init=0):
  return [init for _ in range(N)]
def VVI(N, M, init=0):
  return [[init for _ in range(M)] for _ in range(N)]

def VD(N, init=0.0):
  return [init for _ in range(N)]
def VVD(N, M, init=0.0):
  return [[init for _ in range(M)] for _ in range(N)]

def Divisor(n):
  ret = []
  for i in range(1, n+1):
    if i*i > n:
      break
    else:
      if n % i == 0:
        ret.append(i)
        if i*i != n:
          ret.append(n//i)
  ret.sort()
  return ret

def digit(x):
  ret = 0
  while (x):
    x //= 10
    ret += 1
  return ret

N = int(input().rstrip())

divs = Divisor(N)

ans = int(1e18)
for div in divs:
  ddiv = N / div
  ans = min(ans, max(digit(div), digit(ddiv)))

print(ans)

Solution (Python):
import math
n = int(input().rstrip())
sqrt_n = math.sqrt(n)
possible_a = math.ceil(sqrt_n)

def b(n,a):
    for i in range(a,0,-1):
        if n%i==0:
            return i,int(n/i) 
            
def f(a,b):
    return max(len(str(a)),len(str(b)))

a,b = b(n,possible_a)
print(f(a,b))

Solution (Python):
import math


def f(a, b):
    keta_a = int(math.log10(a)) + 1
    keta_b = int(math.log10(b)) + 1
    return max(keta_a, keta_b)

n = int(input())
res = 0
for i in range(1, int(n ** 0.5) + 1):
    if (n % i == 0):
        res = i
print(f(res,n/res))

Solution (Python):
def F(a, b):
    
    
    
    
    
    

    
    return len(str(max(a, b)))


N = int(input())
ans = float('inf')
n = int(N**0.5) + 1
for a in range(1, n):
    b = N // a
    if b != N / a:
        continue
    ans = min(ans, F(a, b))
print(ans)