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 math
N = int(input())
INF = float("inf")
for a in range(1, int(math.sqrt(N)) + 1):
    if N % a != 0:
        continue
    b = int(N / a)
    a = list(map(int, str(a)))
    b = list(map(int, str(b)))
    length = max(len(a), len(b))
    if INF > length:
        INF = length
print(INF)

Solution (Python):

import math
import copy
import itertools
n = int(input())
flg=False
for i in range(int(math.sqrt(n))+1, 0,-1):
    
    if n%i==0:
        a=i
        b=n//a
        flg=True
        break
if flg:
    print(max(len(str(a)), len(str(b))))
else:
    print(len(str(n)))

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:
        ans = min(ans,max(len(str(i)),len(str(n//i))))
print(ans)

Solution (Python):
from math import sqrt

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

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


n = int(input())
l = divisor(n)
ans = 100100100100

for i in l:
    a = len(str(i))
    b = len(str(n//i))
    ans = min(ans, max(a, b))

print(ans)

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

Solution (Python):
import math

N = int(input())

min_f = len(str(N))
for a in range(1, int(math.sqrt(N)) + 1):
  if N % a != 0:
    continue
  b = int(N / a)
  f = max(len(str(a)), len(str(b)))
  if min_f > f:
    min_f = f

print(min_f)

Solution (Python):
import math
n = int(input())
best = math.inf
cmb = None
for i in range(int(math.sqrt(n))):
    i+=1
    if n%i==0:
        if best>n//i-i:
            best=n//i-i
            cmb=i

print(int(math.log10(n//cmb))+1)

Solution (Python):
import math

N = int(input())
m = int(math.sqrt(N)) + 1

a = N
for i in range(1, m):
  if N % i == 0:
    a = N / i
print(int(math.log10(a) + 1))

Solution (Python):
n = int(input())
tmp = n
ans = n
y = tmp **0.5
o = int(y // 1)
for i in range(o+1):
    a=i+1
    
    b=n/(i+1)
    
    
    if (b.is_integer()==True ):
        kari = max(len(str(a)),len(str(int(b))))
        
        ans = min(ans,kari)
print(ans)

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

i = 1
while i*i <= n:
    if n % i == 0:
        if ans > max(len(str(i)), len(str(n//i))):
            ans = max(len(str(i)), len(str(n//i)))
    i += 1

print(ans)

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

i = 1
ans = 0
while i * i <= n:
    if n % i == 0:
        ans = max(len(str(i)), len(str(n // i)))
    i += 1
print(ans)

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

i = 1
ans = 0
while i * i <= n:
    if n % i == 0:
        ans = max(len(str(i)), len(str(n // i)))
    i += 1
print(ans)

Solution (Python):
n = int(input())
i, ans = 1, 0

while i**2 <= n:
    if n%i == 0:
        num = n//i
        ans = max(len(str(num)), len(str(i)))
    i += 1
print(ans)

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

Solution (Python):
import math
n = int(input())
m = math.floor(math.sqrt(n))
for i in range(1,m+1):
    if n % i == 0:
        x = i
y = n // x
print(max(len(str(x)),len(str(y))))

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())


N = I()
divisor = []
for i in range(int(N**.5),0,-1):
    if N % i == 0:
        if i != N//i:
            print(max(len(str(i)),len(str(N//i))))
        else:
            print(len(str(i)))
        break

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

Solution (Python):
N = int(input())
ans = 10
for i in range(1,10**5+1):
    if N % i == 0:
        A = i
        B = N//i
        stA = str(A)
        stB = str(B)
        ans = min(ans,max(len(stA),len(stB)))
    else:
        pass
print(ans)

Solution (Python):
import math

n=int(input())


amax=int(math.sqrt(n))

total=[]

for i in range(1,amax+1):
    if n%i==0:
        b=n//i
        total.append(len(str(b)))
        
print(min(total))

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

Solution (Python):
n,r=int(input()),1e9
print(min([len(str(n//i)) for i in range(1,int(n**.5)+1) if n%i==0]))

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

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

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
import math
n = int(input())
m = int(math.sqrt(n))
s = list()
for i in range(1,m+1):
    if n % i == 0:
        s.append(n/i)
    else:
        continue
print(len(str(int(min(s)))))

Solution (Python):
def check(n):
    min_len = 1 << 60
    for i in range(1, int(n**.5 + 1)):
        if n % i == 0:
            a= i
            b= n//i
            min_len = min(min_len, max(len(str(a)), len(str(b))))
    return min_len


n = int(input())
res = check(n)
print(res)

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

sol = n
for i in range(round(n**0.5), 1, -1):
    if n%i == 0:
        sol = n//i
        break

print(len(str(sol)))

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())
li = make_divisors(N)
ans = []
if len(li) % 2 == 1:
    ans.append(len(str(li[len(li)//2])))
else:
    ans.append(len(str(li[len(li) // 2])))
    ans.append(len(str(li[len(li) // 2 - 1])))
print(max(ans))

Solution (Python):
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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
lst=make_divisors(n)

ans=float('inf')
for i in lst:
    
    ans=min(ans,max(len(str(i)),len(str(n//i))))
print(ans)

Solution (Python):
n = int(input())
ans = 1e9
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):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
ans = float("inf")
for i in range(1,n+1):
    if i**2>n:
        break
    if n%i==0:
        ans = min(ans, max(len(str(i)),len(str(n//i))))
print(ans)

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

import math
a = math.floor(math.sqrt(N))
amax = 1
for i in range(1, a+1):
    if N % i == 0:
        amax = i

print(math.floor(math.log10(N//amax)) + 1)

Solution (Python):
import math
n = int(input())
ans = float('inf')
i = 1
while i <= math.sqrt(n):
    if n % i == 0:
        a = int(len(str(i)))
        b = int(len(str(n // i)))
        ans = min(ans,max(a,b))
    i += 1
print(ans)

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

Solution (Python):
import math

N = int(input())

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

    return d

F = digit(N)

for n in range(1, int(math.sqrt(N)) + 1):
    if N % n != 0:
        continue
    else: 
        F = min(F, max(digit(n), digit(N // n)))

print(F)

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"

n = k()

m = math.ceil(math.sqrt(n))

val = []
for i in range(m):
    if n % (i+1) == 0:
        val.append(len(str(n//(i+1))))
print(min(val))

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

import math
m = math.ceil(math.sqrt(n))

val = []
for i in range(m):
    if n % (i+1) == 0:
        val.append(len(str(n//(i+1))))
print(min(val))

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

ans=[]
is_prime = [True] * (int(N**(0.5))+1)
is_prime[0] = False
for i in range(1,int(N**(0.5))+1):
    if not is_prime:
        continue
    if N%i==0:
        ans.append([i,N//i])
    else:
        for j in range(i,int(N**(0.5))+1,i):
            is_prime[j]=False

z=10
for A in ans:
    z=min(z,int(math.log10(A[1])))

print(z+1)

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

ans = 1
for i in range(2, 10 ** 5):
    if n % i == 0:
        ans = i
    if i * i > n:
        break

print(len(str(n // ans)))

Solution (Python):



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

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












import sys
sys.setrecursionlimit(10000000)


mod = 998244353
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())



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

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












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


def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
import math
root = int(math.sqrt(n))+1
ans = float('inf')
for i in range(1,root+1):
    if n%i == 0:
        left = i
        right = n//i
        ll = len(str(left))
        lr = len(str(right))
        lm = max(ll,lr)
        ans = min(ans,lm)
print(ans)

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

ans = 0

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

ans_len = max(len(str(ans)), len(str(N//ans)))

print(ans_len)

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

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

ans = 11
for i in range(1, int(n ** (1/2)) + 1):
    if n % i == 0:
        ans = min(ans, max(map(lambda x: len(str(x)), [i, n//i])))
print(ans)

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

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

    
    return divisors

d = make_divisors(n)
ans = 10**18
for a in d:
    b = n//a
    a = str(a)
    b = str(b)
    ans = min(ans, max(len(a), len(b)))
print(ans)

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


def f(x, y):
    return max(map(lambda z: len(str(z)), [x, y]))


N = int(input())
divs = enum_div_pairs(N)
print(min(f(x, y) for x, y in divs))

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

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

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

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

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

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

print(ans)

Solution (Python):
n=int(input())
i=1
ans=1
while i*i<=n:
  if n%i==0:
    ans=i
  i+=1
print(len(str(n//ans)))

Solution (Python):
import math
N = int(input())
ans = len(str(N))
for k in range(2,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())



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

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

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

print(a)

Solution (Python):
import math
n=int(input())
l=math.floor(math.sqrt(n))
k=math.floor(math.log10(n))+1

for i in range(2,l+1):
    if n%i==0:
        a,b=i,n//i
        x=max(math.floor(math.log10(a))+1,math.floor(math.log10(b))+1)
        k=min(x,k)
print(k)

Solution (Python):
N=int(input())
def f(n):
    for i in range(int(n**.5),0,-1):
        if n%i==0:
            return n//i
print(len(str(f(N))))

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

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

Solution (Python):
from math import sqrt,ceil
n=int(input())
a=ceil(sqrt(n))
l=[]
p=[]
for i in range(1,a+1):
    if n%i==0:
        l.append([i,n//i])
        x=len(str(i))
        y=len(str(n//i))
        p.append(max(x,y))

print(min(p))

Solution (Python):


n = int(input())
ans = len(str(n))

for i in range(1, int(n ** (1/2)) + 1):
    if i * int((n / i)) == n:
        ans = min(ans, len(str(int(n / i))))
print(ans)

Solution (Python):
from math import sqrt
n = int(input())
start = int(sqrt(n) // 1)
low_share = 0

for i in range(start,0,-1):
    if n % i == 0:
        low_share = i
        break

high_share = int(n/low_share)
ans = len(str(high_share))
print(ans)

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

Solution (Python):

printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True 
BIG = 10**18
R = 10**9 + 7


def ddprint(x):
  if DBG:
    print(x)

import math
def dig(n):
    for i in range(1,12):
        if n<10**i:
            return i

n = inn()
mn = BIG
en = int(math.sqrt(n))+2
for i in range(1,en):
    if n%i==0:
        mn = min(mn,dig(n//i))
print(mn)

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

Solution (Python):
def Divisor(N):
    Left,RightRev = [],[]
    I = 1
    while I*I<=N:
        if N%I==0:
            Left.append(I)
            if I!=N//I:
                RightRev.append(N//I)
        I += 1
    Div = Left+RightRev[::-1]
    DivCount = len(Div)
    return Div,DivCount
  
N = int(input())
Div,_ = Divisor(N)
FABMax = len(str(N))
for A in Div:
    B = N//A
    if A>B:
        break
    FABMax = min(FABMax,max(len(str(A)),len(str(B))))
print(FABMax)

Solution (Python):
def PrimeDecomp(N,ConcFlag):
    if ConcFlag:
        if N<=1:
            return [1],1
        else:
            I = 2
            PrimeDec = []
            DivCount = 1
            while I*I<=N:
                Cnt = 0
                while N%I==0:
                    N //= I
                    PrimeDec.append(I)
                if Cnt>=1:
                    DivCount *= (Cnt+1)
                I += 1
            if N>=2:
                PrimeDec.append(N)
                DivCount *= 2
            return PrimeDec,DivCount        
    else:
        if N<=1:
            return [1],[1],1
        else:
            I = 2
            PrimeDec = []
            PrimeCnt = []
            DivCount = 1
            while I*I<=N:
                Cnt = 0
                while N%I==0:
                    N //= I
                    Cnt += 1
                if Cnt>=1:
                    PrimeDec.append(I)
                    PrimeCnt.append(Cnt)
                    DivCount *= (Cnt+1)
                I += 1
            if N>=2:
                PrimeDec.append(N)
                PrimeCnt.append(1)
                DivCount *= 2
            return PrimeDec,PrimeCnt,DivCount
          
from itertools import combinations
from operator import mul
from functools import reduce
N = int(input())
PrimeDec,_ = PrimeDecomp(N,True)
FABMax = len(str(N))
for TR in range(1,len(PrimeDec)+1):
    for A in set(reduce(mul,T) for T in combinations(PrimeDec,TR)):
        B = N//A
        FABMax = min(FABMax,max(len(str(A)),len(str(B))))
print(FABMax)

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

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

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

Solution (Python):
N = int(input()) 
ans = 111111111110
for i in range(1,int(N**0.5+2)):
    if N%i == 0:
        use = N//i 
        s = str(use) 
        t = str(i) 
        ans = min(ans, max(len(s), len(t))) 

print(ans)

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

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

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


l = len(div)
flist = []
for i in range(l):
    fx = max([len(str(div[i][0])), len(str(div[i][1]))])
    flist.append(fx)

print(min(flist))

Solution (Python):






import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string
from decimal import *


BUFSIZE = 8192

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def main():
    n=int(input())
    ans=20
    for i in range(1,math.ceil(math.sqrt(n))+1):
        if n%i==0:
            a,b=str(i),str(n//i)
            ans=min(ans,max(len(a),len(b)))
    print (ans)
if __name__ == "__main__":
    main()

Solution (Python):
def calc_digits(num):
    ans = 1
    while True:
        if num // 10 == 0:
            break
        num //= 10
        ans += 1

    return ans


def main():
    N = int(input())
    ans = 10 ** 10

    for A in range(1, int(N ** 0.5) + 1):
        if N % A != 0:
            continue
        B = N // A
        A_digits = calc_digits(A)
        B_digits = calc_digits(B)

        max_digits = max(A_digits, B_digits)
        if max_digits < ans:
            ans = max_digits

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
r_N = int(N ** (1 / 2))
 
li = []
for n in range(1,r_N + 1):
  if N % n == 0:
    a = N // n
    l = max(len(str(a)),len(str(n)))
    li.append(l)
    
print(min(li))

Solution (Python):
n=int(input())
l=[]
t=int(n**0.5)
while len(l)==0:
    if n%t==0:
        l.append((t,n//t))
    t-=1
x,y=l[0][0],l[0][1]
ans=max(len(list(str(x))),len(list(str(y))))
print(ans)

Solution (Python):
import math
n = int(input())
max_target = int(math.sqrt(n) // 1)
ans = 10 ** 9
for a in range(1, max_target + 1):
  if n % a == 0:
    b = n // a
    f = max(len(str(a)), len(str(b)))
    ans = min(ans, f)
print(ans)

Solution (Python):
import math
N = int(input())
sqrt = math.floor(math.sqrt(N))
ans = 10
for A in range(1,sqrt+1):
    n = 0
    if N % A != 0:
        continue
    B = N / A
    while not B == 0:
        n += 1
        B //= 10
    ans = min(ans, n)
print(ans)

Solution (Python):
import math

n = int(input())

m = n

for i in range(1, math.floor(n ** 0.5) + 1):
    if n % i == 0:
        l = len(str(i))
        ll = len(str(n // i)) 
        if m > max(l, ll):
            m = max(l, ll)

print(m)

Solution (Python):
import math

def digit(n):
  return math.floor(math.log10(n)) + 1

N = int(input())
sqN = math.sqrt(N)

minD = 0

for i in range(int(sqN) + 2):
  if i == 0:
    minD = digit(N)
  elif N % (i + 1) == 0:
    D = max([digit(i + 1), digit(N // (i + 1))])
    if minD > D:
      minD = D

print(minD)

Solution (Python):
import math
n = int(input())
max_target = int(math.sqrt(n) // 1)
ans = 10 ** 9
for a in range(1, max_target + 1):
  if n % a == 0:
    b = n // a
    f = max(len(str(a)), len(str(b)))
    ans = min(ans, f)
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    N = int(input())
    n = int(N ** 0.5) + 1
    ans = 10**18
    for a in range(n, 0, -1):
        if N % a != 0: continue
        b = str(N // a)
        print(len(b))
        return

if __name__ == "__main__":
    main()

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

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

m = int(n**0.5)+1
while m:
  if n%m == 0:
    a = len(str(m))
    b = len(str(n//m))
    break
  else: m -= 1
print(max(a,b))

Solution (Python):
N = int(input())
F = 0
ans = 10 ** 10
i = 1
while i * i <= N:
  A = i
  if N % A == 0:
    B = N // A
    F = max(len(str(A)), len(str(B)))
    ans = min(ans, F)
  i += 1 
print(ans)

Solution (Python):



import sys
from io import StringIO
import unittest
import math


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """10000"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """1000003"""
        output = """7"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """9876543210"""
        output = """6"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    ans = float("inf")
    for a in range(1, int(math.sqrt(N))+1):
        if N % a == 0:
            b = N // a
            ans = min(ans, len(str(b)))
    print(ans)


if __name__ == "__main__":
    
    resolve()

Solution (Python):
n = int(input())
nn = int(n**(1/2))
while True:
    if n % nn == 0:
        break
    nn -= 1
print(len(str(n//nn)))

Solution (Python):
def calc_digits(num):
	ans = 1

	while True:
		if num // 10 == 0:
			break

		num //= 10
		ans += 1

	return ans


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

	n = int(N ** 0.5)
	ans = 10 ** 10

	for A in range(1, n + 1):
		if N % A == 0:
			B = int(N / A)
		else:
			continue

		A_digits = calc_digits(A)
		B_digits = calc_digits(B)

		max_digits = max(A_digits, B_digits)

		if max_digits < ans:
			ans = max_digits

	print(ans)



  
if __name__ == "__main__":
  	main()

Solution (Python):
import math

n=int(input())
for i in range(1,int(math.sqrt(n))+1):
    ans=0
    if n%i==0:
        j=int(n/i)
        ans1=str(i)
        ans2=str(j)
        if len(ans1)>=len(ans2):
            break

if len(ans1)>=len(ans2):
    print(len(ans1))
else:
    print(len(ans2))

Solution (Python):
import math
N = int(input())
n = int(math.sqrt(N))+1
for i in range(1, n):
  if N % i == 0:
    B = N // i
for i in range(10, -1, -1):
  if B >= 10**i:
    print(i+1)
    break

Solution (Python):
x = int(input())
ans = 10000
k = 1
while (k * k <= x):
    if (x%k == 0):
        j = max(len(str(int(x/k))), len(str(k)))
        ans = min(j, ans)
    k += 1
print(ans)

Solution (Python):








n = int(input())

i = 1
ans = 1000000000000
while i * i <= n:
    if (n % i == 0):
        a = i
        b = n//a
        a_keta = len(str(a))
        b_keta = len(str(b))
        m_keta = max(a_keta, b_keta)
        ans = min(ans, m_keta)
    i += 1
print(ans)

Solution (Python):
import math

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

N = int(input())
List = make_divisors(N)
len_a = len(List)
ans = List[ len_a // 2 ]
print( math.floor(math.log(ans , 10)) + 1 )

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

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())
l=make_divisors(n)
s=(len(l)+1)//2
a=len(str(l[:s][-1]))
b=len(str(l[::-1][:s][-1]))
print(max(a,b))

Solution (Python):
import math
n=int(input())
ans = 10**10
for a in range(1,int(math.sqrt(n))+1):
  if n%a:
    continue
  b = n//a
  ans = len(str(b))
print(ans)

Solution (Python):
import math
n = int(input())
root_n = int(math.sqrt(n)) + 10
ans = 1<<60
def f(a, b):
    len_a = len(str(a))
    len_b = len(str(b))
    return max(len_a, len_b)
for i in range(1, root_n):
    if n % i == 0:
         ans = min(ans, f(i, n // i))
print(ans)

Solution (Python):

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

for ni in range(1,n+1):
    if ni * ni <= n:
        if n % ni == 0:
            list.append(max(len(str(ni)),len(str(n//ni))))
    else:
        break
print(min(list))

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


n = int(input())
a = 1
b = n
res = float('inf')
while a * a <= n:
    if n % a == 0:
        b = n // a
        temp = max(get_digit(a), get_digit(b))
        if temp < res:
            res = temp
    a += 1
print(res)

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

print(maxn)

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

minF = N
for i in range(1, int(math.sqrt(N))+1):
  if N%i!=0:
    pass
  else:
    f = max(i,int(N/i))
    if f < minF:
      minF = f

print(len(str(minF)))

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]

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

n = int(input())
yakusu = make_divisors(n)
kazu = (len(yakusu)+1)//2
ans = 11
for j in range(kazu):
    ans = min(ans,f(yakusu[j],yakusu[-(j+1)]))

print(ans)

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

while n%m:
    m -= 1

print(len(str(n//m)))

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

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

max_list= []
for j in range(len(l)):
    max_list.append(max(l[j][0], l[j][1]))
print(min(max_list))

Solution (Python):
import math

n = int(input())
i = math.ceil(n ** 0.5)

while i > 0:
    if n % i == 0:
        print(len(str(n // i)))
        break
    i -= 1

Solution (Python):

def Divisors(N):
    N=abs(N)
    L,U=[],[]
    k=1
    while k*k <=N:
        if N%k== 0:
            L.append(k)
            if k!=N//k:
                U.append(N//k)
        k+=1
    return L+U[::-1]

def f(A,B):
    M=max(A,B)
    return len(str(M))

N=int(input())
L=Divisors(N)
Y=float("inf")
for a in L:
    Y=min(Y,f(a,N//a))
print(Y)