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

Solution (Python):
import math
n=int(input())
ans=11
for i in range(int(n**0.5)+3,0,-1):
    if n%i==0:
        ans=min(ans,int(math.log(n/i,10))+1)
print(ans)

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):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


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


n = int(read())
print(make_divisors(n))

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


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


ans = 10**30
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):
n = int(input())


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

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

print(ans)

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

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

f = N
for i in range(1, N):
    if i * i > N:
        break
    if N % i == 0:
        _f = F(i, N // i)
        f = min(f, _f)

print(f)

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

divisor_set=set()
for i in range(1,int(N**0.5)+1):
  if N%i==0:
    divisor_set.add(i)
    divisor_set.add(N//i)


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

min_answer=float("inf")
for d in divisor_set:
  d1=d
  d2=N//d
  min_answer=min(min_answer,f(d1,d2))
  
print(min_answer)

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

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

print(len(str(B)))

Solution (Python):
N = int(input())
N2 = int(N ** (1/2))
ans1 = N
ans2 = 1
for i in range(1, N2 + 1):
    if N % i == 0:
        ans2 = str(i)
        ans1 = str(N // i)

print(max(len(ans1), len(ans2)))

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

a=1
min = 10**10
while a*a <= N:
    if N % a == 0:
        b = N//a
        if max(len(str(a)),len(str(b))) < min:
            min = max(len(str(a)), len(str(b)))
    a += 1
print(min)

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

for i in range(int(N**0.5)+1, 0, -1):
    div, mod = divmod(N, i)
    if not mod:
        print(len(str(max(div, N//div))))
        exit()

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


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

ans = 0
nn = int(math.sqrt(n))
for i in range(nn+1,0,-1):
  if(n%i == 0):
    x = f(i,int(n/i))
    ans = x
    break
print(ans)

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

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

Solution (Python):
N = int(input())
d = int(N ** .5)
ans = 10**10
for i in range(1,d+1):
	div, mod = divmod(N, i)
	if mod:
		continue
	tmp = max(len(str(i)), len(str(div)))
	ans = min(ans, tmp)


print(ans)

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

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

Solution (Python):
def number_of_digits(a,b):
    num_of_digits_a=1
    num_of_digits_b=1
    while a//10 !=0:
        a=a//10
        num_of_digits_a +=1
    while b//10 !=0:
        b=b//10
        num_of_digits_b +=1
    if num_of_digits_a >= num_of_digits_b:
        return(num_of_digits_a)
    else:
        return(num_of_digits_b)

N=int(input())
ans=0
for i in range(1,10**5+1):
    if N%i ==0:
        tmp = number_of_digits(i,N//i)
        if i==1:
            ans=tmp
        else:
            if ans>tmp:
                ans=tmp
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)
  return divisors
 
def digit(n):
  for i in range(11):
    if n>=10**i and n<10**(i+1):
      return i+1
      break
 
list = make_divisors(n)
 
ans = 12
 
for i in list:
  if max(digit(i), digit(n/i)) < ans:
    ans = max(digit(i), digit(n/i))
 
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)
  return divisors

def digit(n):
  for i in range(15):
    if n>=10**i and n<10**(i+1):
      return i+1
      break

list = make_divisors(n)

ans = 2345

for i in list:
  if max(digit(i), digit(n/i)) < ans:
    ans = max(digit(i), digit(n/i))

print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

for i in range(int(N**0.5)+1, 0, -1):
	if N%i == 0:
		a = i
		b = N//i
		break

print(max(len(str(a)), len(str(b))))

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

N = INT()
ans = 12

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

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

N = int(input())

div = make_divisors(N)
ans = len(str(N))
ans = min(ans,len(str(div[-1])))
print(ans)

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7

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())
a = make_divisors(n)
ans = len(str(a[len(a)//2]))
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):
a=int(input())
ans=a
for i in range(1,int(a**(1/2))+2):
    if a%i==0:
        if ans>len(str(a//i)):
            ans=len(str(a//i))
print(ans)

Solution (Python):
import math

def order(A, B):
    ord_A = int(math.log10(A) + 1)
    ord_B = int(math.log10(B) + 1)
    return max(ord_A, ord_B)

def solve():
    N = int(input())
    d = 10**12
    i = 1
    while i**2 <= N:
        if N % i == 0:
            d = min(d, order(i, N//i))
        i += 1
        
    print(d)
    
if __name__ == '__main__':
    solve()

Solution (Python):
from sys import stdin
import math


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    
    cnt = float('inf')
    for A in range(1,int(math.sqrt(N))+1):
        if N%A==0:
            B = N//A
            cnt = min(cnt,max(len(str(A)),len(str(B))))
    
    print(cnt)

Solution (Python):
import sys
import math

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

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

print(ans)

Solution (Python):
import math
def solve(n):

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

    return ans

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

Solution (Python):
import math
n=int(input())
f=[]
for a in range(1,math.floor(n**(1/2))+1):
    if n%a==0:
        f.append(len(str(n//a)))
print(min(f))

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

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**(1/2))+1):
    j = n / i
    if (n/i)%1 == 0:
        j = n // i
        if ans > F(i, j):
            ans = F(i, j)
        
print(ans)

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

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

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())
ans = 20

for i in make_divisors(n):
    ans = min(max(len(str(i)),len(str(n//i))), ans)

print(ans)

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

N = int(input())

n = int(N**(1/2))

min = 10
for i in range(1, n+1):
    if N % i == 0:
        A = i
        B = int(N / i)
        
        max = F(A, B)
        
        if max < min:
            min = max
else:
    print(min)

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

Solution (Python):
import math
n = int(input())
sqrtn = math.sqrt(n)
f = 0
ans = 10**10
for i in range(1, int(sqrtn)+1):
    div, mod = divmod(n, i)
    if mod == 0:
        f = max(len(str(div)), len(str(i)))
        if ans > f:
            ans = f
print(ans)

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

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

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

def digits_in_multiplication(N):
    if N == 1:
        return tmp

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

    return ans

print(digits_in_multiplication(N))

Solution (Python):
import math
N = int(input())
res = []
num = []
for i in range(1, int(math.sqrt(N+1))+1):
  if N % i == 0:
    div = N // i
    if div >= i:
      str_num = str(div)
      res.append(len(list(str_num)))
print(min(res))

Solution (Python):
def count_digit(num):
  cnt = 0
  while num > 0:
    num = num//10
    cnt += 1
  return cnt

def F(A, B):
  return max(count_digit(A), count_digit(B))

N = int(input())
mn = 10
for i in range(1, int(N**(1/2)) + 1):
  if N % i == 0:
    if mn > F(i, N//i):
       mn = F(i, N//i)
print(mn)

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

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

Solution (Python):
import math

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

def main():
  N = int(input())
  ans = len(str(N))
  n_sq = math.floor(math.sqrt(N))

  for i in range(n_sq, 0, -1):
    if(N % i == 0):
      j = N // i
      ans = F(i, j)
      break

  print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np

from sys import stdin


def main():
    n = int(stdin.readline())
    d = set()
    ans = len(str(n))
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            d.add(i)
    for a in d:
        tmp = np.max([len(str(a)), len(str(int(n / a)))])
        if tmp < ans:
            ans = tmp
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
import math
r = math.sqrt(n)
l1 = []
l2 = []
for i in range(1, int(r+1)):
    if n % i == 0:
        a = i
        b = n / i
        if a <= b:
            l1.append([str(a), str(int(b))])

for j in l1:
    u = j[0]
    v = j[1]
    if len(u) >= len(v):
        f = len(u)
    else:
        f = len(v)
    l2.append(f)

print(min(l2))

Solution (Python):
N = int(input()) 
n = int(N**.5)
res = len(str(N))
for i in range(2,n+1):
    if N % i == 0:
        
        f = max(len(str(i)),len(str(N//i)))
        res = min(res, f)

print(res)

Solution (Python):
import math
N=int(input())
ans=len(str(N))
for A in range(1, int(math.sqrt(N)+1)):
    if N%A != 0: continue
    B = int(N/A)
    cur = max(len(str(A)),len(str(B)))
    ans = min(ans,cur)
print(ans)

Solution (Python):
import math
def nyu():
    N = int(input())
    return N

def kansu(N):
    min = 9999999999

    tmp_n = int(math.sqrt(N))

    for n in range(1,tmp_n+1):
        if N % n == 0:
            n2  = str(int(N/n))
            n1 = str(n)
            

            if len(n2) > len(n1):
                tmp = int(len(n2))
            else:
                tmp = int(len(n1))
        
        if min>tmp:
            min  = tmp
    print(min)






N = nyu()
kansu(N)

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

Solution (Python):
N=int(input())
import numpy as np
t=0
i=int(np.sqrt(N))
while True:
    if N%i==0:
        t=max(len(str(int(N/i))), len(str(int(i))))
        break
    i-=1
print(t)

Solution (Python):
import math
N = int(input())
ans = float("inf")
for i in range(1, math.ceil(math.sqrt(N)+1)):
  if N % i == 0 and ans > len(str(N // i)):
    ans = len(str(N // i))
print(ans)

Solution (Python):
import math

N = int(input())

def cnt_digits(N):
    ctr = 0
    while N>0:
        N = int(N/10)
        ctr += 1

    return ctr

ans = cnt_digits(N)

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

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

Solution (Python):
import math
n = int(input())
mi =11
def f(a,b):
    return max(int(math.log10(a))+1,int(math.log10(b))+1)

for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        t=f(i,n//i)
        if t<mi:
            mi=t
print(mi)

Solution (Python):
import math
N = int(input())
m = int(math.sqrt(N)+1)
for i in range(m):
  if N % (m-i) == 0:
    j = int(N/(m-i))
    num = len(str(j))
    break
print(num)

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

Solution (Python):
import sys

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

divisor_list = make_divisors(n)

for num in divisor_list:
    if num >= n**0.5:
        print(len(str(num)))
        sys.exit()

Solution (Python):
def main():
    
    s = input()

    x = len(s)
    limit = int(x/2)+1 if x % 2 == 0 else int(x/2)+2
    limit2 = int(x/2) if x % 2 == 0 else int(x/2)+1

    n = int(s)

    min_l = 11

    
    for i in range(1, n+1):
        
        il = len(str(i))
        if il == limit:
            break
        if n % i != 0:
            continue
        if il == min_l:
            break
        j = int(n / i)

        jl = len(str(j))
        f = max(il, jl)
        if f < min_l:
            min_l = f
        if jl == limit2 or il == jl or il > jl:
            break


    
    print(min_l)


main()

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


m = math.ceil(math.sqrt(n))
for i in range(m, 0, -1):
    if n % i == 0:
        j = n / i
        print(max(math.floor(math.log10(i)), math.floor(math.log10(j)))+1)
        exit()

Solution (Python):
import math

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

ans=[]

for i in range(1,n_sqrt+1):
  if n%i==0:
    x=int(max(math.log10(i)+1,math.log10(n//i)+1))
    ans.append(x)

print(min(ans))

Solution (Python):
import math


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

    return count


N = int(input())

sqrt_N = int(math.sqrt(N))

A = 1
for i in range(1, sqrt_N+1):
    if N % i == 0:
        A = i

B = N // A

print(max(keta(A), keta(B)))

Solution (Python):
import math
mx = float("inf")
n = int(input())
for i in range(1,round(math.sqrt(n))+1):
  if n % i == 0:
    if max(len(str(i)),len(str(n//i))) < mx:
           mx = max(len(str(i)),len(str(n//i)))
print(mx)

Solution (Python):
import math

n = int(input())

ans = 1000000
for i in range(1, int(math.sqrt(n)//1)+1):
    if n % i == 0:
        b = str(int(n/i))
        f = max(len(str(i)), len(b))
        if f < ans:
            ans = f

print(ans)

Solution (Python):
import math
N = int(input())
B = int(math.sqrt(N))
while B > 0:
    if N % B == 0:
        break
    B -= 1
print(len(str(int(N / B))))

Solution (Python):
import sys
input = sys.stdin.readline
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(reverse = True)
    return divisors

if n != 1:
    ans = float('inf')
    p = 1 if len(make_divisors(n))%2 == 1 else 0
    for i in range(len(make_divisors(n))//2+p):
        ans = min(ans, make_divisors(n)[i])
    print(len(str(ans)))
else:
    print(1)

Solution (Python):
def div(n):
	a = []
	for i in range(1, int(n**0.5+1)):
		if n % i == 0:
			a.append(i)
			a.append(n//i)
	return sorted(a)
def resolve():
	n = int(input())
	d = div(n)
	v = len(str(max(d[len(d)//2], d[len(d)//2-1])))
	print(v)
resolve()

Solution (Python):
import math

N = int(input())
ret = len(str(N))
for x in reversed(range(int(math.sqrt(N)) + 2)):
    if N % x == 0:
        ret = max(len(str(x)), len(str(N // x)))
        break

print(ret)

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

Solution (Python):
import math

N = int(input())

min_length = -1
for A in range(1, int(math.sqrt(N)) + 1, 1):
    if N % A == 0:
        B = int(N / A)
        len_a = len(str(A))
        len_b = len(str(B))
        length = len_a if len_a >= len_b else len_b
        if min_length == -1 or length < min_length:
            
            min_length = length
print(min_length)

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

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

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

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

Solution (Python):

import math

n = int(input())
counter = 0

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

Solution (Python):
import sys
readline = 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)
    divisors.sort()
    return divisors

def main():
    N = int(readline())
    divisors = make_divisors(N)
    le = len(divisors)
    if le % 2 == 1:
        print(len(str(divisors[le//2])))
    else:
        print(len(str(divisors[le//2])))

if __name__ == '__main__':
    main()

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

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

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

root_n = n**0.5
if (root_n != int(root_n)):
    root_n = int(root_n)+1
else:
    root_n = int(root_n)    

for i in range(root_n, 0, -1):
    if(n%i == 0):
        ans = int(n/i)
        print(max([len(str(i)), len(str(ans))]))
        break

Solution (Python):
import sys,math
n = int(input())
ans = sys.maxsize
for i in reversed(range(1, math.sqrt(n).__int__() + 1)):
    if n % i == 0:
        cur = max(len(str(i)), len((str(n // i))))
        if ans > cur:
            ans = cur

if n == 1:
    print(1)
else:
    print(ans)

Solution (Python):
N=int(input())
M=round(N**0.5)+1
for i in range(M,0,-1):
    if N%i==0:
        ans=len(str(N//i))
        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

N = int(input())
ans = 10**11
for d in make_divisors(N):
    keta = max(len(str(d)), len(str(N//d)))
    ans = min(keta, ans)

print(ans)

Solution (Python):
def resolve():
    N = int(input())
    factors = prime_factors(N)
    minf = float("inf")
    
    for bits in range(1<<len(factors)):
        fac_a = 1
        for odr in range(len(factors)):
            if bits & (1<<odr):
                fac_a *= factors[odr]

        fac_b = N // fac_a
        l = max(len(str(fac_a)), len(str(fac_b)))
        minf = min(minf, l)
    print(minf)

def prime_factors(n):
    i = 2
    factors = []
    while i**2 <= n:
        if n % i != 0:
            i += 1
        else:
            factors.append(i)
            n = n // i
    if n > 1:
        factors.append(n)
    return factors
    



if '__main__' == __name__:
    resolve()

Solution (Python):
n = int(input())
ans = float('inf')
for factor in range(1,int(n**0.5)+2):
    if n % factor == 0:
        factor1 = factor
        factor2 = n // factor1
        bigger = max(factor1, factor2)
        num_d = len(str(bigger))
        ans = min(ans, num_d)
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)
      if i != n // i:
        divisors.append(n//i)
  
  return divisors
l=sorted(make_divisors(n))
print(len(str(l[len(l)//2])))

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

Solution (Python):
def main():
    n = int(input())
    sq = int(pow(n,0.5))

    while True:
        if n % sq == 0:
            break
        sq-=1

    a = n//sq
    k = 0
    while a:
        a = a//10
        k+=1 

    print(k)
main()

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

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


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


def S(): return input()


def MS(): return map(str, input().split())


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


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = {False: 'No', True: 'Yes'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()

nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']


show_flg = True
show_flg = False


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


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


def main():
    N = I()
    ans = 10**9

    for i in divisor(N):
        ans = min(ans, f(N // i, i))

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
n = math.ceil(math.sqrt(N))
A = 1
B = N
for i in range(n+1):
  A = n-i
  if N%A==0:
    B = N//A
    break

print(len(str(B)))

Solution (Python):
import math
n=int(input())
s=int(math.sqrt(n))
ans=10**10

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

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

def f(x,y):
    return len(str(max(x,y)))
ans=len(str(n))
for i in range(2,int(math.sqrt(n))+1):
    if (n%i==0) and (ans>f(i,n//i)):
        ans=f(i,n//i)
print(ans)

Solution (Python):
import math

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

ketamin = 11
for i in range(1,limit+1):
  if n%i == 0:
    sho=n//i
    if ketamin > len(str(sho)):
      ketamin = len(str(sho))
      
print(ketamin)

Solution (Python):
import math
N = int(input())
n = math.ceil(math.sqrt(N))
A = 1
B = N
for i in range(n+1):
  A = n-i
  if N%A==0:
    B = N//A
    break

print(len(str(B)))

Solution (Python):

n = int(input())

factors = []

i = 1
while i <= n ** 0.5:
    if n % i == 0:
        factors.append(i)
    i += 1

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

ans = float('inf')
for f in factors:
    a, b = f, n // f
    t = func(a, b)
    ans = min(ans, t)
print(ans)

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

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

n = int(N ** (1/2))

res = check(1, N)

i = 1
while i <= n:
  if N % i == 0:
    res = min(res, check(i,int(N / i)))
  i += 1

print(res)

Solution (Python):
import math
n = int(input())
nn = math.floor(n ** (1/2))
for i in range(1,nn+1):
    f = n / i
    if f.is_integer():
        a = n // i
print(len(str(a)))

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

ans = 10**11

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

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

for i in range(int(n**(0.5)),0,-1):
    if n%i == 0:
        ans1 = len(list(str(i)))
        ans2 = len(list(str(n//i)))
        print(max(ans1,ans2))
        break

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

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return(divisors)
n = int(input())
ans = make_divisors(n)
if len(ans)%2 == 1:
    answer = ans[((len(ans)+1)//2)-1]
else:
    answer = ans[(len(ans)//2)]
print(len(str(answer)))

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

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

Solution (Python):
import sys
input = sys.stdin.readline
def enum_divisors(n):
    res = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            res.append(i)
            res.append(n//i)
    return res
def f(a, b):
    return max(len(str(a)), len(str(b)))
def main():
    N = int(input())
    divisors = enum_divisors(N)
    ans = 10**8
    for i in range(len(divisors)-1):
        ans = min(ans, f(divisors[i], divisors[i+1]))
    print(ans)
if __name__ == "__main__":
    main()

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

Solution (Python):
import math

n = int(input())

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

sum = len(str(n))

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

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

minFAB = len(str(N))

for i in range(1,n+1):
    l = len(str(i))
    m = len(str(N//i))
    if N%i == 0:
        minFAB = min(minFAB,max(l,m))

print(minFAB)