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())
root_N=int(math.sqrt(N))
for i in range(root_N,0,-1):
  if N%i==0:
    print(len(str(N//i)))
    break

Solution (Python):


n=int(input())

def f(a,b):
    return max(len(str(a)),len(str(b)))
m=10000
for a in range(1,10**10):
    if n%a==0:
        m=min(f(a,n//a),m)
    if n<a or n//a<a:
        break
print(m)

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

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    i = 1
    ans = 10
    while i*i <= N:
        if N%i == 0:
            f = max(len(str(i)), len(str(N//i)))
            ans = min(f, ans)
        i += 1
    
    print(ans)

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    N = i_input()
    ans = INF

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

        b = N // i
        ans = min(ans, len(str(b)))
    print(ans)

  
 
  
if __name__=="__main__":
    main()

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

def divs(n:int) -> list:
    divs = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divs.append(i)
            if i != n // i:
                divs.append(n//i)
    divs.sort()
    return divs

div_l = divs(n)
print (max(len(str(div_l[(len(div_l)//2)-1])), len(str(div_l[len(div_l)//2]))))

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

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

i=1
ans=float("inf")
while i**2<=N:
  if N%i==0:
    temp=f(i, N//i)
    ans=min(ans, temp)
  i+=1
print(ans)

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

x = int(n ** 0.5)

for i in range(x):
    if n % (x - i) == 0:
        print(len(str(n // (x - i))))
        break

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

print(min(ans))

Solution (Python):
import math
n = int(input())
s = math.ceil(math.sqrt(n))
h = 10**5
for i in range(1,s+1):
  if n%i==0:
    if h > max(len(str(i)),len(str(int(n/i)))):
      h = max(len(str(i)),len(str(int(n/i))))
print(h)

Solution (Python):
import math
n = int(input())
s = math.ceil(math.sqrt(n))
h = 10**5
for i in range(1,s+1):
  if n%i==0:
    if h > max(len(str(i)),len(str(int(n/i)))):
      h = max(len(str(i)),len(str(int(n/i))))
print(h)

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

ans=len(str(N))
for A in range(1,int(-(-N**0.5//1))+1):
    if N%A!=0:
        continue

    B=N//A
    ans=min(ans,max(len(str(A)),len(str(B))))

print(ans)

Solution (Python):
n = int(input())
ans = float("inf")

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

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

Solution (Python):
import math

n = input()
answer =  len(n)
number = int(n)
for a in range(int(math.sqrt(int(n))),1,-1):
  if number%a != 0:
    continue
  b = number//a
  answer = min(answer, max(len(str(a)),len(str(b))))
  break
  
print(answer)

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

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

digits = len(str(num))

ans = digits

for i in range(1,10 ** (digits // 2 + 1)):
    if num % i == 0:
        target = max(len(str(i)), len(str(num//i)))
        if ans >= target:
            ans = target
        else:
            print(ans)
            exit()
print(ans)

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

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

print(len(str(n//i)))

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

Solution (Python):



import sys


import pprint as pp

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]



MAXSIZE = ( 1 << 31 ) -1
MINSIZE = -( 1 << 31) + 1


def solver(input_int):
    result = len(str(input_int))
    for j in range(1, int(input_int**0.5) +1 , +1):
        divide_check = (input_int % j) != 0
        if divide_check:
            continue
        divide_value = input_int // j
        long_check = len(str(divide_value)) <= result
        if long_check:
            result = len(str(divide_value))
    
    return result


if __name__ == "__main__":
    N = II()
    print("{}".format(solver(N)))

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

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

yakusu = make_divisors(n)
l_yakusu = len(yakusu)
idx = 0

mx = 10

for a in range(1,10**5+1):
    if a>n:
        break
    if idx<l_yakusu and a==yakusu[idx]:
        idx += 1
        keta_a = len(str(a))
        keta_b = len(str(n//a))
        f = max(keta_a, keta_b)
        mx = min(mx, f)

print(mx)

Solution (Python):
import math

N = int(input())
A = []
B = []
num_list = []

root = math.floor(math.sqrt(N))


def solv(N):
    for i in range(1,root+1):
        if N%i == 0:
            A.append(i)
            B.append(N//i)
    for a,b in zip(A,B):
        a_str = str(a)
        b_str = str(b)
        a_num = len(a_str)
        b_num = len(b_str)
        if a_num > b_num:
            num_list.append(a_num)
        elif a_num < b_num:
            num_list.append(b_num)
        else:
            num_list.append(a_num)
    return print(min(num_list))

solv(N)

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

M = 1

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

M = N // M

ndm = len(list(str(M)))

print(ndm)

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

def divisors(N):
    result = 1e12
    for i in range(2, N):
        if i**2>N:
            break
        if N%i==0:
            B=int(N/i)
            tmp = max(len(str(B)), len(str(i)))
            result = min(result, tmp)
    
    if result==1e12:
        result = len(str(N))
    return result

print(divisors(N))

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

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

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

print(res)

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

out=10**10
for A in range(1,int(N**(1/2))+2):
    if N%A == 0:
        B = N//A
        KA, KB = len(str(A)), len(str(B))
        dam = max(KA,KB)
        out=min(out,dam)

print(out)

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

Solution (Python):
def cal(N):
    num=(N**0.5)//1
    num=int(num)
    for i in range(num,0,-1):
       if N%i==0:
           k=int(N/i)
           x=len(str(k))
           break
    return x

print(cal(int(input())))

Solution (Python):
import sys

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]


input = sys.stdin.readline

n = int(input())

yaku_list = make_divisors(n)
length = len(yaku_list)
half_index = int(length/2)

a = 0
b = 0
if length % 2 == 0:
    a = yaku_list[half_index]
    b = yaku_list[half_index-1]
else:
    a = yaku_list[half_index]
    b = a

keta_a = len(str(a))
keta_b = len(str(b))

print(max(keta_a,keta_b))

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

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

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

def cal(a):
  return len(str(a))
m = 11
for j in range(1,10**5+1):
  if n%j==0:
    m = min(m,max(cal(j),cal(n//j)))
    
print(m)

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

def cal(a):
  return len(str(a))
m = 11
for j in range(1,10**6+1):
  if n%j==0:
    m = min(m,max(cal(j),cal(n//j)))
    
print(m)

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

def cal(a):
  return len(str(a))
m = 11
for i in range(1,6):
  for j in range(1,10**i+1):
    if n%j==0:
      m = min(m,max(cal(j),cal(n//j)))
      
print(m)

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

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

ans = len(n)
N = int(n)

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


print(ans)

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

Solution (Python):
import math
def ten(p):
    if p == 0:
        return 0
    else:
        return ten(p // 10) + 1
N = int(input())
x = int(math.sqrt(N))
while N % x != 0:
    x -= 1
y = int(N / x)

print(ten(y))

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

n = int(input())

up = get_divisors(n)[0]
dn = get_divisors(n)[1]

ans = 11
for a, b in zip(up, dn):
    a = str(a)
    b = str(b)
    f = max(len(a), len(b))
    ans = min(ans, f)

print(ans)

Solution (Python):
N = int(input())
high_divs = []
k = 1

while k*k <= N:
  if N%k == 0:
    high_divs.insert(0,N//k)
  k += 1

print(len(str(high_divs[0])))

Solution (Python):
N=int(input())
i=1
ans=1000000000000
while i*i<=N:
    if N%i==0:
        x=i
        y=N//i
        ans=min(ans,max(len(str(x)),len(str(y))))
    i+=1
print(ans)

Solution (Python):
n = int(input())
def solve(n):
    i = 1
    ans = 10000000
    while i*i <= n:
        if n % i == 0:
            lower = i
            if i != n // i:
                upper = n//i
            else:
                upper = i
            anstmp = max(len(str(lower)), len(str(upper)))
            if ans > anstmp:
                ans = anstmp
        i += 1
        
    return ans

print(solve(n))

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

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

flist=[]
a=int(n**0.5)

for i in range(1,a+1):
    if n%i==0:
        j=int(n/i)
        tmp=f(i,j)
        flist.append(tmp)
print(min(flist))

Solution (Python):
from math import sqrt
def solve():
    N = int(input())
    ans = float('inf')
    for A in range(1,int(sqrt(N))+1):
        if N % A == 0:
            ans = min(ans, len(str(N//A)))
    
    print(ans)

if __name__ == '__main__':
    solve()

Solution (Python):
a = int(input())
mini = 10 ** 10
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
for i in divisor(a):
    i = int(i)
    b = a//i
    maxchecker = max(len(str(i)),len(str(b)))
    mini = min(maxchecker,mini)
print(mini)

Solution (Python):
n=int(input())
def g(x):
    z=0
    while x>=1:
        z+=1
        x=x//10
    return z
def f(a,b):
    return max(g(a),g(b))
i=1
ans=10**10
while i*i<=n:
    if n%i==0:
        ans=min(ans,f(i,n//i))
    i+=1
print(ans)

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

Solution (Python):
import math

N = int(input())

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

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

Solution (Python):
import math

n = int(input())

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

ans = float('inf')
for i in range(1, int(math.sqrt(n)+1)):
  if n%i == 0:
    ans = min(ans, f(i, n//i))
print(ans)

Solution (Python):
import math
N = int(input())
lim = math.floor(math.sqrt(N))
f_min = len(str(N))
for i in range(1, lim + 1):
  if N % i == 0:
    B = int(N / i)
    if len(str(B)) < f_min:
      f_min = len(str(B))
print(f_min)

Solution (Python):
N = int(input())
M = int(pow(N,1/2))

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

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

def divisor(n):
	i=1
	table=[]
	while i*i<=n:
		if n%i==0:
			table.append(n//i)
		i+=1
	num=min(table)
	ans=len(str(num))
	return ans
  
print(divisor(N))

Solution (Python):

N = int(input())
F = [100000000000, 1]

for a in range(1, int(N ** 0.5) + 1):
    if N % a == 0:
        b = int(N / a)
        f = [a, b]
        if max(len(str(f[0])), len(str(f[1]))) < max(len(str(F[0])), len(str(F[1]))):
            F = f

print(max(len(str(F[0])), len(str(F[1]))))

Solution (Python):

import math

N = int(input())

ans = 10
for A in range(1, int(math.sqrt(N)+1)):
    if N % A == 0:
        B = int(N / A)
        tmp = max(len(str(A)), len(str(B)))
        if ans > tmp:
            ans = tmp

print(ans)

Solution (Python):
from math import *

def func(x):
  ret_val=0
  while 0<x:
    x//=10
    ret_val+=1
  return ret_val

N=int(input())
ans=func(N)
for A in range(1,int(sqrt(N))+1):
  if N%A==0:
    B=N//A
    temp=max(func(A),func(B));
    ans=min(ans,temp)
print(ans)

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

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

Solution (Python):
import sys



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


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


def input_int_list():
    return [int(i) for i in input().split()]


def make_divisors(n: int):
    lower_divs = []
    upper_divs = []
    i = 1
    while i**2 <= n:
        if n % i == 0:
            lower_divs.append(i)
            if i != n // i:
                upper_divs.append(n // i)
        i += 1
    return lower_divs + upper_divs[::-1]


def main():
    n = input_int()
    divs = make_divisors(n)
    ans = float("inf")
    for div in divs:
        a = div
        b = n // div
        if a * a <= n:
            ans = min(ans, max(len(str(a)), len(str(b))))
    print(ans)
    return


if __name__ == "__main__":
    main()

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

Solution (Python):
import math
bb = int(input())
mini = bb
aa = int(math.sqrt(bb))
for i in range(1,aa+1):
  if bb%i == 0:
    cc = int(bb/i)
    
    ans = len(str(cc))
    if ans < mini:
      mini = ans
print(mini)

Solution (Python):
import math
n = int(input())
a = 0
for i in range(1, int(math.sqrt(n))+1):
    if n % i == 0:
        a = i
b = n//a
j = 0
while True:
    m = b / (10**j)
    if m>=1 and m<10:
        ans = j+1
        break
    j+=1

print(ans)

Solution (Python):
import math
n = int(input())
if n < 10:
    print(1)
else:
    a = 0
    for i in range(1, int(math.sqrt(n))+1):
        if n % i == 0:
            a = i
    b = n//a
    j = 1
    while True:
        m = b / (10**j)
        if m>=1 and m<10:
            ans = j+1
            break
        j+=1

    print(ans)

Solution (Python):
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from functools import reduce
from math import gcd, sin, cos, tan, asin, acos, atan, degrees, radians

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def powmod(n,i,mod):
    return pow(n,mod-1+i,mod) if i<0 else pow(n,i,mod)
def div2(x):
    return x.bit_length()
def div10(x):
    return len(str(x))-(x==0)
def perm(n,mod=None):
    ans = 1
    for i in range(1,n+1):
        ans *= i
        if mod!=None:
            ans %= mod
    return ans
def intput():
    return int(input())
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x,d=1):
        self.setdefault(x,0)
        self[x] += d
    def list(self):
        l = []
        for k in self:
            l.extend([k]*self[k])
        return l
class comb():
    def __init__(self, n, mod=None):
        self.l = [1]
        self.n = n
        self.mod = mod
    def get(self,k):
        l,n,mod = self.l, self.n, self.mod
        k = n-k if k>n//2 else k
        while len(l)<=k:
            i = len(l)
            l.append(l[i-1]*(n+1-i)//i if mod==None else (l[i-1]*(n+1-i)*powmod(i,-1,mod))%mod)
        return l[k]
def pf(x):
    C = counter()
    p = 2
    while x>1:
        k = 0
        while x%p==0:
            x //= p
            k += 1
        if k>0:
            C.add(p,k)
        p = p+2-(p==2) if p*p<x else x
    return C

def f(a,b):
    return max(div10(a),div10(b))

N=intput()
L=pf(N)
S=set([(1,N)])
for k in L:
    T=set()
    for i in range(1,L[k]+1):
        for s in S:
            T.add((s[0]*(k**i), s[1]//(k**i)))
    S=S|T
ans=INF
for a,b in S:
    ans=min(ans,f(a,b))
print(ans)

Solution (Python):

url = "https://atcoder.jp//contests/abc057/tasks/abc057_c"
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())
    ans = 10000000000000000
    ns = make_divisors(n)
    for i in range(0, (len(ns)//2) + 1):
        tmp = max(len(str(ns[i])), len(str(ns[len(ns)-i-1])))
        ans = tmp if tmp < ans else ans
    if len(ns) % 2 != 0:
            tmp = len(str(ns[len(ns) // 2]))
            ans = tmp if tmp < ans else ans
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

import string

def main():
    N = i_input()

    l = []
    for i in range(1,math.ceil(sqrt(N))+1):
        if N % i == 0:
            l.append(i)

    ans = INF
    for i in l:
        b = N//i
        c = max(i,b)
        ans = min(ans, len(str(c)))
    print(ans)


if __name__=="__main__":
    main()

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

Solution (Python):

N = int(input())

Fs = [len(str(N))]

for n in range(2, int(N ** (1 / 2)) + 1):
    if N % n == 0:
        num_digit = len(str(n)) if len(str(n)) >= len(str(N // n)) else len(str(N // n))
        Fs.append(num_digit)

print(min(Fs))

Solution (Python):
from math import sqrt

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

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

    divisors.sort()
    return divisors


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

for i in make_divisors(x):
  a,b=i,x//i
  a,b=str(a),str(b)

  ans=min(ans,max(len(a),len(b)))


print(ans)

Solution (Python):
n=int(input())
a=[]
b=[]
i=1
while i*i<=n+1:
    if n%i==0:
        a.append(i)
        b.append(n//i)
    i+=1
print(max((len(list(str(a[-1])))),len(list(str(b[-1])))))

Solution (Python):
from math import sqrt
n = int(input())
res = 100
for a in range(1, int(sqrt(n)) + 1):
  if n % a == 0:
    b = n // a
    res = min(res, max(len(str(a)), len(str(b))))
print(res)

Solution (Python):
import math


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

    
    
    keta = int(math.log10(N))+1
    for A in range(1, int(pow(N, 0.5)) + 1):
        if N % A == 0:
            B = N // A
            
            keta = min(keta, int(math.log10(B))+1)

    print(keta)


main()

Solution (Python):
n = int(input())
def f(a,b):
    a = list(str(a))
    b = list(str(b))
    return max(len(a),len(b))

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

Solution (Python):
n = int(input())
def f(a,b):
    a = list(str(a))
    b = list(str(b))
    return max(len(a),len(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]

l = make_divisors(n)
if len(l)%2 == 0:
    m = float('inf')
    for i in range(len(l)//2):
        m = min(m, f(l[i],n//l[i]))
    print(m)
else:
    m = float('inf')
    for i in range(len(l)//2+1):
        m = min(m, f(l[i],n//l[i]))
    print(m)

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

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

root=int(n**0.5)

min_keta=10000000000
for i in range(1,root+1):
    if n%i==0:
        one=len(str(i))
        two=len(str(n//i))
        min_keta=min(min_keta,max(one,two))




print(min_keta)

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

ans = float("inf")
for a in range(1, N+1):
    if a * a > N: break
    if N % a ==0:
        b = N / a
        f = max(a, b)
        keta = 0
        while True:
            keta += 1
            if 10 ** keta > f:
                break
        ans = min(ans, keta)
print(ans)

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

Solution (Python):

def main():
    n = int(input())
    ans = []

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



        
if __name__ == '__main__':
    main()

Solution (Python):
import math


def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


n = input()
answer = len(n)

num = int(n)
limit = int(math.sqrt(num)) + 1
for divide in range(1, limit):
    candidate = num // divide
    if candidate * divide == num:
        digit1 = len(str(divide))
        digit2 = len(str(candidate))
        answer = min(answer, max(digit1, digit2))

print(answer)

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

print(ans)

Solution (Python):
N = int(input())
ans = 100000
for i in range(1, 17 * 10 ** 6):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

Solution (Python):
N = int(input())
ans = 100000
for i in range(1, 17 * 10 ** 6):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

Solution (Python):
N = int(input())
ans = 100000
for i in range(1, 15 * 10 ** 6):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

Solution (Python):
N = int(input())
ans = 100000
for i in range(1, 13 * 10 ** 6):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

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

print(ans)

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

print(ans)

Solution (Python):
N=int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
yakusuu=make_divisors(N)
if len(yakusuu)%2 != 0:
    print(len(str(yakusuu[len(yakusuu)//2])))
else:
    ans=pow(10,9)
    for n in range(len(yakusuu)//2):
        number=max(len(str(yakusuu[n])),len(str(yakusuu[-n-1])))
        ans=min(ans,number)
    print(ans)

Solution (Python):
N = int(input())
f = lambda x,y:len(str(x)) if x > y else len(str(y))
from math import floor, sqrt
ans = len(str(N))
for a in range(1,floor(sqrt(N))+1):
    if N % a == 0:
        ans = min(ans, f(a,N//a))
print(ans)

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

def makedivisors(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 = makedivisors(n)
m = 10**9
for a in range(len(l)):
    for b in range(len(l)):
        if l[a] * l[b] == n:
            m = min(m,digit(l[a],l[b]))
print(m)

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

def makedivisors(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 = makedivisors(n)
m = 10**9
for a in range(len(l)):
    for b in range(a,len(l)):
        if l[a] * l[b] == n:
            m = min(m,digit(l[a],l[b]))
print(m)

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

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

def divisor(num):
    max_num = int(sqrt(num))
    divisor_list = []
    for i in range(1, max_num + 1):
        if num % i == 0:
            divisor_list.append(i)
            
    return divisor_list
ans = float("inf")
for div in divisor(N):
    a = div
    b = N//div
    da = int(log10(a)) + 1
    db = int(log10(b)) + 1
    ans = min(ans, max(da,db))

print(ans)

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

Solution (Python):
import math

n=int(input())
ans=10**11
for i in range(1,math.floor(math.sqrt(n)+1)):
    if n%i == 0:
        a=i
        b=n//i
        a_len=len(str(a))
        b_len=len(str(b))
        ans=min(ans,max(a_len,b_len))
print(ans)

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

print(len(str(ans)))

Solution (Python):



def main():
    n = int(input())
    ans = len(str(n))
    for a in range(2, int(pow(n, 0.5) + 1)):
        if n % a != 0:
            continue
        b = n // a
        l = max(len(str(a)), len(str(b)))
        if ans > l:
            ans = l
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
def func(n) :
    i = 1
    b = n
    while i*i <= n :
        if n % i == 0 :
            if max(len(str(i)), len(str(n//i))) < b :
                b = max(len(str(i)), len(str(n//i)))
        
        
        i += 1
    
    return print(b)        

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