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())
for i in reversed(range(int(N**0.5)+1)):
    if N % i == 0:
        print(len(str(max(i, N//i))))
        exit()

Solution (Python):
from math import sqrt

N = (int)(input())

sqrt_N = int(sqrt(N))


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


for i in reversed(range(sqrt_N+1)):
    if N % i == 0:
        print(F(i, N//i))
        exit()

Solution (Python):
from math import sqrt

N = (int)(input())

sqrt_N = int(sqrt(N))


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


for i in reversed(range(sqrt_N+1)):
    if N % i == 0:
        print(F(i, N//i))
        exit()

Solution (Python):



import math,sys

def F(A,B):
	strA = str(A)
	strB = str(B)
	return len(strB) if len(strA) <= len(strB) else  len(strA)


def solveProblem(givenNumber):
	maxTimes = int(math.sqrt(givenNumber))
	maxInteger = sys.maxsize
	for x1 in range(1,maxTimes+1,+1):
		
		x2 , modX1 = divmod(givenNumber,x1)
		if modX1 == 0:
			x2int = int(x2)
			maxLength=F(x1,x2int)
			maxInteger = maxLength if maxLength <= maxInteger else maxInteger
	answer = maxInteger
	return answer


if __name__ == '__main__':
	N = int(input().strip())
	solution = solveProblem(N)
	print("{}".format(solution))

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

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

Solution (Python):

import math
def getInt(): return int(input())
def db(x): 
    global debug
    if debug: print(x)
debug = False
N = getInt()
m = int(math.sqrt(N))
for i in range(m,0,-1):
    db(i)
    if N%i==0: 
        print(int(math.log10(N//i))+1)
        break

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

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

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

Solution (Python):
def ketasu(N):
    count=1
    while N>=10:
        N//=10
        count+=1
    return count
N=int(input())
keta=10**10
for i in range(1,int(N**.5)+1):
    if N%i==0:
        keta=min(keta,max(ketasu(i),ketasu(N//i)))
print(keta)

Solution (Python):
import math
n = int(input())
rootn = int(math.sqrt(n))
ct = 0
for i in reversed(range(1,rootn+1)):
  if n%i == 0:
    tmp = n//i
    while tmp//10 != 0:
     ct += 1  
     tmp = tmp//10   
    break
print(ct+1)

Solution (Python):
import math


def divisor(num):
    if num < 0:
        return 0
    elif num == 1:
        return [1, ]
    else:
        divisor_list = [1, ]
        for i in range(2, int(math.sqrt(num) + 1)):
            if num % i == 0:
                divisor_list.append(i)
        return divisor_list


n = int(input())
divisor_list = divisor(n)
minA = divisor_list[-1]
print(len(str(n//minA)))

Solution (Python):
import math
N = int(input())
def func(a,b):
    return max(len(str(a)),len(str(b)))
ans = len(str(N))
for i in range(2,math.floor(pow(N,1/2)) + 1):
    if N % i == 0:
        div1 = i
        div2 = N // i
        if func(div1,div2) < ans:
            ans = func(div1,div2)
print(ans)

Solution (Python):
n = int(input())
rev = list(range(int(n**(1/2))+1))
rev = sorted(rev, reverse=True)
factor = 0
for i in rev:
    if n%i==0:
        factor=i
        break

def order(n):
    count = 0
    while n>0:
        n= n//10
        count += 1
    return count 

res = order(n//factor)
print(res)

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

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

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

print(ans)

Solution (Python):
from math import sqrt
def f(a, b):
    c = max(a, b)
    ret = 0
    while(c != 0):
        c //= 10
        ret += 1
    return ret

N = int(input())
cand = []
for i in range(1, int(sqrt(N) + 2)):
    if N % i != 0:
        continue
    cand.append(f(i, N // i))
print(min(cand))

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

print(ans)

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


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


N = ii()
m = float("inf")
for n in range(1, int(N ** (1 / 2)) + 1):
    if N % n == 0:
        m = min(m, f(n, N // n))
print(m)

Solution (Python):
import math
N = int(input())
min = N
for i in range(1,int(N**0.5)+1):
    if N%i == 0 and min > max(math.log10(i), math.log10(N//i)):
        min = max(math.floor(math.log10(i))+1,math.floor(math.log10(N//i))+1)
print(min)

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

Solution (Python):
from math import pow


N = int(input())
ans = len(str(10**10))

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

Solution (Python):
def abc057_c():
    from itertools import combinations

    def prime_decomposition(num):
        i = 2
        table = []
        while i * i <= num:
            while num % i == 0:
                num /= i
                table.append(i)
            i += 1
        if num > 1:
            table.append(int(num))
        return table

    n = int(input())
    primes = prime_decomposition(n)
    a = 1
    b = n

    for i in range(len(primes) // 2 + 1):
        comb = set(combinations(primes, i))
        for seq in comb:
            tmp_a = 1
            for v in seq:
                tmp_a *= v
            tmp_b = n // tmp_a
            if max(tmp_a, tmp_b) < max(a, b):
                a = tmp_a
                b = tmp_b

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


abc057_c()

Solution (Python):
import math

n = int(input())


ans = 10000000

for a in range(1, int(math.sqrt(n)+1)):
    if n % a != 0:
        continue

    b = n //a
    
    ka = len(str(a))
    kb = len(str(b))

    if max(ka, kb) < ans:
        ans = max(ka, kb)


print(ans)

Solution (Python):
import math


def F(A, B):
    return max(len(str(A)), len(str(B)))


N = int(input())
answer = len(str(N))
for A in range(1, int(math.sqrt(N)) + 1):
    if N % A == 0:
        B = N // A
        answer = min(answer, F(A, B))
print(answer)

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

Solution (Python):
import math
N = int(input())
m = int(math.sqrt(N))
a = 0
ans = 0
count = 1

for i in range(1, m+1):
    if N % i == 0:
        a = i

a = max(a, (N//a))

count = int(math.log10(a) + 1)
    
print(count)

Solution (Python):
import math
N = int(input())
m = int(math.sqrt(N))
a = 0
ans = 0
count = 1

for i in range(1, m+1):
    if N % i == 0:
        a = i

a = max(a, (N//a))

while True:
    if a >= 10:
        count += 1
        a = a// 10
    else:
        break
    
print(count)

Solution (Python):
from math import ceil, sqrt


def main():
    n = int(input())
    f_min = 30
    for a in range(1, ceil(sqrt(n)) + 1):
        if n % a != 0:
            continue
        b = n // a
        f_min = min(f_min, max(len(str(a)), len(str(b))))
    print(f_min)


if __name__ == '__main__':
    main()

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

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

ans = 10**9+7
for A in range(1,N+1) :
    if A > N/A :
        break
    if N % A == 0 :
        B = N//A
        if ans > len(str(B)) :
            ans = len(str(B))
print(ans)

Solution (Python):
N = int(input())
digit_min = len(str(N))
for i in range(2, N):
  if (N % i == 0):
    digit = len(str(N // i))
    if (digit_min > digit):
      digit_min = digit
  if (i * i > N):
    break
print(digit_min)

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

p = []
for i in range(1, int(math.sqrt(n+1))+1):
    if n % i == 0:
        p.append(i)

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

print(ans)

Solution (Python):
import math

def alldiv(x):
    div = [[1,x]]
    for i in range(2,math.floor(math.sqrt(x))+1):
        if x % i == 0:
            div.append([i, x//i])
    return div


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


N = int(input())
div = alldiv(N)

F = [max(digit(i[0]),digit(i[1])) for i in div]
print(min(F))

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

Solution (Python):


from math import sqrt

if __name__ == '__main__':
    n = int(input())
    f = 10**10
    for i in range(1, int(sqrt(n))+1):
        a = i
        b = n//a

        if a*b == n:
            f = min(max(len(str(a)), len(str(b))), f)

    print(f)

Solution (Python):
import math
n = int(input())
m = math.sqrt(n)
p = 0
q = 0
for i in range(int(m), 0, -1):
    if n % i == 0:
        p = str(i)
        q = str(int(n / i))
        break
print(max(len(p), len(q)))

Solution (Python):
import math

def ketaOk(a, N):
    for i in range(10 ** (a + 1) - 1, 10 ** a - 1, -1):
        if N % i == 0:
            M = max(i, N/i)
            return (math.floor(math.log10(M)) + 1)
        else:
            pass
    else:
        return 0

N = int(input())
a = math.floor(math.log10(N ** 0.5))

while a+1:
    ans = ketaOk(a, N)
    if ans:
        print(ans)
        break
    else:
        a = a - 1

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

Solution (Python):

import math
n = int(input())

if n==1:
    print(1)
    exit()
primes = []
x = 2
while x*x<=n:
    if n%x==0:
        primes.append(x)
        primes.append(n//x)
    x += 1



def digit(x):
    return math.ceil(math.log10(x)) + (1 if x%10==0 else 0)

res = digit(n)
for i in range(len(primes)):
    a = primes[i]
    b = n//a
    t = max(digit(a), digit(b))
    
    res = min(res, t)

print(res)

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

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

print(result)

Solution (Python):


def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def divisorize(fct):
    b, e = fct.pop()  
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base ** exponent
    return a

n = int(input())
if n == 1:
    print(1)
    exit()
fct = factorize(n)
maxDigit = n
for div in divisorize(fct):
    outNum = num(div)
    nonOutNum = int(n/outNum)
    digitOut = 0
    digitNonOut = 0
    while outNum > 0:
        digitOut += 1
        outNum = int(outNum / 10)
    while nonOutNum > 0:
        digitNonOut += 1
        nonOutNum = int(nonOutNum / 10)
    if max(digitOut, digitNonOut) < maxDigit:
        maxDigit = max(digitOut, digitNonOut)
print(maxDigit)

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

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):
import math
N=int(input())
mid=int(math.sqrt(N))
flg=0
for i in range(mid,10**5+1):
    if N%i == 0:
        flg=1
        break
if flg==0:
    for i in range(mid,0,-1):
        if N%i == 0:
            break
dekaiyo=max(N/i,i)
count=1
while dekaiyo>=10:
    dekaiyo/=10
    count+=1
print(str(count))

Solution (Python):
import math

n=int(input())
for i in range(round(math.sqrt(n))+1,0,-1):
    if n%i==0:
        a=max(i,n//i)
        break
n=0
while a>=10:
    a=a//10
    n+=1
print(n+1)

Solution (Python):
import math

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

if n % m == 0:
    print(int(math.log10(m) + 1))

else:
    for i in range(1, m)[::-1]:
        if n % (i) == 0:
            print(int(math.log10(n / i) + 1))
            break

Solution (Python):
def f(a,b):
    c=max(a,b)
    i=0
    while c>=10**i:
        i +=1
    return i
n=int(input())
for i in range(int(n**(0.5)),0,-1):
    if n%i == 0:
        j=n//i
        break
print(f(j,i))

Solution (Python):




"""
https://beta.atcoder.jp/contests/abc057/tasks/abc57_1
"""

import sys
import math
from inspect import currentframe

def debug(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args), file=sys.stderr)

N = int(input())

def F(A, B):
    return max(len(str(A)), len(str(B)))


print(min([F(A, N // A) for A in range(1, int(math.sqrt(N)) + 1) if N % A == 0]))

Solution (Python):
import math


def is_prime(num):
    if (num < 2):
        return False
    elif(num == 2):
        return True
    elif (num % 2 == 0):
        return False
    sqrt_num = int(math.sqrt(num))
    for i in range(3, sqrt_num+1):
        if i % 2 == 0:
            continue
        if (num % i == 0):
            return False
    return True


N = int(input())
if is_prime(N):
    print(len(list(str(N))))
    exit()

min_num = 11
sqrt_num = int(math.sqrt(N))
for i in range(1, sqrt_num+1):
    if (N % i == 0):
        a = N//i
        b = i
        _min_num = max(len(list(str(a))), len(list(str(b))))
        min_num = min(min_num, _min_num)
print(min_num)

Solution (Python):
n = int(input())
mul_list = []
for i in range(1, n+1):
    if i <= n / i:
        if n % i == 0:
            mul = [i, n/i]
            mul_list.append(mul)
    else:
        break
length = 10000000000000
result = 0
for line in mul_list:
    dif = len(str(line[1]))-len(str(line[0]))
    if dif < length:
       result = len(str(int(line[1])))
print(result)

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:
        M = max(i,N//i)
        
        ans = len(str(M))

print(ans)

Solution (Python):
N=int(input())
A=1
List=[]
while A<=N**(1/2):
  if N%A==0:
    List.append([A,int(N/A)])
  A+=1
Candidate=[]
for i in List:
  x=max(i)
  Candidate.append(len(str(x)))
print(min(Candidate))

Solution (Python):
import math

def calc(x):
  res = 0
  while x > 0:
    x //= 10
    res += 1
  return res

N = int(input())
ans = 20
for A in range(1, int(math.sqrt(N))+1):
  if N % A != 0:
    continue
  B = N // A
  ans = max(calc(A), calc(B))
print(ans)

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

A=N
B=1

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

for i in range(sqrtN,0,-1):
    if(N%i==0):
        A=i
        B=N//i
        break


order=max(int(math.log10(A))+1,int(math.log10(B))+1)

print(order)

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

Solution (Python):
import math
N, = map(int, raw_input().split())
mf = 100
for a in range(int(math.sqrt(N)),0,-1):
  if N%a==0:
    b = N//a
    print max(len(str(a)), len(str(b)))
    break

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

Solution (Python):
from math import log10, sqrt
n = int(input())
def keta(n):
    res = 0
    while n >0 :
        res +=1
        n //= 10
    return res
ans = 1 << 22
for a in range(1, int(sqrt(n))+1):
    if n % a == 0:
        b = n // a
        ans = min(ans, max(keta(a) , keta(b)))
print(ans)

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

Solution (Python):
import math
N=int(input())
nmax = math.ceil(math.sqrt(N))
i = 1
Bdigimin = 10
while ( i <= nmax):
	if N % i == 0:
		Bdigi = math.floor(math.log10(N/i))
		if Bdigimin > Bdigi:
			Bdigimin = Bdigi
	i += 1
print(int(Bdigimin+1))

Solution (Python):
from math import sqrt
N = int(input())
cond = []
for i in range(1, int(sqrt(N))+1):
    if N % i == 0:
        cond.append((i, N//i))


ans = 11
for c in cond:
    a, b = map(str, c)
    f = max(len(a), len(b))
    ans = min(ans, f)
    
print(ans)

Solution (Python):
n = int(input())
nn = int(n**(1/2))
ans = 15

for i in range(1,nn+1):
    if n % i == 0:
        m = n // i
        tmp = max(len(str(i)), len(str(m)))
        if tmp < ans:
            ans = tmp

print(ans)

Solution (Python):

import math
N = int(input())

for A in list(range(1, int(math.sqrt(N)) + 1))[::-1]:
    if A > math.sqrt(N): continue
    elif N % A == 0: break
    
B = N // A

for ans in range(1, 11):
    if B // 10 == 0: break
    B = B // 10

print(ans)

Solution (Python):
N = int(input())
array = []

for i in range(1, int(N**0.5)+1):
    if N % i == 0:
        array.append(len(str(N//i)))

print(min(array))

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

if n == 1:
    print(1)
    sys.exit()

yakusu = []

sq = math.ceil(math.sqrt(n))
for i in range(1, sq + 1):
    if n % i == 0:
        yakusu.append(i)
        yakusu.append(n // i)

yakusu.sort()
for i in range(len(yakusu) // 2 + 1):
    if len(yakusu) - i * 2 <= 1:
        if len(yakusu) - i * 2 == 0:
            ans = yakusu[len(yakusu) - i]
        else:
            ans = yakusu[i]
        for j in range(1, 11):
            if ans // 10 == 0:
                print(j)
                break
            ans //= 10
        sys.exit(0)

Solution (Python):
import math
n = int(input())
for i in range(int(math.sqrt(n)),0,-1):
    if n%i==0:
        a=n//i

        print(max(len(str(i)),len(str(a))))
        break

Solution (Python):
import math
N = int(input())
ans = []

def digits(n):
    count = 1
    while n // 10 != 0:
        n = n // 10
        count += 1
    return count

for a in range(1, int(math.sqrt(N)) + 1):
    if N % a == 0:
        b = N // a
        ans.append(max(digits(a), digits(b)))

print(min(ans))

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

Solution (Python):

import itertools

N = int(input())

def primes(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac

def F(a,b):
    return max([len(str(a)), len(str(b))])
    
if N == 1:
    print(1)
    exit()
    
l = primes(N)
l.append(1)
ans = []
for i in range(1,len(l)//2+1):
    comb = itertools.combinations(l, i)
    comb = list(set(list(comb)))
    for comblist in comb:
        
        tmp = 1
        for x in comblist:
            tmp *= x

        ans.append(F(tmp,N//tmp))


print(min(ans))

Solution (Python):
def 解():
    iN = int(input())
    iLim = int(iN**0.5) + 1

    iMinMax = len(str(iN))
    for i in range(iLim+1,0,-1):
        if iN % i == 0:
            iMax = len(str(max(i,iN//i)))
            if iMinMax < iMax :
                print(iMinMax)
                exit()
            else:
                iMinMax = iMax
    print(iMinMax)
解()

Solution (Python):

iN = int(input())
iLim = int(iN**0.5) + 1

iMinMax = len(str(iN))
for i in range(iLim+1,0,-1):
    if iN % i == 0:
        iMax = len(str(max(i,iN//i)))
        if iMinMax < iMax :
            print(iMinMax)
            exit()
        else:
            iMinMax = iMax
print(iMinMax)

Solution (Python):
iN = int(input())
iLim = int(iN**0.5) + 1

iMinMax = len(str(iN))
for i in range(iLim+1,0,-1):
    if iN % i == 0:
        iMax = max(i,iN//i)
        iMinMax = min(len(str(iMax)),iMinMax)
print(iMinMax)

Solution (Python):
import math
a = int(input())
b = math.sqrt(a)   
count = 10 ** 8
for i in range(1,round(b)+1):
    if a % i == 0:
        j = a // i
        if len(str(i)) >= len(str(j)):
            if count > len(str(i)):
                count = len(str(i))
        else:
            if count > len(str(j)):
                count = len(str(j))
print(count)

Solution (Python):
def solve(N):
    ret = []
    for i in range(1, int(N ** 0.5) + 1):
        if N % i == 0:
            ret.append(max(len(str(i)), len(str(N // i))))
    return min(ret)


if __name__ == "__main__":
    N = int(input())
    print(solve(N))

Solution (Python):
N = int(input())
def F(A, B):
    return max(len(A), len(B))
ans = 10
for i in range(1, int(N**(1/2))+1):
    if N % i == 0:
        ans = min(ans, F(str(i), str(int(N/i))))
print(ans)

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

maxN = int(N**(1/2))
for i in range(1,maxN+1):
    if N % i == 0:
        m1 = i

m2 = N//m1
m1 = str(m1)
m2 = str(m2)
print(max(len(str(m1)),len(str(m2))))

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


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


ans = countDigits(N)
A = 1
while A * A <= N:
    if(N % A != 0):
        A += 1
        continue
    B = N // A

    cur = max(countDigits(A), countDigits(B))
    if (ans > cur):
        ans = cur
    A += 1
print(ans)

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

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

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

Solution (Python):
import math

N = int(input())
L = []
LL = []

if N == 1:
	L.append(1)
elif N == 2:
	L.append(1, 2)
else:
	n = int(math.sqrt(N) // 1)
	x = 1
	for i in range(n + 2):
		if N % x == 0:
			L.append(x)
		x += 1

for i in L:
	LL.append(int(N // i))

LLL = []

for i in range(len(L)):
	LLL.append(max(len(str(L[i])), len(str(LL[i]))))

print(min(LLL))

Solution (Python):
import math

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

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

Solution (Python):
n = int(input())
a = int(n ** 0.5)
while a>0:
  if n%a == 0:
    print(len(str(n//a)))
    break
  a -= 1

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

Solution (Python):
import math

def getN():
    return int(input())


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


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

n = getN()
yakusuu = []
for i in range(1,int(math.sqrt(n)) + 1):
    if n % i == 0:
        yakusuu.append(i)

a = yakusuu[-1]
b = n//a

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

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


def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        i = 1
        while i*i <= num:
            if num%i == 0:
                divisor_list.append(i)


            i += 1


        return sorted(set(divisor_list))

li = make_divisor_list(N)

A = li[-1]
B = len(str(N // A))
A = len(str(A))

print(max(A,B))

Solution (Python):
def dig(x):
    cnt = 0
    while x > 0:
        cnt += 1
        x //= 10
    return cnt

N = int(input())
ans = 999
for i in range(1, 100001):
    if i > N:
        break
    di = dig(i)
    if N % i == 0:
        j = N // i
        ans = min(ans, max(di, dig(j)))
print(ans)

Solution (Python):
N = int(input())
def f(a,b):
    a = max(a,b)
    return len(str(a))
ans = float("inf")
for a in range(1, 100001):
    b, m = divmod(N, a)
    if m==0:
        ans = min(ans, f(a,b))
print(ans)

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

import math


s = []
for i in range(math.floor(math.sqrt(m))+3):
	if m%(i+1)==0:
		if (i+1) not in s:
			s.append(i+1)
		if m//(i+1) not in s:
			s.append(m//(i+1))
s.sort()

n = math.floor(math.log10(m))
a = 0
b = 0

for i in range(len(s)):
	a = math.floor(math.log10(s[i]))
	b = math.floor(math.log10(m//s[i]))
	n= min(n,max(a,b))


print(n+1)

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

Solution (Python):
n=int(input())
def divisor(n): 
    f=[]
    d=[1]
    c=0
    r=int(n**0.5)
    for i in range(2,r+2):
        while n%i==0:
            c+=1
            n=n//i
        if c!=0:
            f.append([i,c])
            c=0
    if n!=1:
        f.append([n,1])
    for i in range(len(f)):
        t=[]
        for j in range(1,f[i][1]+1):
            t.append(f[i][0]**j)
        for j in range(len(d)):
            for k in range(len(t)):
                d.append(d[j]*t[k])
    return sorted(d)
x=divisor(n)
a=x[len(x)//2]
c=0
while a>=10:
    a=a/10
    c+=1
print(c+1)

Solution (Python):
import math
def dig(i):
    dig = 0
    while i > 0:
        i //= 10
        dig += 1
    return dig

N = int(input())
lim = int(math.sqrt(N))
ans = 11
for i in range(1, lim+1):
    if N % i == 0:
        ans = min(ans, dig(N//i))
print(ans)

Solution (Python):
n = int(input())
ans = len(str(n))
import numpy

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

print(ans)

Solution (Python):
n = int(input())
ans = len(str(n))
for a in range(1, int(n ** .5) + 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 numpy as np

N = int(raw_input())
n=int(np.sqrt(N))
min_f=11
for i in range(n):
    if N%(i+1)==0:
        min_f = int(np.log10(N/(i+1)))+1

print min_f

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

count = 0
min_num = N
while count <= sq:
    count += 1
    if N % count == 0:
        A = count
        B = N / count
        num = len(str(int(max(A, B))))
        if min_num > num:
            min_num = num
print(num)

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
n = int(input())
k = 1
for i in range(1,int(math.sqrt(n))+1):
    if n% i == 0:
        k = i
j = n // k

print(max(int(math.log10(j) + 1),int(math.log10(k) + 1)))

Solution (Python):
N=int(input())
l=[]
for i in range(1,int(N**(1/2))+1):
  if N%i==0:
    l1=max(len(str(i)),len(str(int(N/i))))
    l.append(l1)
  else:
    continue
    
print(min(l))

Solution (Python):
import math
n = int(input())
mindigit = len(str(n))
for i in range(int(math.sqrt(n))):
    q, mod = divmod(n, i+1)
    if mod == 0:
        tmp = max(len(str(i+1)), len(str(q)))
        if mindigit > tmp:
            mindigit = tmp
print(mindigit)

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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

    s = int(sqrt(N))
    ans = INF
    for a in range(1, s + 1):
        b = N // a
        if a * b == N:
            ans = min(ans, max(len(str(a)), len(str(b))))
    print(ans)

    
if __name__ == '__main__':
    main()

Solution (Python):
def F(a, b):
    return max([len(str(a)), len(str(b))])
N = int(input())
import math
i = int(math.sqrt(N))
while True:
    if N % i == 0:
        print(F(i, N // i))
        break
    i -= 1

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

a = 1
ans = len(str(N))

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

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

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

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

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

i = 1
ans = 1000
while i <= sqrt(N):
  if N%i == 0:
    ans = min(ans, max(len(str(i)), len(str(N//i))))
  i += 1
  
print(ans)

Solution (Python):
N=int(input())
def function(a,b):
    return max(len(str(a)), len(str(b)))
mini=len(str(N))
lim=len(str(int(N**(0.5))))
for i in range(2,int(N**(0.5)+1)):
    if mini==lim:
        break
    if N%i==0:
        if mini>function(i,N//i):
            mini=function(i,N//i)
print(mini)

Solution (Python):


n = int(input())
ans = 10**11
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)