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

s=[]
for i in range(1,n2+1):
    if n%i==0:
        s.append(n//i)

b=s[-1]
print(len(str(b)))

Solution (Python):


n = int(input())

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

ans = 10**12
for i in range(1, int(n**(1/2))+1):
    j = n / i
    if j%1 == 0:
        j = n // i
        if ans > F(i, j):
            ans = F(i, j)
            
print(ans)

Solution (Python):
import numpy


def F(A, B):
    count = 0
    while A > 0 or B > 0:
        A //= 10
        B //= 10
        count += 1
    return count


N = int(input())
res = 10
for A in range(1, int(numpy.sqrt(N)) + 1):
    if N % A == 0:
        B = N // A
        res = min(res, F(A, B))
print(res)

Solution (Python):
import math
N=int(input())
a=int(math.sqrt(N))+1

for i in range(a):
  if(N%(a-i)==0):
    x=N//(a-i)
    count=0
    while(x>=1):
      x=x/10
      count+=1
    break
print(count)

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

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

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

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

print(min(lis))

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

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

    
    return divisors


n = int(readline())
print(len(str(make_divisors(n)[-1])))

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

N=int(input())
answer=len(str(N))
for A in range(1,int(N**0.5)+1):
    if( N % A == 0):
        B=N // A
        answer= min(answer,F(A,B))
print(answer)

Solution (Python):



import math


N = int(input())



def F(A:int, B:int) -> int:
    digits_A = len(str(A))
    digits_B = len(str(B))
    return max(digits_A, digits_B)



result = len(str(N)) 
for a in range(1, int(math.sqrt(N))+1):
    
    if N % a != 0:
        continue

    
    b = int(N / a)
    result = min(result, F(a, b))


print(result)

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

ans = 10

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

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

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

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

Solution (Python):
N = int(input())
part = int(N**0.5)
while N%part != 0:
  part -= 1
Answer = max(len(str(part)),len(str(N//part)))
print(Answer)

Solution (Python):
import sys
from itertools import count


INF = sys.maxsize
N = int(input())
answer = INF

for i in count(1):
  
  if i * i > N:
    break
  q, r = divmod(N, i)
  
  if r != 0:
    continue
  answer = min(
    answer, max(
      len(str(q)),
      len(str(N // q))
    )
  )

print(answer)

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from decimal import *
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
INF = float('inf') 
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(sys.stdin.readline()) 
def ifn(): return float(sys.stdin.readline()) 
def isn(): return sys.stdin.readline().split() 
def imn(): return map(int, sys.stdin.readline().split()) 
def imnn(): return map(lambda x:int(x)-1, sys.stdin.readline().split()) 
def fmn(): return map(float, sys.stdin.readline().split()) 
def iln(): return list(map(int, sys.stdin.readline().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, sys.stdin.readline().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD
def print_list(l): print(*l, sep='\n')
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def No(): print('No')

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

N = iin()

def enum_divisors(n):
    divisors = set()
    for i in range(1, int(n**0.5)+1):
        if N % i == 0:
            divisors.add(i)
            divisors.add(N//i)
    return sorted(divisors)

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

divisors = enum_divisors(N)
ans = 10**10
for d in divisors:
    ans = min(ans, F(d, N//d))
print(ans)

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

Solution (Python):
import math
N=int(input())
mi=float("inf")
nu=0
for i in range(int(math.sqrt(N))):
    a=i+1
    b=N/a
    if (b.is_integer())==True:
        nu=max(len(str(int(a))),len(str(int(b))))
        mi=min(mi,nu)
print(mi)

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

ans = int(1e5)

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

Solution (Python):
import math

N = int(input())
N_s = math.floor(math.sqrt(N))

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

Solution (Python):

import math
import heapq
import bisect
import numpy as np
from collections import Counter, deque


N = int(input())

ans = 100
A = 1
while A * A <= N:
    if N % A == 0:
        B = N // A
        ans = min(ans, len(str(B)))
    A += 1

print(ans)

Solution (Python):
import math

N = int(input())

tmp = math.floor(math.sqrt(N))
while N % tmp:
    tmp -= 1
print(len(str(N // tmp)))

Solution (Python):

import math

N = int(input())

sum = 0
ans = 0
for a in range(1, math.floor(math.sqrt(N)) + 1):
    b = N // a
    if N == a * b:
        sum = 0
        while not b == 0:
            b = b // 10
            sum += 1
        if ans > sum or ans == 0:
            ans = sum
print(ans)

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

halfn=int(2+n**0.5)

for i in range(1,halfn):
    if n%i==0:
        memo = i

ans = max(len(str(n//memo)), len(str(memo)))
print(ans)

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

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

saisyo = float("inf")
for i in range(1, n+1):
    if N%i ==0:
        saisyo = min(saisyo, len(str(N//i)))

print(saisyo)

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

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

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


def divisors(n, sort=False):
    """
    nの約数をO(√n)で列挙する
    """
    d = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            d.append(i)
            if i != n // i:
                d.append(n//i)
    if sort:
        d.sort()
    return d


N = I()
d = divisors(N, sort=True)
ans = len(str(d[len(d) // 2]))
print(ans)

Solution (Python):
ans = 20
def divisor_length(n,ans):
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            if i != n // i:
                ans = min(ans,max(len(str(i)),len(str(n//i))))
            else:
                ans = min(ans,len(str(i)))
 
    return ans

n = int(input())
answer = divisor_length(n,ans)

print(answer)

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

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

Solution (Python):
import math

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

n = int(input())
prime = is_prime(n)
if prime:
    con = 0
    while n  > 0:
        n = n//10
        
        con += 1
else:
    a = int(math.sqrt(n))
    for i in range(a,1,-1):
        if n % i == 0:
            n = n // i
            break
    con = 0
    while n  > 0:
        n = n//10
        
        con += 1
    
print(con)

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

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

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

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

n = ni()

def digit(x):
    res = 1
    while x // 10 != 0:
        x //= 10
        res += 1
    return res

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

print(ans)

Solution (Python):
def main():
    n = int(input())
    ans = n
    for a in range(1,int(n**0.5) + 1):
        if n % a == 0:
            b = n // a
            ans = min(ans, func(a,b))
    print(ans)

def func(a,b):
    str_a = str(a)
    str_b = str(b)
    return max(len(str_a), len(str_b))

if __name__ == '__main__':
    main()

Solution (Python):
import math

N = int(input())

divisor=[]
for i in range(1, math.floor(math.sqrt(N))+1):
    if N % i == 0:
        divisor.append(i)


M=max(divisor)
left=len(str(M))
right=len(str(N//M))
print(max(left, right))

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

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

r = -int(-sqrt(n)//1)
tmp = 0
for i in range(1, r+1):
    tmp = i if (n % i == 0) else tmp

print(max(len(str(tmp)), len(str(n//tmp))))

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        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

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def main():
    
    N = Scanner.int()
    div = Math.divisor(N)
    div.sort()
    if len(div) % 2 == 1:
        print(len(str(div[len(div) // 2])))
    else:
        a = div[len(div) // 2]
        b = div[len(div) // 2 - 1]
        print(max(len(str(a)), len(str(b))))


if __name__ == "__main__":
    main()

Solution (Python):
import math

n = int(input())

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

ans = 10**10

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

for a in range(1,N+1):
    amari = n%a
    if amari == 0:
        b = int(n / a)
        f = max(len(str(a)),len(str(b)))
        ans = min(f,ans)

print(ans)

Solution (Python):

import math

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
    
divisors_list = make_divisors(N) 

F_min = 11 

for divisors in divisors_list:
    A = divisors
    B = int(N/divisors)
    F = max(1+int(math.log10(A)),1+int(math.log10(B)))
    F_min = min(F_min,F)
    
print(F_min)

Solution (Python):
import math

N=int(input())
P= math.floor(N**0.5)

for A in range(P,0,-1):
  if N%A==0:
    B=N//A
    
    break
    
def F(A,B):
  return max(len(str(A)),len(str(B)))

print(F(A,B))

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

P = 1
for x in range(int((N**0.5)//1),1,-1):
  if N % x == 0:
    P = x
    break

print(len(str(N//P)))

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

P = 1
for x in range(int((N**0.5)//1),1,-1):
  if N % x == 0:
    P = x
    break

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

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

if N == 1:
    print(1)
    sys.exit(0)


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


P = prime_factorize(N)

ans = len(str(N))

for i in range(2 ** (len(P) - 1)):
    a = 1
    b = 1
    for j in range(len(P)):
        if (i >> j) & 1 == 1:
            a *= P[j]
        else:
            b *= P[j]

    ans = min(ans, max(len(str(a)), len(str(b))))

print(ans)

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

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)







def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList




n = int(input())

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

print(ans)

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

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

Solution (Python):
import math
n = int(input())
ans = 10**10
for a in range(math.ceil(math.sqrt(n)), 0, -1):
    if n % a == 0:
        b = n//a
        
        ans = max(len(str(a)), len(str(b)))
        break

print(ans)

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

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

s = n**0.5 + 20
s = int(s)

while True:
    if n%s == 0:
        a = list(str(s))
        b = list(str(n//s))
        ans = max(len(a), len(b))
        print(ans)
        exit()
    else:
        s -= 1

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(str(i))
            if i != n // i:
                divisors.append(str(n//i))
    return divisors
group = make_divisors(N)
if len(group) % 2 == 1:
  print(len(str(int(N**0.5))))
else:
  print(max(len(group[len(group) - 2]), len(group[len(group) - 1])))

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

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

N = i_i()

ans = len(str(N))
arr = []
for i in range(1, int(N**0.5)+1):
    if N % i != 0:
        continue
    
    j = int(N / i)
    tmp = max(len(str(i)), len(str(j)))
    if ans > tmp:
        ans = tmp
    
print(ans)

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

Solution (Python):
from math import sqrt

n = int(input())

m = 1
for i in range(2, int(sqrt(n)+1)):
    if n % i == 0:
        m = i

print(len(str(n // m)))

Solution (Python):
import math

N=int(input())
for a in range(int(math.sqrt(N)),1,-1):
    b, mod=divmod(N,a)
    if mod==0:
        print(len(str(max([a,b]))))
        break
else:
    print(len(str(N)))

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




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

print(ans)

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

Solution (Python):
import numpy as np

N = int(input())
N_original = N
N_a_m = int(np.floor(N**(0.5)))


for i in range(1,N_a_m+1):
    j = N_a_m+1 - i
    if N%j == 0:
        N_A = j
        break


    
N_B = len(str(int(N_original/N_A)))
        
print(N_B)

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

def cKeta(A):
    return(len(str(A)))

th = round(N ** 0.5)
minketa = 12
for i in range(1,th+1):
    if N % i == 0:
        keta = max(cKeta(i),cKeta(N//i))
        if keta < minketa:
            minketa = keta
            
print(minketa)

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

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

ans = float('inf')
n_iter = int(N**(1/2))+1

for i in range(1, n_iter):
    if N%i==0:
        ans = min( ans, F(i, N//i) )

print(ans)

Solution (Python):
import sys
import math

n = int(input())

min_func = -1
for a in range(1, math.ceil(math.sqrt(n)) + 1, 1):
    if n % a != 0:
        continue
    else:
        b = int(n / a)
        if min_func == -1:
            min_func = max(len(str(a)), len(str(b)))
        else:
            if min_func > max(len(str(a)), len(str(b))):
                min_func = max(len(str(a)), len(str(b)))

print("{}".format(min_func))

Solution (Python):
from math import sqrt

N = int(input())
count = 0
for i in range(int(sqrt(N)), 0, -1):
    if N % i == 0:
        smallA = i
        break

bigA = N / smallA

while True:
    bigA /= 10
    count += 1
    if bigA < 1:
        break
print(count)

Solution (Python):

import math
N = int(input())

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

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

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,max(len(str(i)), len(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)
    divisors.sort()
    return divisors

def K(n):
  a=0
  while n>0:
    n=n//10
    a=a+1
  return a

n=int(input())
D=make_divisors(n)
print(K(D[len(D)//2]))

Solution (Python):
def f(a, b):
    a_len = len(str(a))
    b_len = len(str(b))
    if a_len > b_len:
        return a_len
    else:
        return b_len


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

    return divisors


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

    f_min = 11
    divisors = get_divisors(n)
    for i in divisors:
        for j in divisors:
            if i * j == n:
                f_min = min(f_min, f(i, j))
    print(f_min)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
x=int(input())
chk=0
ans=0
for i in range(1,(round(x**0.5)//1)+1):
	if x%i==0:
		chk=i
ans=x//chk
for i in range(10):
	if 10**i<=ans and 10**(i+1)>ans:
		print(i+1)
		break

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

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

print(x)

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

li = make_divisors(n)
ans = 10**10

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

if len(li) % 2 == 1:
    ans = min(ans, len(str(li[-1])))

print(ans)

Solution (Python):
import math

N = int(input())

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

        tmp = max(len(str(i)), len(str(j)))
        if tmp < F:
            F = tmp

print(F)

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

N = int(input())
cnt = 2
ret = len(str(N))
while cnt * cnt <= N:
    if N % cnt == 0:
        ret = min(ret, f(cnt, N//cnt))
    cnt += 1

print(ret)

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

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

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

F_list = []
for i in range(1, int(N**(1/2))+1):
  if N % i == 0:
    A = i
    B = N // A
    F = max(len(str(A)), len(str(B)))
    F_list.append(F)

print(min(F_list))

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

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

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

print(F)

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

min_n = n

for i in range(1,int(math.sqrt(n))+1):
    if n % i == 0:
        a = len(str(i))
        b = len(str(int(n/i)))
        
        if min_n > max(a,b):
            min_n = max(a,b)


print(min_n)

Solution (Python):
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 resolve():
    N = int(input())

    divisors = make_divisors(N)
    ans = 1<<60
    for a, b in divisors:
        s_a = len(str(a))
        s_b = len(str(b))
        if s_a <= s_b:
            ans = min(ans, s_b)
        else:
            ans = min(ans, s_a)
    return print(ans)


if __name__ == "__main__":
    resolve()

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

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

Solution (Python):
n = int(input())
ans = 11
for i in range(1, int(-(-n**.5//1))+1):
    x, r = divmod(n, i)
    if r == 0:
        ans = min(ans, max(map(lambda x: len(str(x)), (i, x))))
print(ans)

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


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


fact = factorization(n)
ans = 0
it = []
for x, cnt in fact:
    for _ in range(cnt):
        it.append(x)


def dfs(n, a, b):
    if n == 0:
        return max(map(lambda x: len(str(x)), (a, b)))
    else:
        x1 = dfs(n-1, a*it[n-1], b)
        x2 = dfs(n-1, a, b*it[n-1])
        return min(x1, x2)


print(dfs(len(it), 1, 1))

Solution (Python):
N=int(input())
a=12
for i in range(10**5+1):
 if N%(i+1)==0 and N>=(i+1):
  j=int(N/(i+1))
  k=max(len(str(i+1)),len(str(j)))
  a=min(a,k)
print(a)

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())
D = make_divisors(N)
L = len(D)
if L%2==0:
    print(len(str(D[L//2])))
else:
    print(len(str(D[L//2])))

Solution (Python):
MAX_PRIME = 10**5 + 10
is_prime = [1] * MAX_PRIME
primes = []
is_prime[0] = 0
is_prime[1] = 0
for i in range(MAX_PRIME):
    if is_prime[i]:
        primes.append(i)
        for j in range(2, ((MAX_PRIME-1)//i) + 1):
            is_prime[i*j] = 0

def factorization(n):
    factor = {}
    for p in primes:
        if p ** 2 > n:
            break
        while n % p == 0:
            n //= p
            if p not in factor:
                factor[p] = 1
            else:
                factor[p] += 1
    if n > 1:
        factor[n] = 1
    return factor

n = int(input())

f = factorization(n)

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

k = sorted(list(f.keys()))
def dfs(num, i):
    if i < len(k):
        m = 10 ** 18
        p = k[i]
        for j in range(f[p]+1):
            m = min(m, dfs(num * p ** j, i+1))
        return m
    return F(num, n // num)

print(dfs(1, 0))

Solution (Python):
import math
def resolve():
    x = int(input())
    a = 0
    b = 0
    for i in range(1, x):
        if i >math.sqrt(x):
            break
        if x % i == 0:
            a = i
            b = x // a

    print(len(list(str(b))))

if __name__ == '__main__':
    resolve()

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

Solution (Python):
import math

N = int(input())

sqrtn = math.ceil(math.sqrt(N))
res = len(str(N))
for A in range(sqrtn,1,-1):
    if(N % A != 0):
        continue
    B = N//A
    
    tmpres = max(len(str(A)), len(str(B)))
    res = min(res, tmpres)
print(res)

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

def F(a: int, b: int) -> int:
    la, lb = len(str(a)), len(str(b))
    if la <= lb:
        return lb

    return la

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

print(ans)

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

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

print(ans)

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


root_n = int(math.sqrt(N))
up_n = root_n
up_ans = 0
keta = lambda x: len(str(x))
while up_n <= N:
  if N % up_n == 0:
    pair = int(N/up_n)
    
    up_ans = max(keta(pair), keta(up_n))
    break
  else:
    up_n-=1

print(up_ans)