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


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

keta_min_sort = sorted(make_divisors(n))


print(keta_min_sort[0])

Solution (Python):
import math

n = int(input())

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

results = []


itr_end = int(math.sqrt(n)) + 1

for i in range(1, itr_end):
    if n % i == 0:
        a = i
        b = n / i
    result = f(a, b)
    results.append(result)

print(min(results))

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

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

results = []

for i in range(1, int(n ** (1/2)) + 1):
    if n % i == 0:
        a = i
        b = n / i
    result = f(a, b)
    results.append(result)

print(min(results))

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

fab = 0

ans = 1000

n_s = int(n ** (1/2))

for i in range(1, n_s + 2):
    if n % i == 0:
        a = len(str(i))
        b = len(str(int(n / i)))
        
        if a > b and a < ans:
            ans = a
        elif a < b and b < ans:
            ans = b
        elif a == b and a < ans:
            ans = a


print(ans)

Solution (Python):
def handan(a,b):
  return max(len(str(a)),len(str(b)))
def yakusu(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())
L=yakusu(N)
maxa=10**10
for i in range(len(L)):
  s=L[i]
  t=N//s
  maxa=min(maxa,handan(s,t))
print(maxa)

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

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

pairs=[]
for i in range(1,int(N**.5)+5):
  if N % i == 0:
    pairs.append((i,N//i))
    
def f(pair):
  return max(len(str(pair[0])),len(str(pair[1])))

print(min(map(f,pairs)))

Solution (Python):

import math
N=int(input())

def func(A,B):
  if A > B:
    return len(str(A))
  else:
    return len(str(B))


ans=[]
N2=math.floor(math.sqrt(N))
for A in range(1,N2+1):
  if N%A==0:
    B=int(N/A)
    ans.append(func(A,B))

print(min(ans))

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

import math
def main():
    N = int(input())

    ans = 10**10
    for i in range(1, int(math.sqrt(N)) + 1):
        j = N // i

        if i * j == N:
            ans = min(ans, f(i, j))

    print(ans)

if __name__ == "__main__":
    main()

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

if __name__ == '__main__':
    main()

Solution (Python):
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 factorize_list_format_change(fact_list_old):
    fact_list_new = []
    for prime_num in fact_list_old:
        for _ in range(prime_num[1]):
            fact_list_new.append(prime_num[0])
    return fact_list_new


def calc_degit(num):
    return len(str(num))

def solve():
    N = int(input())
    fact_list_old = factorization(N)
    fact_list = factorize_list_format_change(fact_list_old)
    min_F = calc_degit(N)
    for i in range(1, 2**len(fact_list)):
        A = 1
        B = 1
        grouping_str = format(i, '0'+str(len(fact_list))+'b')
        for j in range(len(fact_list)):
            if grouping_str[j] == "0":
                A *= fact_list[j]
            else:
                B *= fact_list[j]
        min_F_temp = max(calc_degit(A), calc_degit(B))
        if(min_F_temp < min_F):
            min_F = min_F_temp
    print(min_F)


if __name__ == "__main__":
    solve()

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

for a in range(1,int(n**0.5+1)):
    if n%a==0:
        b=n//a
        sa=str(a)
        sb=str(b)
        if a<=b:
             ans=len(sb)
        else:
            break

print(ans)

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

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

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

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

res = 100

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

print(res)

Solution (Python):
n = int(input())
import math
ans = 100000000000
for i in range(int(math.sqrt(n))+1):
    if n%(i+1) == 0:
        ans = min(ans, max(len(str(n//(i+1))), len(str(i+1))))
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):
N = int(input())
mn=100
for A in range(1,int(N**(0.5))+1):
    cnta=0
    cntb=0
    if N%A==0:
        B=N/A
        while A>0:
            A//=10
            cnta+=1
        while B>0:
            B//=10
            cntb+=1
        cnt=max(cnta,cntb)
        mn=min(mn,cnt)
print(mn)

Solution (Python):
import math
n=int(input())
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
num=factorization(n)
if len(num)==1:
    if num[0][1]==1:
        ans=num[0][0]
    else:
        ans=num[0][0]*(-(num[0][1]//-2))
    print(len(str(ans)))
else:
    num2=int(math.sqrt(n))
    if num[-1][0]>=num2:
        ans=num[-1][0]
    else:
        for i in range(num2):
            if n%(num2-i)==0:
                ans=n//(num2-i)
                break
    print(len(str(ans)))

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

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

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







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


ans = float('inf')
for a in range(1, int(math.sqrt(N)) + 1):
    if N % a != 0:
        continue
    b = int(N / a)
    a = str(a)
    b = str(b)
    
    ans = min(ans, f(a, b))
print(ans)

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

Solution (Python):
import math

def input_li():
    return list(map(int, input().split()))


def input_int():
    return int(input())


N = input_int()
ans = len(str(N))
for i in range(1, math.ceil(N ** 0.5) + 1):
    if (N / i).is_integer():
        ans = min(ans, max(len(str(i)), len(str(N // i))))
print(ans)

Solution (Python):
from math import *
N=int(input())
K=sqrt(N)
F=11
for a in range(1,int(K)+1):
  if N%a==0:
    b=N//a
    al=len(str(a))
    bl=len(str(b))
    G=max(al,bl)
    F=min(F,G)
print(F)

Solution (Python):

n = int(input())
c = 10
for i in reversed(range(1, int(-(-(n**0.5) // 1)) + 1)):
    if n % i < 1:
        c = min(c, max(len(str(n // i)), len(str(i))))
print(c)

Solution (Python):






import math





N = int(input())





ans = len(str(N))
x = int(math.sqrt(N)//1)
a = 1
while a < x+1:
    if N%a == 0:
        b = N//a
        ans = min(ans,max(len(str(a)),len(str(b))))
    a += 1
print(ans)

Solution (Python):
import math
n = int(input())
a = 1
b = n

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

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

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

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

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()
length=len(divisors)
if length == 2:
    A=str(divisors[0])
    B=str(divisors[1])
elif length%2 == 0:
    A=str(divisors[length//2-1])
    B=str(divisors[length//2])
else:
    A=str(divisors[length//2])
    B=str(divisors[length//2])



ans=max(len(A),len(B))
print(ans)

Solution (Python):
import math as m
n=int(input())
A=1
B=n
for i in range(1, int(m.sqrt(n))+1):
    if n % i == 0:
        A, B = i, n // i

print(int(m.log10(B))+1)

Solution (Python):
n = int(input())
score = 100
for i in range(1, 10**6):
    if n % i == 0:
        tmp_score = max(len(str(i)), len(str(n//i)))
        if score > tmp_score:
            score = tmp_score
print(score)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re












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

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
mind = float('inf')
i = 1
while i*i <= n:
    if n%i == 0:
        if i == n//i:
            mind = min(mind, len(str(i)))
        else:
            maxd = max(len(str(i)), len(str(n//i)))
            mind = min(mind, maxd)
    i += 1
print(mind)

Solution (Python):
def F(x,y):
    x = str(x)
    y = str(y)
    return max(len(x),len(y))
N = int(input())
fmin = 100
for x in range(1,int(N**0.5)+1):
    if N%x==0:
        y = N//x
        fmin = min(fmin,F(x,y))
print(fmin)

Solution (Python):
n = int(input())
x = round(n**0.5)

while n%x!=0:
    x -= 1
y = n//x
print(len(str(max(x,y))))

Solution (Python):
N = int(input())
ds = set()
m = 1
while m*m <= N:
    if N%m==0:
        ds.add(m)
        ds.add(N//m)
    m += 1

ans = 999
for d in ds:
    e = N//d
    t = max(len(str(d)) ,len(str(e)))
    ans = min(ans, t)
print(ans)

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

def cal_divisors(N):
    divisors = []
    i = 1
    while i*i <= N:
        if N % i == 0:
            divisors.append(i)
        i += 1
    return divisors

divisors = cal_divisors(N)
ans = 10**12

for d in divisors:
    ans = min(ans,max(len(str(d)),len(str(N//d))))
print(ans)

Solution (Python):
N=int(input())
ans=1000000
import math
aa=math.sqrt(N)
aa=int(aa//1)
for A in range(1,aa+1):
    B=N/A
    if B%1.0==0.0:
        ta=len(str(A))
        tb=len(str(int(B)))
        if ta<tb:
            temp=tb
        else:
            temp=ta
        if ans>temp:
            ans=temp

print(ans)

Solution (Python):
import math

n = int(input())
ans = math.inf
for i in range(1, int(n ** 0.5) + 1):
    if (n / i).is_integer():
        ans = min(ans, max(len(str(i)), len(str(int(n / i)))))
print(ans)

Solution (Python):
import math

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

n=int(input())
rt=int(math.sqrt(n))
min_ab=10**10
for a in range (1,rt+1):
  if n % a !=0:
    continue
  b=n//a
  f_ab=max(d_len(a),d_len(b))
  min_ab=min(min_ab,f_ab)
print(min_ab)

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

a=l[-1]
b=N//a
s=max(a,b)
print(len(str(s)))

Solution (Python):
N=int(input())
from math import*
count=round(sqrt(N))+1
while count:
    if N%count==0:
        A=len(str(count))
        B=len(str(N//count))
        break
    else:
        count-=1
print(max(A,B))

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

for i in range(int(N ** 0.5), 0, -1):
    if N % i == 0:
        break

j = N // i
print(len(str(j)))

Solution (Python):
import math


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def digits(n):
    count = 1
    while n > 9:
        n //= 10
        count += 1
    return count


def solve():
    N = read_int()
    low, high = 0, 10**5+1
    while high-low > 1:
        mid = low+(high-low)//2
        if mid*mid > N:
            high = mid
        else:
            low = mid
    min_f = math.inf
    for i in range(1, low+1):
        if N%i == 0:
            min_f = min(min_f, max(digits(i), digits(N//i)))
    return min_f


if __name__ == '__main__':
    print(solve())

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

def digit(x):
    digit=1
    while x>0:
        if x//10>0:
            digit+=1
            x//=10
        else:
            break
    return digit

for i in range(int(N**(1/2)),-1,-1):
    if N%i!=0:
        pass
    else:
        print(digit(N//i))
        break

Solution (Python):
import math

n = int(input())
ans_list = []

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

print(min(ans_list))

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())

def make_divisors(n):
    i = 1
    lowest = 10**18
    while i*i <= n:
        if n % i == 0:
            lower_divisor = i
            upper_divisor = n//i
        i += 1
    return len(str(upper_divisor))
    
print(make_divisors(N))

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

if N == 1:
    print(1)
    exit()

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

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

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())
A = make_divisors(N)
ans = float("inf")

if len(A)%2 == 0:
  mid = len(A)//2
else:
  mid = len(A)//2 + 1
for i in range(mid):
  temp = max(len(str(A[i])),len(str(A[-1-i])))
  ans = min(ans,temp)
print(ans)

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

ans = 999999
m = 1
while m*m <= N:
    if N%m == 0:
        n = N//m
        t = max(len(str(n)), len(str(m)))
        ans = min(ans, t)
    m += 1
print(ans)

Solution (Python):
def main():
    def f(a, b):
        sa = str(a)
        sb = str(b)
        return max(len(sa), len(sb))
    N = int(input())
    ans = 10**12
    for i in range(1, N+1):
        if N < i*i:
            break
        if N % i != 0:
            continue
        b = N//i
        ans = min(ans, f(i, b))
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
from math import log10

N = int(input())

ans = int(log10(N)) + 1

for i in range(2, int(N ** 0.5) + 1):
    if N % i == 0:
        tmp = int(log10(N // i)) + 1
        if tmp < ans:
            ans = tmp

print(ans)

Solution (Python):
from math import log10
n = int(input())
ans = int(log10(n)) + 1
for i in range(2, int(n ** 0.5) + 1):
    if n % i == 0:
        temp = int(log10(n // i)) + 1
        if temp < ans:
            ans = temp
print(ans)

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

Solution (Python):
N = int(open(0).read())
 
ans = len(str(N))
for i in range(1, int(N ** 0.5) + 1):
    if N % i == 0:
        ans = min(ans, len(str(N // i)))
print(ans)

Solution (Python):
N = int(open(0).read())

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

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

Solution (Python):
import math

n = int(input())
i = 1
ans = 100000000000
while i <= math.sqrt(n):
    if n%i == 0:
        a = n//i
        b = i
        temp = max(len(str(a)), len(str(b)))
        ans = min(ans, temp)
    i+=1
print(ans)

Solution (Python):
import math
def count_digits(n):
	res = 0
	while n:
		n = n//10
		res = res+1
	return res
n = int(input())
i =1
ans = 11
while i<=math.sqrt(n):
	if n%i==0:
		a= n//i
		b=i
		u = count_digits(a)
		v =count_digits(b)
		ans = min(ans, max(u,v))
	i=i+1
print(ans)

Solution (Python):

import math



n = int(input())






def f(a, b):
    return max(math.floor(math.log10(a)+1), math.floor(math.log10(b))+1)


a = 1
ans = 11
while a <= math.sqrt(n):
    if n % a == 0 and f(a, n // a) <= ans:
        ans = f(a, n // a)
    a += 1

print(ans)

Solution (Python):

import math



n = int(input())






def f(a, b):
    return max(math.floor(math.log10(a)) + 1, math.floor(math.log10(b)) + 1)


a = 1
ans = 11
while a <= math.sqrt(n):
    if n % a == 0 and f(a, n // a) <= ans:
        
        ans = f(a, n // a)
    a += 1

print(ans)

Solution (Python):
import math

n = int(input())
set = []
i = 1
ans = []

t = n**0.5
if len(str(t)) <=8:
    print(len(str((math.floor(t)))))
else:
    while i*i <= n:
        cc = []
        pre = []
        if n % i == 0:
            pre.append(i)
            cc.append(len(str(i)))
            if i != n // i:
                pre.append(n//i)
                cc.append(len(str(n//i)))
                if cc == []:
                    continue
                else:
                    ans.append(pre)
                    result = abs(cc[0]-cc[1])
                    set.append(result)

        i += 1


    min = set.index(min(set))
    print(len(str((max(ans[min])))))

Solution (Python):
def div(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())
ans = float("Inf")
lis = div(n)
y = 1
for x in lis:
    z = n//x
    ans = min(ans, max(len(str(z)), len(str(x))))

print(ans)

Solution (Python):
N = int(input())
import math
if N == 1:
    print(1)
else:
    for a in reversed(range(1, (int(math.sqrt(N)))+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
    print(ans)

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

MAXN = 10 ** 5


def answer():
    minf = 10
    for a in range(1, MAXN + 1):
        if n % a == 0:
            b = n // a
            f = max(len(str(a)), len(str(b)))
            minf = min(minf, f)
    return minf


print(answer())

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

min_count = len(str(n))
for i in range(1, int(n**0.5) + 1):
  if n % i == 0:
    a = i
    b = int(n / i)
    if len(str(a)) < len(str(b)):
      count = len(str(b))
    else:
      count = len(str(a))
    if count < min_count:
      min_count = count
print(min_count)

Solution (Python):
import math
n = int(input())
for i in range(int(n**0.5),0,-1):
    if n%i == 0:
        a = max(i,n//i)
        print(int(math.log10(a))+1)
        break

Solution (Python):

import sys

sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

from collections import defaultdict
sys.setrecursionlimit(10**7)
import math






class factorials:
    '''
    args:
      n : max val when exploring factorials
    '''
    def __init__(self, n):
        self.n = 1
        self.factorials = []
        self.update(n)

    def update(self, n):
        if self.n >= n:
            return None
        for i in range(self.n+1, n+1):
            done = False
            limit = int(i ** 0.5)
            for j in self.factorials:
                if j > limit: break
                if not i % j:
                    done = True
                    break
            if not done:
                self.factorials.append(i)
        self.n = n
        return None

    def lists(self):
        return self.factorials

    def check_fact(self, x):
        if x > self.n**2:
            self.update(int(x ** 0.5)+1)
        for f in self.factorials:
            if not x % f:
                return False
        return True

def prod(lis):
    ret = []
    def f(l, product):
        
        if not l:
            ret.append(product)
            return None
        for k in l[0]:
            f(l[1:], product + [k])

    f(lis, [])
    return ret

def run():
    N = int(input())
    ori = N
    FACT = factorials(int(N ** 0.5))
    dissociated = defaultdict(lambda:0)
    for f in FACT.lists():
        while not N % f:
            dissociated[f] += 1
            N = N // f
    if N != 1:
        dissociated[N] += 1

    val_dic = {}
    lis = []
    facts = []
    for key in dissociated.keys():
        facts.append(key)
        lis.append(list(range(dissociated[key]+1)))

    products = prod(lis)
    ans = 1 << 50
    for p in products:
        S = 1
        for i, v in enumerate(p):
            S *= facts[i] ** v
        S = max(ori // S, S)
        ans = min(ans, S)

    print(math.floor(math.log10(ans))+1)
    
    
    


    
if __name__ == "__main__":
    run()

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

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

res = float('inf')
for a, b in l:
    res = min(res, max(len(str(a)), len(str(b))))

print(res)

Solution (Python):
import math

n = int(input())
min_value = 10 ** 9

for a in range(1, int(math.sqrt(n)) + 1):
  b = int(n / a)
  if n % a == 0 and n % b == 0:
    min_value = min(min_value, max(len(str(a)), len(str(b))))
print(min_value)

Solution (Python):
import math
N = int(input())
rt = 0
A = int(math.sqrt(N))
for i in range(A,0,-1):
    if N % i == 0:
      rt = len(str(N//i))
      break
print(rt)

Solution (Python):

N = int(input())

A_start = int(N**0.5)

for A in range(A_start, 0, -1):
    if N % A != 0:
        continue
    B = N // A
    print(len(str(B)))
    break

Solution (Python):
N = int(input())
I = int(N**(0.5)//1)
a = []
for i in range(1, I+1):
  if N%i==0:
    j=N//i
    i = len(list(str(i)))
    j = len(list(str(j)))
    k = max(i, j)
    a.append(k)
print(min(a))

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

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

Solution (Python):
import math

N = int(input())
ans = 100
sqrt = math.sqrt(N)
for i in range(1, math.floor(sqrt) + 1):
    if N % i == 0:
        temp = max(i, N // i)
        ans = min(ans, len(str(temp)))
print(ans)

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

ans=20
for i in range(1, int(n**0.5)+1):
    if n%i==0:
        j=n//i
        x=max(len(str(i)),len(str(j)))
        ans=min(ans,x)
print(ans)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    lower.extend(reversed(upper))
    return lower


def main():
    N = int(readline())

    divs = divisors(N)
    ans = INF
    for d in divs[: (len(divs) + 1) // 2]:
        ans = min(ans, max(len(str(d)), len(str(N // d))))

    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    from math import sqrt
    N=int(input())
    sqrtN=int(sqrt(N))
    div=[d for d in range(1,sqrtN+1) if N%d==0]
    ans=100
    for d in div:
        e=0
        for e in range(12):
            if (N//d)<10**e:
                ans=min(ans,e)
    print(ans)

if __name__=='__main__':
    main()

Solution (Python):
import itertools,collections
def make_divisors(n):
    divisors = []
    func = []
    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)
                func.append(len(str(n//i)))
            else:
                func.append(len(str(i)))

    divisors.sort()
    return func
def main():
    n = int(input())
    div = make_divisors(n)
    print(min(div))

if __name__ == '__main__':
    main()

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

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]

def main():
    n=int(input())
    m=make_divisors(n)
    a=10**10
    for i in m:
        if n//i < i:
            break
        else:
            a=min(a, f(i, n//i))
    print(a)
                
if __name__ == "__main__":
    main()

Solution (Python):
def main():
    import sys

    def input(): return sys.stdin.readline().rstrip()

    n = int(input())
    i = 1
    ans = 13
    while i*i <=n:
        if n%i == 0:
            tmp = max(len(str(i)), len(str(n//i)))
            ans = min(tmp, ans)
        i +=1 
    print(ans)
        
    
    
if __name__ == '__main__':
    main()

Solution (Python):
"""
全探索
N<=1e10なのでa<=math.sqrt(N)まで調べればよい
"""
import math
n = int(input())
mn = 1e10
for a in range(1,int(math.sqrt(n))+1) :
    if n%a == 0 :
        b = str(n//a)
        a = str(a)
        mn = min(mn,max(len(a),len(b)))
print(mn)

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

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

    i = 1
    ans = 15
    while i*i <= N:
        if N%i==0:
            
            a = i
            b = N//i
            ans = min(ans,len(str(b)))
        i += 1

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

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

def keta(x):
    count = 0
    while x != 0:
        count += 1
        x //= 10
    return count


ans = 1
ch = 0
for i in range(2,int(n**0.5)+1):
    if n%i == 0: 
        ans = max(ans,i)
        ch += 1
if ch == 0:
    print(keta(n))
    exit()

a = ans
b = n//a
ans = max(keta(a),keta(b))
print(min(ans, keta(n)))

Solution (Python):
import math,sys

N = int(input())

max = math.ceil(N**0.5)


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

Solution (Python):


n = int(input())

def f(a, b):
    
    digit_a = 0
    while(a > 0):
        digit_a += 1
        a //= 10
    
    digit_b = 0
    while(b > 0):
        digit_b += 1
        b //= 10
    
    if digit_a < digit_b:
        return digit_b
    else:
        return digit_a


def resolve(n):
    min = 10 ** 10
    for i in range(1, int(n ** 0.5)+1):
        if n % i == 0:
            if i != n//i:
                b = n//i
            else:
                b = i
            temp = f(i, b)
            if min > temp:
                min = temp

    print(min)


resolve(n)

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

while N%n:
  n-=1

print(len(str(N//n)))

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

for n in range(1,1+10**5):
  if N%n==0:
    a = min(a,max(len(str(n)),len(str(N//n))))

print(a)

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()
print(len(str(n)))

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

if __name__ == '__main__':
	
	n = int(input())

	
	A = divisor(n)

	B = []
	c_tmp = 11
	
	for i in A:
		tmp = n // i
		
		c1 = len(str(tmp))
		c2 = len(str(i))
		c2_tmp = max(c1,c2)
		c_tmp = min(c2_tmp,c_tmp)

	print(c_tmp)

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import sqrt, ceil, log10
def main():
    n = int(input())
    sqrtn = ceil(sqrt(n))
    r = n
    for i1 in range(1, sqrtn + 1):
        if n % i1 == 0:
            t1 = log10(i1)
            t2 = log10(n//i1)
            t = max(t1, t2) + 1
            r = min(r, t)
    print(int(r))

if __name__ == '__main__':
    main()

Solution (Python):
import math

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

print(min(l))

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

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()

m = float("Inf")
for i in range( 1,int(n**(1/2))+1 ):
	if n%i == 0:
		note = len(str(max(i,n//i)))
		if note < m:
			m = note
print(m)

Solution (Python):
import math

N = int(input())

d=[]

for i in range(1,int(math.sqrt(N))+1):
    if N%i == 0:
        d.append(N//i)
        d.append(i)
    
Fmin=10**10

for i in d:
    if N%i ==0:
        A = i
        B = N//i
        F = max(len(str(A)),len(str(B)))
        if F < Fmin:
            Fmin = F
print(Fmin)

Solution (Python):
import math

N=int(input())

L=int(math.sqrt(N))

for a in range(L+1,0,-1):
    if N%a==0:
        ans1=len(str(a))
        ans2=len(str(str(N//a)))
        print(max(ans1,ans2))
        exit()

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

L=int(N**0.5)

for a in range(L+1,0,-1):
    if N%a==0:
        ans1=len(str(a))
        ans2=len(str(N//a))
        print(max(ans1,ans2))
        exit()

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

L=int(N**0.5)

for a in range(L,0,-1):
    if N%a==0:
        ans1=len(str(a))
        ans2=len(str(str(N//a)))
        print(max(ans1,ans2))
        exit()

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

L=int(N**0.5)

for a in range(L+1,0,-1):
    if N%a==0:
        ans1=len(str(a))
        ans2=len(str(str(N//a)))
        print(max(ans1,ans2))
        exit()

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

ans=float('inf')
for a,b in l:
  ans=min(max(len(str(a)),len(str(b))),ans)
print(ans)

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

ans = 100
sq_n = int(sqrt(N))
for i in range(1, sq_n+1):
  if N % i == 0:
    ans = min(ans, max(len(str(i)),len(str(N//i))))
print(ans)