Problem:
 Score : 300 points    Problem Statement You are given an integer N . For two positive integers A and B , we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A , and the number of digits in the decimal notation of B . For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum value of F(A,B) as (A,B) ranges over all pairs of positive integers such that N = A \times B .      Constraints  1 \leq N \leq 10^{10}  N is an integer.         Input The input is given from Standard Input in the following format:  N       Output Print the minimum value of F(A,B) as (A,B) ranges over all pairs of positive integers such that N = A \times B .        Sample Input 1 10000      Sample Output 1 3  F(A,B) has a minimum value of 3 at (A,B)=(100,100) .       Sample Input 2 1000003      Sample Output 2 7  There are two pairs (A,B) that satisfy the condition: (1,1000003) and (1000003,1) . For these pairs, F(1,1000003)=F(1000003,1)=7 .       Sample Input 3 9876543210      Sample Output 3 6

Solution (Python):
def 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

import math
N=int(input())
INF = 3000000


ans = INF
pairs = make_divisors(N)
keta = lambda x: len(str(x))
for pair in pairs:
  tmp_ans = max(keta(pair), keta(int(N/pair)))
  ans = min(ans,tmp_ans)

print(ans)

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

element = []
i = 1
while  i * i <= n:
    if n % i == 0:
        element.append([len(str(i)),len(str(n//i))])
    i += 1
ans = max(element[0][0],element[0][1])
for i in range(len(element)):
    ans = min(max(element[i][0],element[i][1]),ans)
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

n = int(input())

def divisors(n):
    div = []
    i = 1
    while(i * i <= n):
        if n % i == 0:
            div.append(i)
            if i * i != n:
                div.append(n // i)
        i += 1
    return div

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

cand = divisors(n)

m =float('inf')

for a in cand:
    b = n // a
    c = f(a, b)
    if  c < m:
        m = c

print(c)

Solution (Python):
n = int(input())
cnt = int(n ** (1/2))
nums = []
for i in range(1,cnt+1):
    if n % i == 0:
        nums.append(i)
    else:
        pass
ans = n // nums[-1]
print(len(str(ans)))

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

Solution (Python):

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
from math import log10
n = int(input())
ans = []
for i in range(1, int(n**0.5+1)):
    if n%i == 0:
      spt1 = i
      spt2 = n//i
      ans.append(max(spt1, spt2))
print(int(log10(min(ans)))+1)

Solution (Python):
def make_divisors(n):
    ans = float("inf")
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            div1 = i
            div2 = n // i
            res = max(len(str(div1)), len(str(div2)))
        ans = min(ans, res)
    return ans

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

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

d = 0
for i in range(1, int(math.sqrt(n)) + 1):
    if not n % i:
        d = n / i

print(len(str(int(d))))

Solution (Python):
def longer_length(x, y):
    len_x, len_y = len(str(x)), len(str(y))
    if len_x > len_y:
        return len_x
    return len_y


def main():
    N = int(input())
    min_odd = longer_length(N, 1)
    for n in range(2, int(N ** 0.5)+1):
        if N % n == 0:
            i = longer_length(n, N // n)
            if i < min_odd:
                min_odd = i
    print(min_odd)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
li=[]

for i in range(1,10**5):
  if n%i==0:
    a=i
    b=n//a
    f=max(len(str(a)),len(str(b)))
    li.append(f)
print(min(li))

Solution (Python):



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


N = int(input())
F = []

i = 1
while i * i <= N:
    if N % i == 0:
        F.append(max(num_of_digits(i), num_of_digits(N//i)))
    i += 1

print(min(F))

Solution (Python):
N = int(input())
ans = N
def F(a,b):
    return max([len(str(i))for i in [a,b]])
for i in range(1,N+1):
    if i*i>N:break
    if N%i==0:
        a,b = i,N//i
        ans = min(ans,F(a,b))
print(ans)

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

fmin = 100100100100
for i in range(1, 1+int(n**0.5)+1):
  if n % i == 0:
    f = len(str(n//i))
    if f < fmin:
      fmin = f

print(fmin)

Solution (Python):
n = int(input())
ele = []
i = 1
while i * i <= n:
    if n % i == 0:
        ele.append([len(str(i)),len(str(n // i))])
    i += 1

k = max(ele[0][1],ele[0][0])
for i in range(len(ele)):
    k = min(max(ele[i][0],ele[i][1]),k)
print(k)

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

def main():
    N = int(input())
    i = 1
    digit = []
    ans = 10
    while i ** 2 <= N:
        if N % i == 0:
            tmp = calc_digit(N // i)
            if ans > tmp:
                ans = tmp
        i += 1
    print(ans)

    return 0


if __name__ == '__main__':
    main()

Solution (Python):
def func(a,b):
    digit_a=len(str(a))
    digit_b=len(str(b))
    if digit_a>=digit_b:
        return digit_a
    else:
        return digit_b

N=int(input())

INF=float('inf')
ans=INF


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

print(ans)

Solution (Python):
n=int(input())
n2=int(n**0.5)
ans=0

for i in range(1,n2+1):
    if n%i==0:
        ans=len(str(n//i))
        
print(ans)

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

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

N = int(input())
divisors = make_divisors(N)
ans = 11
for i in range(0, len(divisors), 2):
    d1 = int(math.log10(divisors[i]))+1
    d2 = int(math.log10(divisors[i+1]))+1
    ans = min(ans, max(d1, d2))
print(ans)

Solution (Python):
N=int(input())
n=len(str(N))
m=(n//2)
def wari(x):
    array=[]
    if m==0:
        for j in range(9,0,-1):
            if N%j==0:
                c=max(len(str(N//j)),len(str(j)))
                array.append(c)
                break
        
    for i in range(m+1):
        if i==0:
            for j in range(9,0,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
        else:
            for j in range((10**(i+1))-1,(10**i)-1,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
    return min(array)
print(wari(N))

Solution (Python):
import math

N=int(input())
start=math.floor(math.sqrt(N))
for i in range(start,1,-1):
    if (N%i==0):
        print(len(str(max(i,N//i))))
        break
else:
    print(len(str(N)))

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

Solution (Python):

import math
n = int(input())

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

Solution (Python):
from math import sqrt,ceil
n = int(input())
val = ceil(sqrt(n))
ans = int(1e10) + 7
for i in range(1,val + 1):
    if n % i == 0:
        ans = max(len(str(i)),len(str(n//i)))
print(ans)

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

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

def main():
    mod=10**9+7
    N=I()
    
    def F(a,b):
        na=len(str(a))
        nb=len(str(b))
        return max(na,nb)
    
    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
    
    L=make_divisors(N)
    ans=10**10
    for i in range(len(L)):
        a=L[i]
        b=N//L[i]
        temp=F(a,b)
        ans=min(ans,temp)
        
    print(ans)
        
        

main()

Solution (Python):
def large_digits(A, B):
    return max(len(str(A)), len(str(B)))

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

def main():
    N = int(input())
    divs = make_divisors(N)
    
    ans = 10**10 + 1
    for d in divs:
        ans = min(ans, large_digits(d, N // d))
    
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):

import math
def main():
    N = int(input())
    ans = len(str(N))
    for i in range(1, math.ceil(math.sqrt(N))+1):
        if N % i == 0:
            tmp = max(len(str(i)), len(str(N // i)))
            if ans > tmp:
                ans = tmp
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):

from fractions import gcd
def main():
    N = int(input())
    ans = len(str(N))
    for i in range(len(str(N)) // 2 + 1):
            for j in reversed(range(10**i, 10**(i+1))):
                if N % j == 0:
                    tmp = max(len(str(j)), len(str(N // j)))
                    if ans > tmp:
                        ans = tmp
                    break
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
import math
sqrt_n = int(math.sqrt(n)) + 1

div = len(list(str(n)))

for v in range(1,sqrt_n):
    if n%v == 0:
        b = int(n / v)
        a_div = len(list(str(v)))
        b_div = len(list(str(b)))
    
        if a_div < b_div:
            if div >= b_div:
                div = b_div
        else:
            if div >= a_div:
                div = a_div
print(div)

Solution (Python):
n=int(input())
m=int(n**.5)+1
ans=[]
for a in range(m, 0, -1):
    b=n//a
    if a*b==n:
        ans.append(max(len(str(a)),len(str(b))))
print(min(ans))

Solution (Python):
import math

n = int(input())
a = math.ceil(n**0.5)
ans = 10000000000000000000000000

for i in range(1,a+1):
    if n % i == 0:
        r = int(n/i)
        ans = min( ans , max(len(str(i)) , len(str(r))))
        
print(ans)

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

ans = 20
for i in range(len(ab_lst)):
    a = ab_lst[i][0]
    b = ab_lst[i][1]
    if a < b: f = len(str(b))
    else: f = len(str(a))
    
    if f < ans:
        ans = f
print(ans)

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

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

f_min = sum_order(1, n)
limit = int(pow(n, 1 / 2))
for i in range(2, limit + 1):
    if n % i == 0:
        f = sum_order(i, n // i)
        f_min = min(f_min, f)

print(f_min)

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

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

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

ans = 11

for i in range(1, 100001):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

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


def dig(n):
    ret = 0
    while n > 0:
        ret += 1
        n //= 10
    return ret


while i*i <= n:
    if n % i == 0:
        ans = min(ans, max(dig(i), dig(n//i)))
    i += 1

print(ans)

Solution (Python):
from collections import defaultdict

n = int(input())
fact = defaultdict(int)
fact[1] = 1
f = 2
k = n
while f * f <= min(k * k, n):
    if k % f == 0:
        fact[f] += 1
        k //= f
    else:
        f += 1
if k > 1:
    fact[k] += 1


def digits(n):
    ret = 0
    while n > 0:
        ret += 1
        n //= 10
    return ret


def dfs(index, mul, fact):
    if index >= len(fact):
        return max(digits(mul), digits(n // mul))
    k, v = fact[index]
    ret = 10
    for i in range(v + 1):
        ret = min(ret, dfs(index + 1, mul * pow(k, i), fact))
    return ret


print(dfs(0, 1, list(fact.items())))

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

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

Solution (Python):
n = int(input())
tes = 0
div = int(n**0.5)

while tes == 0 and div > 0:
  if n % div != 0:
    div -= 1
  else:
    tes = 1

import math
print(int(math.log10(n / div)+1))

Solution (Python):
import math
N = int(input())
for i in range(int(math.sqrt(N)) + 1, 0, -1):
    q, m = divmod(N, i)
    if m == 0:
        print(len(str(q)))
        break

Solution (Python):
from math import sqrt, ceil

n = int(input())
ans = 10**10+1

for i in range(1, ceil(sqrt(n))+1):
    d, m = divmod(n, i)
    if m == 0:
        left = len(str(i))
        right = len(str(d))
        f = max(left, right)
        if f <= ans:
            ans = f
print(ans)

Solution (Python):

import math
n=int(input())

def keta(x):
    cnt=0
    while int(x)>0:
        x/=10
        cnt+=1
    return cnt
limit_a=int(math.sqrt(n))
ans=n
for a in range(1,limit_a+1):
    if n%a==0:
        b=int(n/a)
        f=max(keta(a),keta(b))
    if ans>f:
        ans=f
print(ans)

Solution (Python):

f = lambda x, y: len(str(max(x, y)))

if __name__ == '__main__':
    n = int(input())
    a = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            a.append((i, n // i))
            if i != n // i:
                a.append((n//i, n // (n // i)))
    k = [f(e[0], e[1]) for e in a]
    print(min(set(k)))

Solution (Python):
def f(a, b):
    digit_a = digit_b = 0

    while a:
        digit_a += 1
        a //= 10

    while b:
        digit_b += 1
        b //= 10

    return max(digit_a, digit_b)


n = int(input())

ans = n

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

print(ans)

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

Solution (Python):
def get_digit(n : int) -> int:
    count = 0
    while n != 0:
        count += 1
        n //= 10
    return count

N = int(input())

i = 1
candidate = 0
while i * i <= N:
    if N % i == 0:
        candidate = N // i
    i += 1


print(get_digit(candidate))

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

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


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

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

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

ln = count_digit(n)
i = 1
while ((i*i) <= n):
    if n % i == 0:
        b = int(n // i)
        cur = max(count_digit(i), count_digit(b))
        if ln > cur:
            ln = cur
    i+=1

print(ln)

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

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

import math

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

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

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

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 i in d:
    p = N // i
    keta = max(len(str(i)), len(str(p)))
    ans = min(ans, keta)

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)
            divisors.append(n//i)
    return divisors

N = int(input())
divisors = make_divisors(N)
ans = 12
for i in range(0, len(divisors), 2):
    a, b = divisors[i], divisors[i+1]
    m, n = 0, 0
    for x in range(1, 12):
        if a < 10 ** x:
            m = x
            break
    for x in range(1, 12):
        if b < 10 ** x:
            n = x
            break
    ans = min(ans, max(m, n))
print(ans)

Solution (Python):
n = int(input())
ans = []


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


for a in make_divisors(n):
    b = int(n / a)
    if len(str(a)) <= len(str(b)):
        ans.append(len(str(b)))

print(min(ans))

Solution (Python):
import math

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

for a in range(1,int(math.sqrt(n))+1):
    if (n // a) * a == n:
        if m > len(str(max(a,(n//a)))): 
            m = len(str(max(a,(n//a))))
            
print(m)

Solution (Python):
n = int(input())
def make_div(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

ans=10**11
for num in make_div(n):
    f = max(len(str(num)), len(str(n//num)))
    if ans > f:
        ans=f
print(ans)

Solution (Python):
N = int(input())
ret = float("inf")
for A in range(1,100000):
  if N % A == 0:
    ret = min(ret,max(len(str(A)),len(str(N//A))))
print(ret)

Solution (Python):
N = int(input())
ret = float("inf")
for A in range(1,100000):
  if N % A == 0:
    ret = min(ret,max(len(str(A)),len(str(N//A))))
print(ret)

Solution (Python):
def prime(n):
  if n <= 1:
    return False
  for i in range(2, int(n**0.5)+1):
    if n % i == 0:
      return False
  return True
def digit(n):
  return len(str(n))
def F(a, b):
  return max(digit(a), digit(b))
r = N = int(input())
breakpoint = 0
if prime(N):
  print(digit(N))
else:
  for i in range(1, N+1):
    if i == breakpoint or i > N**0.5:
      break
    if N % i == 0:
      r = min(r, F(i, int(N/i)))
      breakpoint = i
  print(r)

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

Solution (Python):
n = int(input())
t = int(n**(1/2))+1
for i in range(t):
    a = t-i
    if n%a == 0:
        b = int(n/a)
        print(len(str(b)))
        break

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

target_range = int(n**0.5+0.5)

min_value = 10
for x in range(1,target_range+1):
    if n%x == 0:
        result = max([len(str(x)),len(str(n//x))])
        
        
        if min_value > result:
            min_value = result
            
print(min_value)

Solution (Python):

import sys


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)


if __name__ == '__main__':
    main()

Solution (Python):
import math

N = int(input())

max_A = math.floor(N**0.5)

ans = len(str(N))

for A in range(1, max_A+1):
  if N % A == 0:
    B = int(N / A)
    if len(str(B)) >= len(str(A)) and len(str(B)) < ans:
      ans = len(str(B))
      
    elif len(str(A)) > len(str(B)) and len(str(A)) < ans:
      ans = len(str(A))
      

print(ans)

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

Solution (Python):

n=int(input())
def f(a,b):
    return max(len(str(a)),len(str(b)))
for i in range(1,int(n**.5)+1):
    if n%i==0:
        ans=f(i,n//i)
print(ans)

Solution (Python):
from math import sqrt
N = int(input())
v = int(sqrt(N)) + 1
ans = 100
for i in range(v, 0, -1):
    if N % i == 0:
        s1 = str(i)
        s2 = str(N // i)
        
        new_ans = max(len(s1), len(s2))
        ans = min(new_ans, ans)
print(ans)

Solution (Python):
from math import sqrt
N = int(input())
v = int(sqrt(N)) + 1
for i in range(v, 0, -1):
    if N % i == 0:
        s1 = str(i)
        s2 = str(N // i)
        
        ans = max(len(s1), len(s2))
        print(ans)
        exit()

Solution (Python):

import math

def get_number_of_digits(n):
    return int(math.log10(n) + 1)

def get_larger_digits(a, b):
    return max(get_number_of_digits(a), get_number_of_digits(b))

n = int(input())
min_digit = float('inf')
for a in range(1, int(math.sqrt(float(n))+5.0)):
    if n % a != 0:
        continue
    b = int(n / a)
    if n == a * b:
        temp_digit = get_larger_digits(a, b)
        min_digit = min(min_digit, temp_digit)
print(min_digit)

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


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


n = int(input())
print(make_divisors(n))

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

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

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

F = 1
F_min = 10**10

for A in range(1,int((N+1)**(1/2))+1):
  if N%A == 0:
    F = max(len(str(A)),len(str(int(N/A))))
    if F_min > F:
      F_min = F
            
print(F_min)

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)

from collections import defaultdict
d = defaultdict(list)

import operator
from functools import reduce


def prod(iterable):
    return reduce(operator.mul, iterable, 1)















def dividers(n: int):
    for i in range(1, math.ceil(math.sqrt(n)) + 1):
        if n % i == 0:
            yield i


def prime_factor(n: int):
    res = defaultdict(int)
    res[1] = 1
    for i in range(2, math.ceil(math.sqrt(n))):
        while (n % i == 0):
            res[i] += 1
            n = n // i

    if (n != 1):
        res[n] = 1

    return res


def flatten_key_count(d):
    return sum([[k for _ in range(d[k])] for k in d.keys()], [])


def resolve():
    
    N = [int(x) for x in sys.stdin.readline().split()][0]  
    
    

    
    
    
    

    logger.debug('{}'.format([]))

    if N == 1:
        print(1)
        return

    _min = 10**10
    for a in dividers(N):
        b = N // a

        if a > b:
            _min = min(_min, len(str(a)))
        else:
            _min = min(_min, len(str(b)))

    print(_min)


if __name__ == "__main__":
    resolve()





import sys
from io import StringIO
import unittest


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)

Solution (Python):
import math

n = int(input())

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

min = 10

for i in range(1,int(math.sqrt(n))+1):
    if n%i==0 and min > f(i,n//i):
        min = f(i,n//i)

if n<10:
    min=1

print(min)

Solution (Python):


n = int(input().rstrip())

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

print(ans)

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

result = []
for i in range(1, int(n**(1/2)+1)):
    if n%i==0:
        result.append(max(len(str(i)), len(str(n//i))))
print(min(result))

Solution (Python):
import sys

import numpy as np
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
from collections import deque, defaultdict, Counter
from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
"""dd = [(-1, 0), (0, 1), (1, 0), (0, -1)];
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)];
ddn9 = ddn + [(0, 0)]
for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""

def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]  
def ws(): return sys.stdin.readline().split()
def si(): return int(sys.stdin.readline())  
def ss(): return input()
def hi(n): return [si() for _ in range(n)]
def hs(n): return [ss() for _ in range(n)]  
def s_list(): return list(input())
def mi(n): return [wi() for _ in range(n)]  
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]  
def grid(n): return [s_list() for _ in range(n)]


def main():
    n = int(input())
    root_n = np.sqrt(n)
    root_n = int(root_n)
    ans = 10**10
    for i in range(1,root_n+1):
        if n % i == 0:
            b = n // i
            str_b = str(b)
            ans = min(ans, 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())
from math import sqrt

ans = 11
for i in range(1, int(sqrt(N)) + 1):
    if N % i == 0:
        ans = min(ans, F(N // i, i))
print(ans)

Solution (Python):
import math

n = int(input())
ans = 10

for a in range(1, int(math.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())
A = 1
L = len(str(N))
while A <= math.sqrt(N):
    if N % A == 0:
        k = max( len(str(A)), len(str(int(N/A))) )
        if k < L:
            L = k
    A +=1
print(L)

Solution (Python):
n=int(input())
mi = 10**10
for p in range(1,int(n**0.5)+1):
    if n%p==0:
        q = n//p
        digit = max(len(str(p)), len(str(q)))
        if mi > digit: mi=digit
print(mi)

Solution (Python):
def divisors(n):
    res=int(10e+14)
    for i in range(1,int(n**0.5)+1):
        if(n%i==0):
            tmp=max(len(str(i)),len(str(n//i)))
            res=min(res,tmp)
    return res

N=int(input())
print(divisors(N))

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

min_value = -1
limit = math.floor(math.sqrt(N))
for n in range(1, limit+1):
  if (N % n != 0):
    continue
  else:
    A = n
    B = N // n
    len_A = len(str(A))
    len_B = len(str(B))
    F = len_A if (len_A > len_B) else len_B
    if (min_value == -1):
      min_value = F
    else:
      if (min_value > F):
        min_value = F

print(min_value)

Solution (Python):
import math


def f(x, y):
    return max(int(math.log10(x) + 1), int(math.log10(y) + 1))


count = 10 ** 10
N = int(input())

for i in range(1, int(math.sqrt(N)) + 1):
    if N % i == 0:
        tmp = f(i, N // i)
        if tmp <= count:
            count = tmp
print(count)

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

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

fmin = 1000000000
for a in range(1, int(N ** 0.5) + 1):
    b = N // a
    if a * b == N:
        fmin = min(fmin, F(a, b))
print(fmin)

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

def myfunc(a, b):
    len_a = len(str(a))
    len_b = len(str(b))
    return max(len_a, len_b)

n_sqrt = n ** 0.5
i = 1
MIN = n
while i <= n_sqrt:
    if n % i == 0:
        MIN = min(MIN, myfunc(i, n // i))
    i += 1
print(MIN)

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

def f(a: int, b:int) -> int:
    return max(len(list(str(a))), len(list(str(b))))

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

print(ans)

Solution (Python):
from math import sqrt


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


def main():
    n = int(input())
    min_f = 10
    for a in range(int(sqrt(n))+1, 0, -1):
        if n % a == 0:
            b = n // a
            min_f = min(min_f, f(a, b))
    print(min_f)


if __name__ == "__main__":
    main()

Solution (Python):
from math import sqrt

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


def main():
    n = int(input())
    min_f = 10
    for a in range(1, int(sqrt(n))+1):
        if n % a == 0:
            b = n // a
            min_f = min(min_f, f(a, b))
    print(min_f)


if __name__ == "__main__":
    main()

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

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