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 sys
input = sys.stdin.readline

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

def main():
    N = int(input())
    a = make_divisors(N)
    a.sort()
    ans = 10
    for i in a:
        ans = min(ans, len(str(max(i, N/i))))
    
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
rN = math.ceil(math.sqrt(N))
ans = 10
def max_digit(A, B):
    d = max(A, B)
    cnt = 0
    while d > 0:
        d = d // 10
        cnt += 1
    return cnt

for i in range(1, rN + 1):
    if N % i == 0:
        ans = min(ans, max_digit(i, N / i))
print(ans)

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

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

def get_divisors(num):
    f_divs, l_divs = [], []
    for i in range(1, int(num**0.5)+1):
        if not num % i:
            f_divs.append(i)
            l_divs.append(num // i)
    return f_divs, l_divs

div1, div2 = get_divisors(n)
ans = float("inf")
for i in range(len(div1)):
    ans = min(ans, max(len(str(div1[i])), len(str(div2[i]))))
print(ans)

Solution (Python):
import math

N = int(input())

fac = {}
mm = N

count = 0
while mm % 2 == 0:
    count += 1
    mm //= 2
if count > 0:
    fac[2] = count
f = 3
count = 0
while f ** 2 <= mm:
    while mm % f == 0:
        count += 1
        mm //= f
        
    if count > 0:
        fac[f] = count
        count = 0
    f += 2
    
if mm != 1:
    if mm in fac:
        fac[mm] += 1
    else:
        fac[mm] = 1



div = [1]

for x in fac:
    div_ = []
    for y in range(fac[x]+1):
        for z in range(len(div)):
            div_.append(div[z] * (x**y))
    div = div_[:]
M = N
for p in range(len(div)):
    M_ = int(math.log10(max(div[p],N//div[p]))) + 1
    if M_ < M:
        M = M_

print(M)

Solution (Python):
import math

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

Solution (Python):
import math

n = int(input())

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

li = []
for i in range(1,a+1):
    if n%i == 0:
        li.append(i)

memo1 = li[-1]
memo2 = n//memo1

m1 = len(str(memo1))
m2 = len(str(memo2))

print(max(m1,m2))

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

divisors = []

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

print(len(str(divisors[len(divisors) - 1])))

Solution (Python):


import math

N = int(input())



ans_list = []
for A in range(1, math.ceil(N**0.5) + 1):
    if N%A == 0:
        B = N//A
        ans_list.append(max(math.floor(math.log10(A))+1, math.floor(math.log10(B))+1))
                        
print(min(ans_list))

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

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

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


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


def main():
    N = int(input())
    a = make_divisors(N)
    a.sort()
    ans = 10
    for i in a:
        ans = min(ans, len(str(max(i, N/i))))

    print(ans)


if __name__ == '__main__':
    main()

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

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

Solution (Python):

from itertools import combinations
def factorize(n):
    retlist = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
                retlist.append(i)
    if temp!=1:
        retlist.append(temp)

    if retlist==[]:
        retlist.append(n)

    return retlist

N = int(input())

ans = 10000000
L = []
L = factorize(N)


for i in range(1,len(L)+1):
    C = []
    C = list(combinations(L,i))
    
    for c in C:
        a,b = 1,0
        for j in range(len(c)):
            a *= c[j]
        b = N//a
        a = str(a)
        b = str(b)
        
        ans = min(ans,max(len(a),len(b)))

print(ans)

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

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

def check_digit(n):
    cnt = 0
    while n > 0:
        n //= 10
        cnt += 1
    return cnt

ans = 10**9 + 7
for i in range(1, int(N**0.5//1)+1):
    if N % i == 0:
        a = i
        b = N // i
        ans = min(ans, max(check_digit(a), check_digit(b)))

print(ans)

Solution (Python):


N=int(input())

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

ans=10*10
for i in range(1,int(N**0.5//1)+1):
    if N%i==0:
        a=i
        b=N//i
        ans=min(ans,max(keta(a),keta(b)))

print(ans)

Solution (Python):
def F(a,b):
  m = max(a,b)
  count=1
  while m//10!=0:
    count+=1
    m//=10
  return count

N = int(input())
tmp=F(1,N)
for i in range(round(N**0.5),1,-1):
  if N%i==0:
    if tmp>F(i,N//i):
      tmp = F(i,N//i)
      break
print(tmp)

Solution (Python):
def main():
    import sys
    import math
    import collections
    import itertools

    input = sys.stdin.readline().rstrip

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

    print(len(str(ans_ab[1])))
    
if __name__ == '__main__':
    main()

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))

def main():
  n = ni()

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

  def digitlen(n):
    return len(str(n))
  
  def f(a, b):
    x = digitlen(a)
    y = digitlen(b)
    if x >= y:
      return x
    else:
      return y

  if n == 1:
    print(1)
    return 

  ans = int(1e9+7)
  for e in divi(n):
    b = n // e
    ans = min(ans, f(e, b))
  print(ans)
  
main()

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    ml = 10 ** 10
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            s = str(i)
            t = str(n // i)
            ml = min(ml, max(len(s), len(t)))
    print(ml)


if __name__ == '__main__':
    slove()

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

for i in range(round(n**0.5)+2,0,-1):
    if n%i==0:
        a=len(list(str(i)))
        b=len(list(str(n//i)))
        break
print(max(a,b))

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

mx = int(n**(1/2))
if (mx+1)**2 == n:
    mx += 1
a = 0
for i in range(mx, 0, -1):
    if n%i==0:
        a = i
        break

print(len(str(n//a)))

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

def order_check(x):
  y = 1
  while x >= 10:
    x = x//10
    y +=1
  return y

Answer = N

for i in range(round(math.sqrt(N))):
  if N%(i+1) ==0:
    temp = max(order_check(i+1),order_check(N/(i+1)))
    if temp < Answer:
      Answer = temp

print(Answer)

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

ans = 10 ** 11

for i in range(len(ylst)):
    for j in range(i, len(ylst)):
        if ylst[i] * ylst[j] == N:
            tmp = max(len(str(ylst[i])), len(str(ylst[j])))
            ans = min(ans, tmp)

print(ans)

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

    def trial_division():
        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)
        return divs

    divs = trial_division()
    ans = 10**10 + 7
    for d in divs:
        d_other = N // d
        F = max(len(str(d)),len(str(d_other)))
        ans = min(ans,F)
    print(ans)

if __name__ == '__main__':
    main()

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

ans = 10 ** 11

for i in range(len(ylst)):
    for j in range(i, len(ylst)):
        if ylst[i] * ylst[j] == N:
            tmp = max(len(str(ylst[i])), len(str(ylst[j])))
            ans = min(ans, tmp)

print(ans)

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

result = 100
for i in range(1, sqrt_n + 1):
  if n % i == 0:
    digit = max(len(str(i)), len(str(n // i)))
    if digit < result:
      result = digit

print(result)

Solution (Python):
n=int(input())
s=int((n)**(1/2))+1


for i in range(s+1,0,-1):
    if n%i==0:
        l=i
        break

r=n//l
l=str(l)
r=str(r)
print(max(len(l),len(r)))

Solution (Python):
from math import sqrt


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


N = int(input())

for i in range(int(sqrt(N)), 0, -1):
    if N % i == 0:
        print(F(i, N // i))
        break

Solution (Python):
import math

n = int(input())
function = []
m = round(math.sqrt(n))

for i in range(1, m+1):
    a = i
    b = n / i
    if n % a == 0:
        b = int(b)
        a = str(a)
        b = str(b)
        f = max(len(a), len(b))
        function.append(f)

print(min(function))

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

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
    
ans = float("inf")
li = make_divisors(n)
if li[-1]**2 == n:
    li.append(li[-1])

for i in range(len(li))[::2]:
    ans = min(ans, max(len(str(li[i])), len(str(li[i+1]))))
print(ans)

Solution (Python):
N=int(input())
import math
def keta_count(x):
    count=0
    while x>0:
        x=x//10
        count+=1
    return count
    
a=1
ans=10000000000000
while a<=math.sqrt(N):
    b=N//a
    if a*b != N:
        a+=1
        continue
    _=max(keta_count(a),keta_count(b))
    ans = _ if _<ans else ans
    a+=1
print(ans)

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

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

i = 1
temp = 1
while temp ** 2 <= N:
    if N % temp == 0:
        i = N // temp
        temp += 1
    else:
        temp += 1

print(max(len(str(i)), len(str(N // i))))

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

Solution (Python):
N = int(input())
ans = float('inf')
for A in range(1, int(N**0.5)+1):
    if N % A == 0:
        B = N // A
        ans = min(ans, max(len(str(A)), len(str(B))))
print(ans)

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

Solution (Python):
n=int(input())
L=[]
c=len(str(n))
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        f=max(len(str(i)),len(str(n//i)))
        c=min(c,f)
print(f)

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)

    divisors.sort()
    return divisors
l = make_divisors(n)


print(len(str(l[len(l)//2])))

Solution (Python):
def get_keta(N):
    ans = 1
    while True:
        if N // 10 != 0:
            ans += 1
            N //= 10
        if N // 10 == 0:
            break
    return ans

N = int(input())
ans = get_keta(N)

for a in range(1, int(N ** 0.5) + 1):
    if N % a != 0:
        continue
    b= N // a
    tmp = max(get_keta(a), get_keta(b))

    if ans > tmp:
        ans = tmp
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    n = int(input())
    i = int(n**(1/2))
    while n % i != 0:
        i -= 1
    print(len(str(n//i)))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    n = int(input())
    i = int(n**(1/2))
    while n % i != 0:
        i -= 1
    print(len(str(n//i)))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
n = int(input())
if n == 1:
  print(1)
  sys.exit()
min_max = 1000
for div in range(1, int(n**(0.5) + 1)):
  if n % div == 0:
    a = div
    b = n // div
    fx = max(len(str(a)), len(str(b)))
    min_max = min(min_max, fx)
print(min_max)

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

Solution (Python):
n = int(input())
ans = float("Inf")
for i in range(1,int(n**0.5)+2):
    count = 0
    if n % i == 0:
        a = max(n//i,i)
        while a:
            a = a // 10
            count += 1
        ans = min(ans,count)
print(ans)

Solution (Python):

N = int(input())

A = int(N**0.5)

ans = 1
for i in range(A,0,-1):
    if N % i == 0:
        tmp = N / i
        ans = len(str(int(tmp)))
        break
    else:
        pass

print(ans)

Solution (Python):
import math
N = int(input())
def isPrime(n):
  if n < 2:
    return False
  i = 2
  while i*i <= n:
    if n%i == 0:
      return False
    i += 1
  return True
if isPrime(N):
  print(len(str(N)))
else:
  ans = float("inf")
  i = 1
  while i <= math.sqrt(N):
    if N % i == 0:
      if i >= N // i:
        ans = min(ans,len(str(i)))
      else:
        ans = min(ans,len(str(N // i)))
    i += 1
  print(ans)

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

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

ans=10**10
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 sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
na = lambda : map(int, stdin.readline().split())
ni = lambda : int(ns())
def main():
  n = ni()
  if n == 1:
    print(1)
    return
  nagasa = lambda x: len(str(x))
  def f(a, b):
    x = nagasa(a)
    y = nagasa(b)
    return x if x > y else y

  def divi(n):
    res = []
    for i in range(1, int(n**0.5)+1):
      if n % i == 0:
        res.append(i)
        if i != n // i:
          res.append(n // i)
    return res
  x = divi(n)
  ans = 1e9
  for a in x:
    b = n // a
    ans = min(ans, f(a, b))
  print(ans)

main()

Solution (Python):


from math import sqrt, floor


def f(x):
    for i in range(floor(sqrt(x)), 0, -1):
        if x % i == 0:
            return len(str(x // i))

    raise Exception


n = int(input())

ans = f(n)
print(ans)

Solution (Python):
from math import sqrt, ceil

N = int(input())

def main():
    n = N
    curr = ceil(sqrt(n))
    while 0 < curr:
        d, q = divmod(n, curr)
        if q == 0:
            ans = len(str(max(curr, d)))
            break
        curr -= 1
    print(ans)
    
if __name__ == '__main__':
    main()

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)
  A=sorted(divisors)
  p=len(A)//2
  return len(str(A[p]))
print(make_divisors(N))

Solution (Python):
n = int(input())
i = int(n**0.5)
while i:
    if n%i==0:print(max(len(str(i)), len(str(n//i))));break
    i-=1

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

ansarr = []
a = 1

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

Solution (Python):
import math as m
N = int(input())
F_ab = 0
for i in range(1, int(m.sqrt(N))+1):
    if N%i != 0:
        continue
    if i == 1:
        F_ab = len(str(N//i))
    else:
        F_ab = min(F_ab, max(len(str(i)), len(str(N//i))))

print(F_ab)

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())

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

fact = make_divisors(N)

ans = 10000
for a in fact:
    b = N // a
    ans = min(ans,max(len(str(a)),len(str(b))))
print(ans)

Solution (Python):
n = int(input())
res = len(str(n))
for i in range(1, n // 2):
    if i**2 > n:
        break
    if n % i == 0:
        res = min([res, max(len(str(i)), len(str(n // i)))])
print(res)

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

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

Solution (Python):
def main():

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

if __name__ == "__main__":
    main()

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

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

    divisors.sort()
    return divisors

n = inp()
d = make_divisors(n)
ans = mod
for i in d:
    tmp = n//i
    ans = min(max(len(str(tmp)), len(str(i))), ans)
print(ans)

Solution (Python):
n = int(input())
a,b,c = 0,0,float("Inf")
for i in range(1,int(n**0.5)+1):
    if n % i == 0:
        a = max(i,n//i)
        b = 0
        while not a == 0:
            a //= 10
            b += 1
        c = min(c,b)
print(c)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7



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
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    ans=INF
    for i in range(1,int(n**.5)+1):
        if n%i: continue
        ans=min(ans,max(len(str(i)),len(str(n//i))))
    print(ans)
resolve()

Solution (Python):
def resolve():
    n = int(input())
    ans = 10 ** 9
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            f = max(len(str(i)), len(str(n // i)))
            if f < ans:
                ans = f
    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):
def tenlog(n):
    ans = 0
    while n != 0:
        ans += 1
        n //= 10
    return ans

import time
s = time.time()

p = [i for i in range(1,10**5+1)]
g = time.time()


N = int(input())
ans = float("inf")
for i in p:
    if N%i == 0:
        
        ans = min(ans, max(tenlog(i), tenlog(N//i)))
print(ans)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

    
    return divisors


n = I()
ret = INF
for a, b in make_divisors(n):
    ret = min(ret, max(len(str(a)), len(str(b))))


print(ret)

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

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

Solution (Python):
n=int(input())
ans=10000
for i in range(1,10**6):
  if n%i==0:
    a=i
    b=n//i
    keta=max(len(str(a)),len(str(b)))
    ans=min(keta,ans)
print(ans)

Solution (Python):

n = int(input())

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


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

Solution (Python):
def divisor(N):
    div = []
    for i in range(1, int(N ** 0.5 + 1)):
        if N % i == 0:
            div.append(i)
            if i * i != N:
                div.append(N // i)
    return sorted(div)


N = int(input())
ans = 11
for div in divisor(N):
    ans = min(ans, max(len(str(div)), len(str(N // div))))

print(ans)

Solution (Python):
import math

n = int(input())
m = int(math.sqrt(n))
for i in range(m):
    k = m-i
    if n % k == 0:
        print(max(len(str(k)), len(str(n // k))))
        break

Solution (Python):
import math

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

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

import math

lenN = len(str(N))

n = int(math.sqrt(N))
for i in range(1, n+1):
    if N % i == 0:
        x = len(str(i))
        y = len(str(N//i))
        
print(min(lenN, max(x, y)))

Solution (Python):
import math
n = int(input())
ans = int(math.sqrt(n))
while True:
  if n % ans == 0:
    ans = n // ans
    break
  else:
    ans -= 1
print(len(str(ans)))

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

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

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

    a = []
    b = []
    for i in range(1, int(pow(N, 0.5))+1):
        if N%i == 0:
            a.append(i)
            b.append(N//i)
    ans = int(1e10)
    for i in range(len(a)):
        ans = min(ans, max(len(str(a[i])), len(str(b[i]))))
    print(ans)

if __name__ == "__main__":
    main()

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

Solution (Python):
import numpy as np
import math 

N = int(input())

ans = 1e+99
for a in range(1,math.floor(np.sqrt(N))+1):
  if N % a == 0:
    b = N // a
  else:
    continue
  d_a = 1 + int(np.log10(a))
  d_b = 1 + int(np.log10(b))
  F = max(d_a, d_b)
  if F < ans:
    ans = F
print(ans)

Solution (Python):

import sys

import math


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def solve(N: int):
    from functools import reduce
    from operator import mul

    a = prime_factorize(N)
    a.sort(reverse=True)
    if(len(a)==1):
        print(len(str(a[0])))
        exit()

    
    ans = 100000000
    for i in range(1<<len(a)):
        x = 1
        y = 1
        for j in range(len(a)):
            if((i >> j)&1):
                x *= a[j]
            else:
                y *= a[j]

        ans = min(ans, max(len(str(x)), len(str(y))))


    print(ans)
    


    return



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

Solution (Python):
n=int(input())
a=10
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):
from math import*;from itertools import*;from bisect import*
N=int(input());p=2;d={};q=[]
while p**2<=N:
 while N%p<1:N//=p;d[p]=d.get(p,0)+1
 p+=1
if N>1:d[N]=d.get(N,0)+1
for l in product(*[[k**i for i in range(v+1)]for k,v in d.items()]):
 a=1
 for n in l:a*=n
 insort(q,a)
print(floor(log10(q[len(q)//2]))+1)

Solution (Python):
import math
N = int(input())
num = int(N**0.5)
flg = True
while flg:
    if N % num == 0:
        ans = int(math.log10(N//num)) + 1
        flg = False
    else:
        num -= 1
print(ans)

Solution (Python):
import math
N = int(input())
ans = len(str(N))

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

print(ans)

Solution (Python):
N=int(input())
ans=10000000
for i in range(1,int(N**0.5)+1):
  if N%i == 0:
    a=len(str(i))
    b=len(str(N//i))
    L=max(a,b)          
    if ans > L:
      ans=L

print(ans)

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

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

dN = math.floor(N**(1/2))


tmp = 0
for i in range(1,dN+1):
	if N % i == 0:
		tmp = max(tmp, i)

tmp_co = N // tmp

print(max(len(str(tmp)), len(str(tmp_co))))

Solution (Python):
N = int(input())
a = len(str(N))

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

print(a)

Solution (Python):
def keta(n):
    cnt=1
    while(n//10!=0):
        n=n//10
        cnt+=1
    return cnt

def main():
    n=int(input())
    ans=n
    r=n**0.5
    r=int(r)
    r+=1
    for i in range(r):
        i+=1
        if(n%i==0):
            ans=min(max(keta(i),keta(n//i)),ans)
    print(ans)
    
main()

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


div = make_divisors(N)
ans = 10**10+3
for d in div:
    d2 = N//d
    tmp = max(len(str(d)),len(str(d2)))
    ans = min(ans,tmp)

print(ans)

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

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

import math

ans = len(str(N))

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

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

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

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

Solution (Python):
import math

if __name__ == '__main__':
    N = int(input())
    root_N_int = math.floor(math.sqrt(N))
    for A in range(root_N_int, 0, -1):
        if N % A == 0:
            B = int(N / A)
            break
    digit = len(str(B))
    print(digit)

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)
    divisors.sort()
    return divisors
li=make_divisors(n)

ans=float('inf')
for i in range(len(li)):
    for j in range(i,len(li)):
        if li[i]*li[j]==n:
            ans=min(ans,max(len(str(li[i])),len(str(li[j]))))
print(ans)

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

Solution (Python):
from math import sqrt, log10

N = int(input())

ans = [max(int(log10(i)), int(log10(N // i))) for i in range(1, int(sqrt(N)) + 1) if not N % i]

print(min(ans) + 1)

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

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

yakusu = make_divisors(n)
yakusu.sort()

ans = 10

for i in range(len(yakusu)):
    ans = min(ans,max(len(str(yakusu[i])), len(str(n//yakusu[i]))) )
    
print(ans)

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

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

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