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 F(a,b):
  return max(len(str(a)),len(str(b)))
n=int(input())
ans=10**15
for i in range(1,int(n**0.5)+1):
  if n%i==0:
    a=i
    b=n//i
    
    ans=min(ans,F(a,b))

print(ans)

Solution (Python):
def F(a, b):
    def _(n):
        c = 0
        while n:
            n //= 10
            c += 1
        return c

    return _(max(a, b))


N = int(input())
ans = float('inf')
for a in range(1, N + 1):
    b = N // a
    if a > b:
        break
    if b != N / a:
        continue
    ans = min(ans, F(a, b))
print(ans)

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

def Main(N):
    ans = 10
    i = 1
    while i*i <= N:
        if N%i == 0:
            ans = min(ans, max(len(str(i)), len(str(N//i))))
        i += 1
    return ans
    
print(Main(N))

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)

out = 10
t = 0
while t<=len(d)-1:
    A = N//d[t]
    B = N//A
    X = max(len(str(B)),len(str(A)))
    if X<out:
        out = X
    t+=2
print(out)

Solution (Python):

import sys

from math import log10, sqrt, ceil
def input(): return sys.stdin.readline()[:-1] 


def c(x):
    cnt = 0
    n = x
    while n:
        n //= 10
        cnt += 1
    return cnt

def solve():
    n = int(input())
    o = n
    ans = c(n)
    for i in range(2, int(sqrt(n)) + 3):
        if (n % i == 0):
            a = i
            b = o // a
            ans = min(ans, max(c(a), c(b)))
        if i > n:
            break

    print(ans)
    
        




t = 1

for case in range(1,t+1):
    ans = solve()



"""
1 -> (1, 2) -> (2 ** 3, 3) -> (3, 1)
100000007
"""

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

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

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

ans=10**5
x=int(n**0.5)
for i in range(x,0,-1):
  if n%i==0:
    y=n//i
    ans=min(ans,len(str(y)))

print(ans)

Solution (Python):
from collections import Counter
from collections import deque
import math
import bisect
import sys
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
 
def f(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
n=int(input())
l=f(n)
ans=10**10
for i in l:

    ans=min(ans,max(len(str(i)),len(str(n//i))))
print(ans)

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

def divisore(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=divisore(n)

ans=10**9
for i in d:
  a=i
  b=n//a
  t_ans=max(len(str(a)),len(str(b)))
  ans=min(ans,t_ans)

print(ans)

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


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

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

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

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


d = divisor(n)

mn = 20
for i in d:
    if (n / i) % 1 == 0:
        mx = max(len(str(n // i)), len(str(i)))
        mn = min(mn, mx)

print(mn)

Solution (Python):
from math import ceil

def divisors(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

n = int(input())
divs = divisors(n)
divs.sort()
lim = ceil(len(divs) / 2)
ans = 11

for i in range(lim):
    a = divs[i]
    b = divs[(-1) * (i + 1)]
    f = max(len(str(a)), len(str(b)))
    ans = min(ans, f)

print(ans)

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

    mn = float('inf')
    for A in range(int(sqrt(N))+1,0,-1):
        if N % A == 0:
            B = N // A
            mn = min(f(A,B), mn)

    print(mn)

def f(A,B):
    return max(len(str(A)), len(str(B)))
    
if __name__ == '__main__':
    solve()

Solution (Python):
import sys

import math
from fractions import Fraction
import itertools

input=sys.stdin.readline
n=int(input())
m=math.ceil(pow(n,0.5))
for i in range(m):
    if n%(m-i)==0:
        p=m-i
        break
q=n//p
ans=int(max(p,q))
print(len(str(ans)))

Solution (Python):
N=int(input())
from math import sqrt
L=[]
for i in range(1,int(sqrt(N))+1):
    if N%i==0:
        L.append((i,N//i))
ans=float("INF")
for t in L:
    a,b=t
    now=max(len(str(a)), len(str(b)))
    ans=min(ans, now)

print(ans)

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

Solution (Python):
n=int(input())
t=[]
for i in range(1,int(n**0.5)+1):
  if n%i==0:
    t.append(i)
hantei=10**10+1
for i in range(len(t)):
  x=len(str(t[i]))
  y=len(str(n//t[i]))
  if hantei>max(x,y):
    hantei=max(x,y)
print(hantei)

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

from math import sqrt

def divisor_enumeration(n):
    div = []
    for i in range(1, int(sqrt(n))+1):
        if n % i == 0:
            if n // i != i:
                div.append((i, n // i))
            else:
                div.append((i, i))
        
    return div


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

    F = divisor_enumeration(N)

    ans = 10**15
    for a, b in F:
        a, b = len(str(a)), len(str(b))
        tmp = max(a, b)
        ans = min(ans, tmp)

    print(ans)
    

if __name__ == "__main__":
    main()

Solution (Python):
import math

N = int(input())
sN = int(math.sqrt(N))
ans = int(1e11)

for i in range(1, sN + 1):
    if N % i == 0:
        a = i
        b = N // i
        ans = min(ans, max(len(str(a)), len(str(b))))
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())

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

    res = f_inf
    for a in range(1, int(pow(n, 0.5)) + 1):
        if n % a == 0:
            b = n // a
            t = f(a, b)
            res = min(res, t)

    print(res)


if __name__ == '__main__':
    resolve()

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

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

from math import sqrt

N = int(input())

if N == 1:
    print (1)
    exit()


def calc(tmp):
    return len(str(tmp))

ans = MOD
for i in range(1, int(sqrt(N)) + 10):
    if N % i == 0:
        ans = min(ans, max(calc(i), calc(N // i)))

print (ans)

Solution (Python):
def main():
    n = int(input())
    base = n
    f = []
    i = 2
    while i * i <= n:
        if n % i == 0:
            f.append(i)
            if i * i != n:
                f.append(n // i)
        i += 1
    if n != 1:
        f.append(n)
    f.sort()
    answer = float("inf")
    for ff in f:
        answer = min(answer, max(len(str(ff)), len(str(base // ff))))
    if base == 1:
        answer = 1
    print(answer)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
def factor(N):
    f = []
    for i in range(1,int(N**0.5)+1):
        if N%i == 0:
            f.append(i)
    return sorted(list(set(f)))

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

N = int(input())
m = 1e9
for n in factor(N):
    m = min(f(n,N//n),m)

print(m)

Solution (Python):
import math
N = int(input())
M = math.floor(N**0.5)
for i in range(M):
    if N%(M-i) == 0:
        A = M-i
        B = math.floor(N/(M-i))
        break
print(len(str(B)))

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

from math import sqrt,floor

nn=floor(sqrt(n))

for i in reversed(range(1,nn+1)):
    if n%i==0:
        f=max(len(str(i)),len(str(int(n/i))))
        print(f)
        exit()

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

from math import sqrt,floor

nn=floor(sqrt(n))

for i in reversed(range(1,nn+1)):
    if n%i==0:
        f=max(len(str(i)),len(str(int(n/i))))
        print(f)
        exit()

Solution (Python):

import math
N = int(input())

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

for a in range(square_root, 0, -1):
    if N % a == 0:
        b = int(N / a)
        print(len(str(b)))
        exit()

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


org = make_divisors(n)
div = sorted(org)

divNum = len(div)


if (divNum % 2 == 0):
    indA = int(divNum / 2) - 1
    indB = int(divNum / 2)
else:
    indA = int((divNum - 1) / 2)
    indB = indA



A = len(str(div[indA]))
B = len(str(div[indB]))

ans = max(A, B)
print(ans)

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

N=int(input())
M=int(N**0.5)
v=100000
for i in range(1,M+1):
  if N%i==0:
    j=int(N/i)
    if v>F(i,j):
      v=F(i,j)
    

if v==100000:
  v=len(str(N))
print(v)

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

n = int(input())
div = make_divisors(n)

ans = float("inf")
for d in div:
    A = d
    B = n // d
    ans = min(ans, max(len(str(A)), len(str(B))))

print(ans)

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

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

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

sqr = int(n**0.5)
l1 = len(str(sqr))

pf = {}
for i in range(2, int(m**0.5) + 1):
    while not m % i:
        pf[i] = pf.get(i, 0) + 1
        m //= i
if m > 1:
    pf[m] = 1

ls = sorted(pf.items(), key=lambda x: x[0], reverse=True)
l2 = len(str(ls[0][0]))
other = n // ls[0][0]
l3 = len(str(other))

if l1 <= l2 < l3:
    print(l3)
else:
    print(max(l1, l2))

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


def read():
    N = int(input().strip())
    return N,


def solve(N):
    AB = []
    for a in range(1, N+1):
        if a * a > N:
            break
        if N % a == 0:
            b = N // a
            AB.append((a, b))
    minl = 100000000
    for a, b in AB:
        minl = min(minl, max(len(str(a)), len(str(b))))
    return minl


if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))

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

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

import math

end = int(math.sqrt(N))+1
ans = len(str(N))

for a in range(1,end):
  if N % a ==0:
    b = N//a
    ans = min(ans, len(str(max(a,b))))
print(ans)

Solution (Python):
def yaku(n):
    yalu_l = []
    for j in range(1, int(n ** 0.5) + 1):
        if n % j == 0:
            yalu_l.append([n // j, j])
        else:
            continue
    return yalu_l


ans = 10 ** 9

n = int(input())

for i in yaku(n):
    p = len(str(i[0]))
    q = len(str(i[1]))
    ans = min(max(p, q), ans)

print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Solution (Python):
import math
n=int(input()) 
comb=[]

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

ans=float('inf')

for i in comb:
  if len(str(i[0])) > len(str(i[1])):
    pans=len(str(i[0]))
  else:
    pans=len(str(i[1]))


  ans=min(ans,pans)

print(ans)

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

Solution (Python):
import math
def digit(n):
    l = len(str(n))
    return l

n = int(input())
mx = int(math.sqrt(n))
mi = 10 ** 8
for i in range(1, mx+1):
    if n % i == 0:
        a = digit(i)
        b = digit(int(n/i))
        mi = min(mi, max(a, b))
print(mi)

Solution (Python):
import math


def get_half_dividers(n):
    return {i for i in range(1, int(n ** 0.5) + 1) if n % i == 0}


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


N = int(input())

half_dividers = get_half_dividers(N)
f_min = get_digit(N)

for d in half_dividers:
    e = N // d
    f = max(get_digit(d), get_digit(e))
    f_min = min(f_min, f)

print(f_min)

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

ini = 1 if n%2 else 2
div = []
for i in range(ini, int(math.sqrt(n)+1),2):
  if n%i==0:
    div.append([i,n//i])
print(max(len(str(div[-1][0])),len(str(div[-1][1]))))

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


end = int(math.sqrt(N))+1
ans = len(str(N+1))

for b in range(1, end):
  if N % b == 0:
    a = N // b
    ans = min(ans, len(str(max(a,b))))
    
print(ans)

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

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

    minRes = 10 ** 10

    for a in range(1, 10** 5 + 1):
        if n % a == 0:
            b = int(n / a)

            res = max(len(str(a)), len(str(b)))

            if res < minRes:
                minRes = res
    
    print(minRes)

if __name__ == '__main__':
    main()

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


N = int(input())
ans = float("inf")

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

print(ans)

Solution (Python):
import math

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

ans = 15

for i in range(1, rout + 1):
    if N % i == 0:
        A = i
        B = int(N / i)
        F = max(len(str(A)), len(str(B)))
        if ans >= F:
            ans = F

print(ans)

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

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

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

ans = 10000000007
divs = make_divisors(n)

for i in range(len(divs)):
  a = divs[i]
  b = divs[-(i+1)]
  digit = f(a, b)
  
  ans = min(ans, digit)
print(ans)

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

Solution (Python):
from fractions import gcd
import sys
from math import sqrt
def main():
    input = sys.stdin.readline
    n = int(input())
    r = sqrt(n)
    r = str(r)
    r_i = r.split('.')
    inte = int(r_i[0])
    g_list = []
    for j in range(inte):
        g = gcd(inte-j, n)
        g_list.append(g)
    g_list.sort()
    min_g = g_list[-1]
    max_g = n / min_g
    max_g_list = list(str(int(max_g)))
    
    print(len(max_g_list))
    
    
        
        

if __name__ == "__main__":
    main()

Solution (Python):
import math
import copy
from queue import Queue
import heapq
import numpy as np

MOD = 5000000007

n = int(input())

















i = int(math.floor(math.sqrt(n)))
a = 0
b = 0
while(i > 0):
    if(n % i == 0):
        a = int(math.floor(math.log(i,10)))+1
        b = int(math.floor(math.log(n // i,10)))+1
        break
    i = i - 1

if(a > b) :
    print(a)
else:
    print(b)

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

for a in range(1, int(n**0.5)+1):
  if n % a == 0:
    lis.append(max(a, int(n/a)))

print(len(str(min(lis))))

Solution (Python):
import numpy as np

N = int(input())
min_keta = 10 ** 6


def get_keta(var):
    ans = 0
    while True:
        var = var // 10
        ans += 1
        if var == 0:
            break
    return ans


for a in range(1, int(np.sqrt(N)) + 1):
    if N % a == 0:
        tmp_keta = get_keta(max(a, N // a))
        if tmp_keta < min_keta:
            min_keta = tmp_keta
print(min_keta)

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

def resolve():
    n=int(input())
    ans=15
    for i in range(1, int(n**0.5)+1):
         if n % i == 0:
             ans=min(len(str(n//i)),ans)
    print(ans)
resolve()

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


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

print( max( len(str(yakusu[-1][0])),len(str(yakusu[-1][1])) ) )

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

    import math
    fmin = 10 ** 10
    for i in range(1, math.ceil(math.sqrt(n))+1):
        if n % i == 0:
            b = int(n / i)
            if fmin > max(len(str(i)), len(str(b))):
                fmin = max(len(str(i)), len(str(b)))

    print(fmin)


resolve()

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)
    
    return divisors

f = lambda a, b: max(len(str(a)), len(str(b)))
divisors = make_divisors(N)
ans = float("inf")
for d in divisors:
    ans = min(ans, f(d, N // d))
print(ans)

Solution (Python):
import numpy as np
import math
n=int(input())

m=int(np.sqrt(n))+1

def f(i,j):
    return max(math.log10(i)+1,math.log10(j)+1)

ans=10**6
for i in range(m):
    a=i+1
    if n%a==0:
        b=int(n/a)
        ans=min(ans,int(f(a,b)))
print(ans)

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

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

y = int(N/x[-1])
print(len(str(y)))

Solution (Python):
import numpy as np
def main():
  N = int(input())
  ans = 30
  for i in range(1, int(np.sqrt(N))+2):
    if N % i == 0:
      ans = min(ans, max(len(str(i)), len(str(N//i))))
  print(ans)
if __name__ == "__main__":
  main()

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

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

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

Solution (Python):
import math

N = int(input())

ans1 = 0

A = '1'
B = str(N)

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

        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
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)
    return divisors

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

def main():
    N = int(input())
    dvs = make_divisors(N)
    flag = False
    if len(dvs)%2 != 0:
        flag = True
        ldvs = dvs.pop()
    ans = float('inf')
    for i in range(len(dvs)//2):
        ans = min(ans, F(dvs[2*i], dvs[2*i+1]))
    if flag:
        ans = min(ans, len(str(ldvs)))
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
import math

n = int(input())

INF = 10**11
ans = INF

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

print(ans)

Solution (Python):
import math

n = int(input())

INF = 10**11
ans = INF

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

print(ans)

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

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

ans = 1000000000
half = int((N+1)**(1/2) + 1)
for A in range(1, half):
    if N%A == 0:
        B = int(N / A)
        if F(A, B) < ans:
            ans = F(A, B)

print(ans)

Solution (Python):
N = int(input())
n = 10
for A in range(1, 100001):
    if N % A != 0:
        continue
    B = int(N / A)
    a = len(str(A))
    b = len(str(B))
    m = max(a, b)
    n = min(n, m)
print(n)

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

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

Solution (Python):
from math import sqrt
from itertools import product
import sys

n = int(input())
p = []
def factorization(arg):
    while arg % 2 == 0:
        p.append(2)
        arg //= 2
    for i in range(3, int(sqrt(arg)) + 1, 2):
        while arg % i == 0:
            p.append(i)
            arg //= i
    if arg > 1:
        p.append(arg)
if n == 1:
    print(1)
else:
    factorization(n)
    min = sys.maxsize
    for bit in range(2 ** len(p)):
        a = 1
        b = 1
        for i in range(len(p)):
            if ((bit >> i) & 1):
                a *= p[i]
            else:
                b *= p[i]
        if min > a and a >= b:
            min = a
        elif min > b and b > a:
            min = b
    print(len(str(min)))

Solution (Python):
N = int(input())
ans = float("inf")
c = 1
while c <= int(N**(1/2)//1):
  if N%c == 0:
    ans = min(ans,max(len(str(c)),len(str(N//c))))
  c += 1  
print(ans)

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

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

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

a, b = 1, n
for i in range(2, int(n**0.5) + 1):
  q, r = divmod(n, i)
  if r == 0:
    a, b = i, q
print(f(a, b))

Solution (Python):
from math import sqrt
def F(A,B):
    A=len(str(A))
    B=len(str(B))-2
    return A if A>B else B
n=int(input())
o=[]
for a in range(1,int(sqrt(n))+1):
    b=n/a
    if b.is_integer():
        o.append(F(a,b))
print(o[-1])

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

import math
m = math.floor(n**0.5)

for i in range(m,0,-1):
    if n % i ==0:
        ii = math.floor(math.log(i,10))+1
        ij = math.floor(math.log(n//i,10))+1
        print(max(ii,ij))
        exit()

Solution (Python):
def main():
    n = int(input())
    m = 1
    k = int(n ** 0.5)

    ans = len(str(n))
    for i in range(k + 1, 0, -1):
        if n % i == 0:
            n = n // i
            m *= i
            tmp = max(len(str(m)), len(str(n)))
            ans = min(ans, tmp)
            break

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n = int(input())
    m = 1
    k = int(n ** 0.5)

    ans = len(str(n))
    for i in range(k + 1, 0, -1):
        if n % i == 0:
            n = n // i
            m *= i
            tmp = max(len(str(m)), len(str(n)))
            ans = min(ans, tmp)

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
from math import sqrt
from itertools import product
import sys

n = int(input())
p = []
def factorization(arg):
    while arg % 2 == 0:
        p.append(2)
        arg //= 2
    for i in range(3, int(sqrt(arg)) + 1, 2):
        while arg % i == 0:
            p.append(i)
            arg //= i
    if arg > 1:
        p.append(arg)
if n == 1:
    print(1)
else:
    factorization(n)
    min = sys.maxsize
    for bit in range(2 ** len(p)):
        a = 1
        b = 1
        for i in range(len(p)):
            if ((bit >> i) & 1):
                a *= p[i]
            else:
                b *= p[i]
        if min > len(str(a)) if len(str(a)) >= len(str(b)) else len(str(b)):
            min = len(str(a)) if len(str(a)) >= len(str(b)) else len(str(b))
    print(min)

Solution (Python):
def main():
    n = int(input())
    ans = solve(n)
    print(ans)

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

def solve(n):
    for a in range(int(n ** (1 / 2)), 0, -1):
        if n % a == 0:
            return F(a, n // a)
    return


if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
a_a = 0
b_b = 0
def F_ab(a, b):
    a_len = len(str(a))
    b_len = len(str(b))
    
    if(a_len >= b_len):
        return a_len
    else:
        return b_len
    
n = math.floor(N ** (1/2))

min_f = 99999999999999
for a in range(1, n + 1):
    if(N % a == 0):
        b = math.floor(N/a)
        f = F_ab(a, b)
        if(min_f > f):
            min_f = f
            a_a = a
            b_b = b
        
print(min_f)

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

n = int(input())
res = 100
for x in make_divisors(n):
    y = n // x
    res = min(res, max(len(str(x)), len(str(y))))
print(res)

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

print(len(str(N)))

Solution (Python):
import math
N = int(input())
res = float('Inf')
M = int(math.sqrt(N))
for A in range(1, M+1):
    if N % A == 0:
        B = int(N / A)
        a = len(str(A))
        b = len(str(B))
        c = max(a, b)
        if res > c:
            res = c
print(res)

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

for x in range(1,int(N**0.5)+1):
    if N%x==0:
        if len(str(N//x))<ans:
          ans=len(str(N//x))
          
print(ans)

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

yakusu = []
ans = 10**15 

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

for x in yakusu:
    if(ans > len(str(max(x,n // x)))):
        ans = len(str(max(x,n // x)))
print(ans)

Solution (Python):
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1

n = readInt()

def f(a,b):
	return math.floor(math.log10(max(a,b))+1)

ans = f(0,n)
for i in range(1,math.floor(pow(n,0.5)+1)):
	if n%i==0:
		ans = min(ans,f(i,n//i))

print(ans)

Solution (Python):
"""
master of 整数
素因数分解
https://qiita.com/drken/items/a14e9af0ca2d857dad23
"""

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

print(ans)