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

Solution (Python):
n=int(input())
n2=int(n**0.5)+1

nmin=n
for i in range(1,n2+1):
    if n%i==0:
        nmin=min(nmin,max(i,n//i))


print(len(str(nmin)))

Solution (Python):

def resolve():
    def n_len(a, b):
        a = str(a)
        b = str(b)
        res = max(len(a), len(b))
        return res

    N = int(input())

    ans = 10**9+1
    i = 1
    while i*i <= N:
        if N%i == 0:
            a = i
            b = N//i
            ans = min(ans, n_len(a, b))
        i += 1
    print(ans)

if __name__ == "__main__":
    resolve()

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())
r = make_divisors(N)
res = []
for i in r:
    y = N // i
    res.append(max(len(str(y)), len(str(i))))
print(min(res))

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

print(ans)

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

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

print(ans)

Solution (Python):
import numpy as np
 
N = int(input())
ans = len(str(N))
for i in range(2, int(np.sqrt(N)) + 2):
    if not N % i:
        a = max(len(str(i)), len(str(int(N / i))))
        ans = min(ans, a)
print(ans)

Solution (Python):
import math

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


def digit(x):
    return len(str(x))


l = []
for i in range(2, root_n + 1):
    if n % i == 0:
        a = int(n / i)
        l.append(max(digit(a), digit(i)))
if l:
    print(min(l))
else:
    print(digit(n))

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

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

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

Solution (Python):
import math
N = int(input())
ans = float('Inf')
sq = int(math.sqrt(N)) + 1
for i in range(1, sq):
    if N % i == 0:
        a = len(str(i))
        b = len(str(N // i))
        if a > b:
            num = a
        else:
            num = b
        if ans > num:
            ans = num
print(ans)

Solution (Python):
n = int(input())
import math
ans = float('Inf')
sq = int(math.sqrt(n)) + 1
for i in range(1, sq):
    
    if n % i != 0:
        continue
    
    ans = min(ans, max(len(str(i)), len(str(n // i))))
print(ans)

Solution (Python):
from sys import stdin
import sys
import math

N = int(input())

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

minimum = float('inf')

for a in range(1, int(math.sqrt(N))+1):
    if N % a == 0:
        minimum = min(minimum, f(a, N // a))

print(minimum)

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

Solution (Python):
import sys,os
from collections import defaultdict, deque
from math import ceil, floor
if sys.version_info[1] >= 5:
    from math import gcd
else:
    from fractions import gcd
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    MOD = 10**9+7

    N = II()

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

    

if __name__ == '__main__':
    main()

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


def f(a, b):
    a_digits = len(list(str(a)))
    b_digits = len(list(str(b)))
    return max([a_digits, b_digits])

f_min = 10**10
for a in [i for i in range(1, int(N**0.5)+1) if N % i == 0]:
    b = int(N / a)
    if f(a, b) < f_min:
        f_min = f(a, b)

print(f_min)

Solution (Python):

















mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    mind = float('inf')
    i = 1
    ans = []
    while i * i <= n:
        if n%i == 0:
            if i == n//i:
                ans.append(i)
                mind = min(mind,len(str(i)))
            else:
                ans.append(i)
                ans.append(n//i)
                maxd = max(len(str(i)),len(str(n//i)))
                mind = min(mind,maxd)
        i += 1
    print(mind)
if __name__ == '__main__':
  main()

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

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())

divisors = make_divisors(n)

l = len(divisors)


ans = float('inf')
for i in range(l):
    a = divisors[i]
    b = int(n/a)
    m = max([a,b])
    keta = 1
    while m > 9:
        m = int(m/10)
        keta += 1
    ans = min([ans, keta])

print(ans)

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

def f(a,b):
    x = max(a,b)
    cnt = 1
    while x//10 > 0:
        x //= 10
        cnt += 1
    return cnt


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

divs = make_divisors(N)
ans = 10**10
for div in divs:
    if div > N/div:
        continue
    else:
        ans = min(ans, f(div,N//div))
print(ans)

Solution (Python):
import math  
import bisect  
import queue  


if __name__ == '__main__':
    N = int(input())

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

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
















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

s = str(c)
print(len(s))

Solution (Python):
import math

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

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

ans = float('inf')
for a in range(1, n+1):
    if N % a == 0:
        b = N // a
        ans = min(ans, f_ab(a, b))
print(ans)

Solution (Python):
import math

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

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

ans = float('inf')
for a in range(1, n+1):
    if N % a == 0:
        b = N // a
        ans = min(ans, f_ab(a, b))
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    
    ans = 20
    for i in range(1, int(N ** 0.5) + 1):
        if N % i == 0:
            a = str(i)
            b = str(N // i)
            ans = min(ans, max(len(a), len(b)))
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):

import math
import io


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

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

min = float('inf')

for i in range(1, int(N**0.5)+1, 1):
    if N%i==0:
        A = i
        B = N//i
        keta = max(len(str(A)), len(str(B)))
        if keta<min:
            min = keta

print(keta)

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

d = 1
ans = 15
while(d ** 2 <= N):
    if(N % d == 0):
        A = d
        B = N / d
        ans = min(ans,max(math.floor(math.log10(A))+1,math.floor(math.log10(B)) + 1) )
        

    d += 1
print(ans)

Solution (Python):
N = int(input())
M = int(N**0.5)
l = []
if N <= 3:
  print(1)
else:
  for a in range(1, M+1):
    if N % a == 0:
      b = int(N/a)
    else:
      continue
    l.append(max(len(str(a)), len(str(b))))
  print(min(l))

Solution (Python):
n = int(input())
def f(x,y):
    x = str(x)
    y = str(y)
    return max(len(x),len(y))
i = 1
nums = []
while i*i <=n:
    if n%i == 0:
        nums.append(i)
    i +=1
ans= 10**100
for num in nums:
    ans = min(ans,f(num,n//num))
print(ans)

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



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

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

def F(a, b):
    list_A = list(str(a))
    list_B = list(str(b))
    num = max(len(list_A), len(list_B))

    return num

n = int(input())
list_N = make_divisors(n)
h = len(list_N)
list_ANS = []

for i in range(0, h, 2):
    list_ANS.append(F(list_N[i], list_N[i+1]))

print(min(list_ANS))

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

k = 0

for i in range(1,int(N**(0.5))+1):
    if N % i == 0:
        n = str(int(N // i))
        I = str(i)
        K = len(n) if len(n) >= len(I) else len(I)
        if k == 0:
            k = K
        else:
            if k > K:
                k = K
            else:
                continue

print(k)

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

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

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

ans = 11
for key in divisors:
  a, b = str(key[0]), str(key[1])
  ans = min([ans, max([len(a), len(b)])])

print(ans)

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

Solution (Python):
def I(): return int(input())
N = I()
ans = float('INF')
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        temp = max(len(str(i)),len(str(N//i)))
        ans = min(temp,ans)
print(ans)

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

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

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

Solution (Python):
n = int(input())
if n == 1:
	print (1)
	exit()
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
a = make_divisors(n)
a.sort()
c = 100
for i in a:
	if i > n//2:
		break
	j = n//i
	c = min(max(len(str(i)),len(str(j))),c)
print(c)

Solution (Python):
"""
掛け算は順序を入れ替えてもいいので、
√n + 1くらいまで探索
"""
import math
n = int(input())
r = []
def F(a,b):
    return max(len(str(a)),len(str(b)))
for i in range(1,int(math.sqrt(n))+1):
    if n%i == 0:
        r.append(F(i,n//i))
print(min(r))

Solution (Python):
import math
N = int(input())
for i in range(1,math.ceil(N**(1/2))+1)[::-1]:
    if N%i == 0:
        print(max(len(str(i)),len(str(N//i))))
        break

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

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

Solution (Python):
from math import sqrt


def Calc_Divisors(num):
    divisors = []
    for i in range(1, int(sqrt(num)) + 1):
        if num % i == 0:
            divisors.append(i)
            if i != num // i:
                divisors.append(num//i)
    divisors.sort()
    return divisors


if __name__ == "__main__":
    n = int(input())

    div = Calc_Divisors(n)

    ans = len(str(n))
    for d in div:
        tmp = max([len(str(d)), len(str(n//d))])
        if tmp < ans:
            ans = tmp

    print(ans)

Solution (Python):
num = int(input())
import math
min = 1000000000000000
limit = math.floor((num ** 0.5) + 1)
for i in range(1, limit):
  if num % i == 0:
    j = num / i
    lsti = []
    lstj = []
    while i > 0:
      lsti.append(i%10)
      i //= 10
    while j > 0:
      lstj.append(j%10)
      j //= 10
    lengthi = len(lsti)
    lengthj = len(lstj)
    if max(lengthi, lengthj) < min:
      min = max(lengthi, lengthj)
print(min)

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

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

print(ans)

Solution (Python):
n = int(input())
ans = 10 ** 5
for i in range(1, 10**5+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(2, int(n**0.5) + 1):
    if n % i == 0:
        b = int(n / i)
        f = max(len(str(i)), len(str(b)))
        if ans > f or ans == 0:
            ans = f
print(ans)

Solution (Python):
import math

N = int(input())
m = 10

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

print(m)

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

num_list = []

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

ans = 10**9+7

for i in range(len(num_list)):
    tmp = max(len(str(num_list[i][0])),len(str(num_list[i][1])))
    ans = min(ans,tmp)
    
print(ans)

Solution (Python):
from collections import Counter
N = int(input())
n = N
fac = Counter()
while n % 2 == 0:
    n >>= 1
    fac[2] += 1
p = 3
while p*p <= n:
    while n % p == 0:
        n /= p
        fac[p] += 1
    if n == 1:
        break
    p += 2

fac_list = list(fac.items())

def ndigit(x):
    n = 0
    while x > 0:
        n += 1
        x //= 10
    return n

ND = ndigit(N)

def solve(fi, acc):
    if fi == len(fac_list):
        
        assert N % acc == 0
        other = N // acc
        return max(ndigit(acc), ndigit(other))

    p, max_cnt = fac_list[fi]
    minval = ND
    m = 1
    for i in range(max_cnt+1):
        minval = min(minval, solve(fi+1, acc*m))
        m *= p
    return minval

print(solve(0, 1))

Solution (Python):
import math
N = int(input())
if math.sqrt(N)%1 == 0:
    K = int(math.sqrt(N))
    print(len(str(K)))
else:
    ls1 = []
    for i in range(1,math.ceil(math.sqrt(N))+1):
        if N%i == 0:
            ls1.append(i)
    K = max(ls1)
    A = str(N//K)
    B = str(K)
    print(max(len(A),len(B)))

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

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, int(n / i)))
            if i != n // i:
                divisors.append((i, int(n // i)))
    return divisors

divisors = make_divisors(N)
length = 1e10
for d in divisors:
    if length > len(list(str(max(list(d))))):
        length = len(list(str(max(list(d)))))

print(length)

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MAKEDIVS = lambda n: [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]

def main():
    n = II()
    divisors = MAKEDIVS(n)
    ans = len(str(divisors[-1][1]))
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
def make_divisors(n):
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]

def main():
    n = II()
    divisors = make_divisors(n)
    ans = len(str(divisors[-1][1]))
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
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

def main():
    n = II()
    divisors = make_divisors(n)
    minp = (10**10, 0)
    for a,b in divisors:
        if abs(minp[0]-minp[1]) > abs(a-b):
            minp = (a,b)
    A = len(str(minp[0]))
    B = len(str(minp[1]))
    print(max(A,B))


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
import sys

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

n = int(sys.stdin.readline().rstrip())

def main():
    res = divisors(n)
    print(len(str(n // res[-1])))

if __name__ ==  '__main__':
    main()

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

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

N = int(input())
divs = make_divisors(N)
ans = 10**10
for A in divs:
    B = N//A
    ans = min(ans, F(A, B))
print(ans)

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

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

cd = divisor(N)
ans = len(str(cd[-1]))
print(ans)

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

for i in range(1,math.floor(N**0.5)+1):
  if N%i == 0:
    r.append(i)
    
print(len(str(N//r[-1])))

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)


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 -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 __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


N = int(input())
ans = INF
for A in range(1, int(sqrt(N)) + 1):
    if N % A != 0:
        continue
    B = N // A
    A_length = len(str(A))
    B_length = len(str(B))
    ans = min(ans, max(A_length, B_length))
print(ans)

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

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

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

Solution (Python):

import math
N = int(input())
mi = float("inf")


def F(x, y):
    return max(len(str(x)), len(str(y)))


sq = math.floor(math.sqrt(N)+1)

for A in range(1, sq):
    if N % A == 0:
        B = N // A
        mi = min(F(A, B), mi)
print(mi)

Solution (Python):




def divisible_length(n):
    min_length = len(str(n))
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            min_length = min(min_length, max(len(str(i)), len(str(n // i))))
    return min_length


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


if __name__ == "__main__":
    main()

Solution (Python):





def calc_digits(n):
    res = 0
    while( int(n) ):
        res += 1
        n /= 10
    return res

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

for i in range(1,N+1):
    
    if i * i > N:
        break

    if ( N % i == 0):
        
        B = N / i
        temp = max((calc_digits(i)),calc_digits(B))
        ans = min(ans,temp)

print(ans)

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

Solution (Python):
import sys
N=int(input())
ans=[]
if N==1:
    print(1)
    sys.exit()

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

Solution (Python):
def devisorlister(n):
    devisor_list=[]
    for i in range(2,int(n**0.5)+1):
        if n%i==0:
            devisor_list.append(i)
    if devisor_list==[]:
        devisor_list=[1]
    return max(devisor_list)

k=int(input())
m=devisorlister(k)
print(len(str(int(k/m))))

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

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

Solution (Python):
import math

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())
    l = make_divisors(N)
    root = math.ceil(N ** 0.5)
    
    
    
    for i in l:
        if i >= root:
            print(len(str(i)))
            break


if __name__ == '__main__':
    main()

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

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























rtn = math.ceil(math.sqrt(n))
for i in reversed(range(1, rtn + 1)):
    if n % i == 0:
        b = n // i 
        print(len(str(b)))
        exit()

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

""" n! mod m 階乗
mod = 1e9 + 7
N = 10000000
fac = [0] * N
def ini():
  fac[0] = 1 % mod
  for i in range(1,N):
    fac[i] = fac[i-1] * i % mod"""

"""mod = 1e9+7
N = 10000000
pw = [0] * N
def ini(c):
  pw[0] = 1 % mod
  for i in range(1,N):
    pw[i] = pw[i-1] * c % mod"""

"""
def YEILD():
  yield 'one'
  yield 'two'
  yield 'three'
generator = YEILD()
print(next(generator))
print(next(generator))
print(next(generator))
"""
"""def gcd_(a,b):
  if b == 0:
    return a
  return gcd_(a,a % b) 
"""def extgcd(a,b,x,y):
  d = a
  if b!=0:
    d = extgcd(b,a%b,y,x)
    y -= (a//b) * x
    print(x,y)
  else:
    x = 1
    y = 0
  return d"""


def readInts():
  return list(map(int,input().split()))
mod = 10**9 + 7
def main():
  n = int(input())
  i = 1
  while i*i <= n:
    if n % i == 0:
      ans = n//i
    i+=1
  print(len(str(ans)))
if __name__ == '__main__':
  main()

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

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

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

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

ans = 9999999999

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

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

Solution (Python):
import math
n = int(input())
max=0
for a in range(1,int(n**0.5)+2):
    if n%a==0:
        max=a
print(int(math.log10(n/max)+1))

Solution (Python):
import math
N=int(input())
def F(a,b):
  return(max(len(str(a)),len(str(b))))
d=int(math.sqrt(N))
m=1000000007
for i in range(1,d+1):
  if N%i!=0: continue
  m=min(m,F(i,N//i))
print(m)

Solution (Python):
def f(x,y):
    count_x, count_y = 1, 1
    while x/10>=1:
        x = x//10
        count_x += 1
    while y/10>=1:
        y = y//10
        count_y += 1
    return max(count_x, count_y)

pf = []
m = int(input())

for i in range(1,int(m**0.5)+1):
    if m%i == 0:
        pf.append(i)

print(f(pf[-1], m/pf[-1]))

Solution (Python):
import sys
import math
N = int(input())
for n in range(int(math.sqrt(N))+1,0,-1):
  if N%n==0:
    print(max(int(math.log10(n)), int(math.log10(N//n)))+1)
    sys.exit()

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

F = len(str(N))
for A in range(1, int(N**0.5)+1):
    if N%A != 0:
        continue
    B = N // A
    F = min(F, max([len(str(x)) for x in [A,B]]))

print(F)

Solution (Python):

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

import math
n = int(readline())
m = int(math.sqrt(n))
l = []
for a in range(1, m + 1):
    if n % a == 0:
        b = n // a
        c = max(len(str(a)), len(str(b)))
        l.append(c)
print(min(l))

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

e = []
i = 1
while i * i <= n:
    if n % i == 0:
        e.append([str(i),str(n//i)])
    i += 1

ans = 10**9
for i in range(len(e)):
    ans = min(max(len(e[i][1]),len(e[i][0])),ans)
print(ans)

Solution (Python):
import math
n = int(input())
ab=[]
m=10000
for i in range(1,int(math.sqrt(n))+1):
  if n%i==0:
    ab.append([i,int(n/i)])
f=[]
for i in ab:
  a=len(str(i[0]))
  b=len(str(i[1]))
  if a>b:
    f.append(a)
  else:
    f.append(b)
    
for i in f:
  if m>i:
    m=i
print(m)

Solution (Python):
from math import sqrt

N = int(input())

def ans(n):
    a,b = 1,n
    for i in range(2,int(sqrt(n))+1):
        if n % i == 0:
            a,b = i,n//i
    return max(len(str(a)),len(str(b)))

print(ans(N))

Solution (Python):
def resolve():
    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
    l=make_divisors(N)
    ls=len(l)
    l1=l[-1]
    try:
        l2=l[-2]
    except:
        pass

    if len(l)%2==0:
        print(max(len(str(l1)),len(str(l2))))
    else:
        print(len(str(l1)))
        

resolve()

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

N = int(input())

ans = 10 ** 9

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

print(ans)

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

Solution (Python):
import math

P=[]
n=int(input())
N=int(math.sqrt(n))

for i in range(1,N+2):
  if n%i==0:
    p=max(len(str(i)),len(str(int(n/i))))
    P.append(p)
    
print(min(P))

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())
arr = make_divisors(n)

ans = []
for i in arr:
    ans.append(max(len(str(i)),len(str(n // i))))
print(min(ans))

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