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())
rn = int(n**0.5)+1
ans = 11
for i in range(1,rn+1):
    if n%i == 0:
        a = len(str(i))
        b = len(str(n//i))
        c = max([a,b])
        if c < ans:
            ans = c
print(ans)

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

Solution (Python):
import math

N = int(input())
answer = []
b = 0
for a in range(1,round(math.sqrt(N))+1):
  if N%a == 0:
    b = N//a
    answer.append(max(len(str(a)), len(str(b))))
print(min(answer))

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

Solution (Python):
import math
N=int(input())
Candidate=-(-math.sqrt(N)//1)
while N%Candidate!=0:
    Candidate-=1
Candidate=N/Candidate
print(len(str(Candidate))-2)

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

def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if i > N/i:
                break
            if num % i == 0:
                divisor_list.append(i)

        return divisor_list

A = make_divisor_list(N)

B = []
ans = float("inf")

for a in A:
    b = int(N/a)
    c = max(a,b)
    ans = min(ans,len(str(c)))

print(ans)

Solution (Python):
import math

def get_digits(n):
    return len(str(n))

n = int(input())

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

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

for i in range(M):
    if N % (M - i) == 0:
        P = int(N / (M - i))
        Q = M - i
        break

R = max(P, Q)

for i in range(10):
    R = R / 10
    if R < 1:
        print(i + 1)
        break

Solution (Python):
import math
n = int(input())
res = float('inf')
for i in range(1,int(n**.5)+1):
    if n%i==0:
        res = min(res,math.ceil(math.log10((n+1)/i)))
print(res)

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

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

while True:
	if N%A == 0:
		B = N//A
		print(max(len(str(A)),len(str(B))))
		break
	A -= 1

Solution (Python):

import itertools

def f(i, j):
    if len(list(str(i))) <= len(list(str(j))):
        return len(list(str(j)))
    else:
        return len(list(str(i)))


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

    min_degit = float('inf')
    for i in range(1, int(n ** 0.5)+1):
        if n % i == 0:
            degit = f(n // i, i)
            if min_degit > degit:
                min_degit = degit
    print(min_degit)


if __name__ == '__main__':
    main()

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

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

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

for i in range(center+1):
    if n % (center - i) == 0:
        print(len(str(n // (center - i))))
        exit()

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

a = 1

def digitlen(i):
	t = i
	ret = 0	
	while t > 0 :
		t /= 10
		ret += 1
	return ret


ans = float("inf")

while a**2 <= n:
	if n%a == 0:
		b = n/a
		ans = min(ans, max(digitlen(a),digitlen(b)))

	a += 1

print ans

Solution (Python):
n = int(input())
rec = []
for i in range(1, 100005):
    if n % i == 0:
        rec.append((i, n // i))

num = float("inf")
for p, q in rec:
    rec = max(len(str(p)), len(str(q)))
    num = min(num, rec)

print(num)

Solution (Python):
import math
def getinputdata():

    
    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

n = int(arr_data[0][0])

cnt=1

mindata=10**10    
while cnt<=int(math.sqrt(n)):
    
    if n % cnt==0:
    
        mindata=min(mindata,max(len(str(cnt)),len(str(n//cnt))))
    
    cnt+=1
    
print(mindata)

Solution (Python):
from math import sqrt as q
f=lambda x,y:max(len(str(x)),len(str(y)))
a=int(input())
l=[f(int(a/i),i) for i in range(2,int(q(a))+2) if not a%i]
if l:
  print(min(l))
else:
  print(len(str(a)))

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

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

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

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

for i in range(0, cent + 1):
    if n % (cent - i) == 0:
        print(len(str(n // (cent - i))))
        break

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:
		B = N // A
		ans = min(ans, max(len(str(A)), len(str(B))))
print(ans)

Solution (Python):
import math

N = int(input())


def F(a, b):
    a = int(math.log10(a)) + 1
    b = int(math.log10(b)) + 1
    return max(a, b)


ans = float('inf')
for i in range(1, int(math.sqrt(N)) + 1):
    if N % i != 0:
        continue
    a, b = i, N // i
    ans = min(ans, F(a, b))
print(ans)

Solution (Python):
def cnt_digits(x):
    if (x // 10) >0:
        return 1 + cnt_digits(x // 10)
    else:
        return 1

n = int(input())
ans = float('inf')
for A in range(1, int(n ** 0.5) + 1):
    if n % A == 0:
        ans = min(ans, max(cnt_digits(A), cnt_digits(n // A)))
print(ans)

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

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

Solution (Python):


N = int(input())

aN = []
i = 1

while i <= N//i:
    if N % i == 0:
        aN.append([i, N//i])
    i += 1


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

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

Solution (Python):
import math as m

def find_cd(n):
    n_cd = set()
    for i in range(1,round(m.sqrt(n))+1):
        if n%i == 0:
            n_cd.add(i)
            n_cd.add(n//i)
            
    return list(n_cd)


def f(a,b):
    ans_a = 0
    ans_b = 0
    res_a = a
    res_b = b
    while res_a > 0:
        res_a = res_a // 10
        ans_a += 1
        
    while res_b > 0:
        res_b = res_b // 10
        ans_b += 1
        
    return max(ans_a, ans_b)
        
n = int(input())
lst = find_cd(n)

lst.sort()

len_lst = len(lst)

ans_min = 10000

for i in range(len_lst//2):
    ans = f(lst[i],lst[len_lst-i-1])
    ans_min = min(ans_min, ans)
    
if len_lst%2 == 1:
    ans = f(lst[len_lst//2], lst[len_lst//2])
    ans_min = min(ans_min, ans)

print(ans)

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

a = 1
i = 2
while i * i <= n:
    if n % i == 0:
        a = i
    i += 1

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

Solution (Python):
import math

n=int(input())

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

for i in range(l+1, 0, -1):
    if n%i==0:
        a = n//i
        b = i
        if a<b:
            ans = b
        else:
            ans = a
        c = 0
        while ans>0:
            ans = ans//10
            c += 1
        print(c)
        break

Solution (Python):
from math import sqrt, floor, log
from sys import exit
n = int(input())

for i in range(floor(sqrt(n)), 0, -1):
    if n % i == 0:
        print(1+floor(log(n//i,10)))
        exit(0)

Solution (Python):
import math, sys

N = int(input())

sqrt_n = round(math.sqrt(N))


min_f = sys.maxsize
for i in range(sqrt_n, 0, -1):
    if N % i == 0:
        len_A = len(str(i))
        len_B = len(str(N//i))
        F = max(len_A, len_B)
        min_f = min(min_f, F)

print(min_f)

Solution (Python):
import math, sys

N = int(input())

sqrt_n = round(math.sqrt(N))


min_f = sys.maxsize
for i in range(sqrt_n, 0, -1):
    if N % i == 0:
        len_A = len(str(i))
        len_B = len(str(N//i))
        F = max(len_A, len_B)
        min_f = min(min_f, F)

print(min_f)

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

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

ans = len(str(N))

a = 1
while a*a <= N:
    if N % a == 0:
        b = N // a
        cur =F(a, b)
        if ans > cur:
            ans = cur
    a += 1

print(ans)

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

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

min_f = float('inf')
for i in range(1, int(math.sqrt(N) + 1)):
    if N % i == 0:
        A = str(int(i))
        B = str(int(N // i))
        F = max(len(A), len(B))
        min_f = min(min_f, F)
print(min_f)

Solution (Python):
import math

N = int(input())

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

for i in range(1, int(math.sqrt(N)) + 1) :
    if N % i == 0 :
        max_len = f(i, N // i)
        
print(max_len)

Solution (Python):
import math


N = int(input())

i = int(math.sqrt(N))

while i:
    if N % i == 0:
        print(len(str(N // i)))
        break
    else:
        i -= 1

Solution (Python):
import math


N = int(input())

i = int(math.sqrt(N))

while i > 0:
    if N % i == 0:
        print(len(str(N // i)))
        break
    else:
        i -= 1

Solution (Python):
N=int(input())
import math
sqN=math.sqrt(N)
sqN=math.ceil(sqN)
i=1
ans=float('inf')
def digits(n):
    return(math.floor(math.log10(n))+1)
while i <= sqN:
    q,r=divmod(N,i)
    if r==0:
        ans=min(ans,max(digits(i),digits(q)))
    i+=1
print(ans)

Solution (Python):
import math

N = int(input())
min_f = 10
for n in range(1, int(math.sqrt(N)) + 1):
    a = n
    if N % n != 0:
        continue
    b = int(N / n)
    f = max(len(str(a)), len(str(b)))
    min_f = min(min_f, f)
print(min_f)

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

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

def list_divisor(N):
    lw=1
    up=N
    divsl=[lw]
    divsu=[up]
    while lw<up:
        lw+=1
        up=N//lw
        if N%lw==0:
            if lw<up:
                divsl.append(lw)
                divsu.append(up)
            elif lw==up:
                divsl.append(lw)
    return divsl+divsu[::-1]
lst=list_divisor(N)
mn=float('inf')
for a in lst:
    b=N//a
    ans=max(len(str(a)),len(str(b)))
    if mn > ans:
        mn=ans
    if b<=a:
        break
print(mn)

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

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

if N == 1:
    print("1")
else:
    print(len(str(ans[-1])))

Solution (Python):
from functools import reduce
n=int(input())
def sqdivlist(n):
    lista=[]
    for i in range(1,int((n**0.5)//1)+1):
        if n%i==0:
            lista.append(str(i))
    return (lista)
t=len(sqdivlist(n))
u=(sqdivlist(n))
lista2=[]
ans=[]
for j in range(t):
    lista2.append(int(n/int(u[j])))
    ans.append(max(len(str(u[j])),(len(str(lista2[j])))))
print(min(ans))

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

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

Solution (Python):
import math

N = int(input())

ans = 100


def cal_digits(n):
    digits = 0
    while True:
        if n // 10 < 1:
            digits += 1
            break
        n //= 10
        digits += 1
    return digits

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

print(ans)

Solution (Python):
import math

N = int(input())

ans = 100
def cal_string(n1, n2):
    return max(len(str(n1)), len(str(n2)))

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

print(ans)

Solution (Python):
import math

n = int(input())
m = int(math.sqrt(n)+1)

ans = int(999999999999999)
for i in range(1, m) :
    if n%i!=0 :
        continue
    
    j = int(n/i)
    ans = min(ans, max(len(str(j)), len(str(i))))

print(ans)

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

def is_integer(number):
    return number == int(number)

A=1
answer=11
while A <= math.sqrt(N):
    if is_integer(N/A):
        n_a=1
        while A>=pow(10, n_a):
            n_a+=1
        B=int(N/A)
        n_b=1
        while B>=pow(10, n_b):
            n_b+=1
        if max(n_a, n_b)<answer:
            answer = max(n_a, n_b)
    else:
        pass
    A+=1
print(answer)

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

Solution (Python):
import math
N = int(input())
n = int(math.sqrt(N))
while N%n!=0:
  n = n-1
k = N/n
l = math.log(k,10)
print(int(l)+1)

Solution (Python):
def m():
    n = int(input())
    i=1
    div = []
    while i*i <= n:
        if n % i == 0:
            div.append(i)
        i+=1
    a = max(div)
    b = n // a
    d = max(a,b)
    return len(str(d))

print(m())

Solution (Python):
from math import sqrt
N = int(input())
F = 10
for i in range(1,int(sqrt(N))+1):
    if N%i == 0:
        A = max([len(str(i)),len(str(N//i))])
        if A < F: F = A
            
print(F)

Solution (Python):
F=lambda*m:max(len(str(x))for x in m)
N=int(input())
print(min(F(x,N//x)for x in range(1,int(N**.5)+1)if N%x==0))

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

n = int(math.sqrt(N))+1

def digit(x):
    if 1 <= x < 10:
        return 1
    elif x < 100:
        return 2
    elif x < 1000:
        return 3
    elif x < 10000:
        return 4
    elif x < 100000:
        return 5
    elif x < 1000000:
        return 6
    elif x < 10000000:
        return 7
    elif x < 100000000:
        return 8
    elif x < 1000000000:
        return 9
    else:
        return 10

while True:
    if(N % n == 0):
        k = N / n
        print(digit(k))
        break
    n-=1

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

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

print(ans)

Solution (Python):
import math

N = int(input())

n = math.floor(N **(1/2))
list =[]
count = 0
for a in range(1,n+1):
    if N % a  != 0:
        pass
    else:
        b = int(N/a)
        
        m = max(len(str(a)),len(str(b)) )
        
        count += 1
        if count == 1:
            mintmp = m

        if  mintmp > m:
            mintmp = m


print(mintmp)

Solution (Python):
import math

N = int(input())

n = math.floor(N **(1/2))
list =[]

for a in range(1,n+1):
    if N % a  != 0:
        pass
    else:
        b = int(N/a)
        
        m = max( len(str(a)), len(str(b)) )
        list.append(m)


print(min(list))

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

Solution (Python):
import math
N=int(input())
sN=math.sqrt(N)
ans=10000
for i in range(1,int(sN)+1):
    if N%i==0:
        k1=N/i
        k=int(k1)
    
        if ans > len(str(k)):
            ans=len(str(k))

print(ans)

Solution (Python):
N = int(input())
ans = 0
for a in range(1,N+1):
    if a**2 > N:
        break
    if N%a != 0:
        continue
    b = N//a
    ans = len(str(b))
print(ans)

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

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

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

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

f = 1
while b // 10 != 0:
    b //= 10
    f += 1

print(f)

Solution (Python):
from math import sqrt

n = int(input())
l = []
j = int(sqrt(n))

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

print(len(str(n // j)))

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

for k in range(1,int(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())
ans = float('inf')

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

print(ans)

Solution (Python):






def count_digit(number: int):
    return len(str(number))


if __name__ == '__main__':
    from math import sqrt

    n = int(input())
    result = 11

    for i in range(1, int(sqrt(n)) + 1):
        if n % i == 0:
            candidate = max(count_digit(i), count_digit(n // i))
            result = min(result, candidate)

    print(result)

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

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

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

def solve(a):
  ans=100
  cnt=1
  while cnt*cnt<=a:
    if a%cnt == 0:
      x=str(a//cnt)
      y=str(cnt)
      ans=min(ans,max(len(x),len(y)))
    cnt+=1
  return ans

print(solve(N))

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

Solution (Python):
from math import sqrt, ceil, floor, log10

N = int(input())

min_f = floor(log10(N)) + 1
for A in range(1, ceil(sqrt(N)) + 1):
    if N % A != 0:
        continue
    else:
        B = N // A
        f = floor(max(log10(A), log10(B))) + 1
        if f < min_f:
            min_f = f

print(f)

Solution (Python):
import math

N = int(raw_input())
rootN = int(math.sqrt(N))

i = rootN
while i > 0:
	if N % i == 0:
		print len(str(N/i))
		break
	i = i - 1

Solution (Python):
N = int(input())
ans = len(str(N))
i = 1
while i*i <= N:
    if N%i :
        i += 1
    else:
        ans = min(ans, max(len(str(i)), len(str(N//i))))
        i += 1

print(ans)

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

Solution (Python):
import math

n = int(input())
res = float("inf")
for i in range(1, int(math.sqrt(n))+1):
    if n % i == 0 and res > max(len(str(int(n/i))), len(str(i))):
        res = max(len(str(int(n/i))), len(str(i)))

print(res)

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

ans = 999
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):
n = int(input())
import math as ms
dic = []
for i in range(1,ms.floor(ms.sqrt(n)) + 1):
    if n % i == 0:
        dic.append([i,n // i]) 
f = []
for i in range(len(dic)):
    a = ms.floor(ms.log10(dic[i][0])) + 1
    b = ms.floor(ms.log10(dic[i][1])) + 1
    f.append(max(a,b))
    
print(min(f))

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

i=1
ans=13
j=0

while i<=sqrt(n):
    if n%i==0:
        j=n//i
        ans=int(min(ans,max(log10(i)+1,log10(j)+1)))
    i+=1
if j==0:
    ans=int(max(log10(i)+1,log10(j)+1))
print(ans)

Solution (Python):


n = int(input())

def cntd(x):
    digits = 0

    while x/10>0:
        x = x//10
        digits += 1
    return digits

ans = cntd(n)

a = 1
while a*a<=n:
    if n%a!=0:
        a += 1
        continue

    b = n//a
    cur = max(cntd(a), cntd(b))
    if ans>cur:
        ans = cur
    a += 1

print(ans)

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

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

rootN = int(N**.5)
for i in range(1,rootN+1):
    if N%i == 0:
        ans = min(ans,F(N//i,i))

print(ans)

Solution (Python):
from math import sqrt
n = int(input())
digit = 10
for a in range(int(sqrt(n)), 0, -1):
    b = n / a
    if b == int(b):
        if digit > len(str(int(b))):
            digit = len(str(int(b)))
print(digit)

Solution (Python):
n=int(input());x=int(n**.5)
while n%x:x-=1
print(len(str(n//x)))

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

Solution (Python):
N = int(input())
ketasu = 0
for A in range(1,int(N**0.5)+1):
    if N%A == 0:
        B = N // A
        ketasu = len(list(str(B)))
print(ketasu)

Solution (Python):
from math import sqrt
def calc_digit(n):
    res = 0
    while n != 0:
        res += 1
        n //= 10
    return res

n = int(input())
res = calc_digit(n)
for a in range(1, int(sqrt(n)) + 1):
    if n % a != 0:
        continue
    b = n // a
    f = max(calc_digit(a), calc_digit(b))
    res = min(res, f)
print(res)

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

Solution (Python):
import math
n = int(input())
m = math.ceil(math.sqrt(n))*2

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

print(ans)

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

Solution (Python):
import sys
n=int(input())
if n<10:
    print(1)
    sys.exit()
ans=float("inf")
for i in range(1,int(n**(1/2))+1):
    if n%i==0:
        ans=min(ans,max(len(str(int(n//i))),len(str(i))))
print(ans)

Solution (Python):
import math
n = int(input())
dv = []
dved = []
for i in range(1,int(math.sqrt(n)+1)):
    if n%i==0 and not(i in dved):
        dv.append(i)
        dved.append(n//i) 
    if i in dved:
        break
print(len(str(dved[-1]))if len(dv)>0 else 1)

Solution (Python):
from math import floor, sqrt

def divisors(n):
    div = [1]
    for i in range(2, 1 + floor(sqrt(n))):
        if n % i == 0:
            div.append(i)
    return div

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


if __name__ == '__main__':
    n = int(input())
    minimum = len(str(n))
    for a in divisors(n):
        b = n // a
        minimum = min(minimum, f(a, b))
    print(minimum)

Solution (Python):
import math

n = int(input())
m = 0
for i in range(1, int(math.sqrt(n) + 1)):
    if n % i == 0:
        m = max(m, i)
m = n // m
c = 0
while m > 0:
    m //= 10
    c += 1
print(c)

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

Solution (Python):
import math
n = int(input())
a = 1
max = int(math.sqrt(n)+1)
for i in range(1, max):
    if n % i == 0:
        a = i

b = n/a
ans = int(math.log10(b) + 1)
print(ans)

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

print(ans)

Solution (Python):
import math

N = int(input())

def get_divisor_list(N):
    divisor_list = []

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

    return divisor_list

divisor_list_max_min = min([max(x) for x in get_divisor_list(N)])



print(len(str(divisor_list_max_min)))

Solution (Python):
from math import sqrt

N = int(input())
NS = int(sqrt(N))

ret = len(str(N))
for i in range(1, NS + 1):
    if N % i == 0:
        an, bn = (len(str(i)), len(str(N // i)))
        ret = min(max(an, bn), ret)
print(ret)

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

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

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

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

n = int(math.sqrt(N)) 
ans = len(str(N))
for a in range(1,n+1):
    if N % a == 0:
        b = N // a
        res = f(a,b)
        if res < ans:
            ans = res
print(ans)

Solution (Python):


import math
def digitsum(k):
    return len(str(k))


N = int(input())
m = int(math.sqrt(N))
result=10**10
for i in range(1,m+1):
    if N%i==0:
        A=i
        B=N//i
        F=max([digitsum(A),digitsum(B)])
        if F<result:
            result=F
print(result)

Solution (Python):
import math
n=int(input())
x=1
while(x<=n**0.5):
  if(n%x!=0):
    x+=1
  else:
    mins=int(math.log10(n//x))
    x+=1
    
print(mins+1)

Solution (Python):
import math


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

if n % a == 0.0:
    b = int(math.log10(a)) + 1
    print(b)
else:
    a = int(a)
    for i in range(a, 0, -1):
    	if n % i == 0:
    		a = n / i
    		break
    b = int(math.log10(a)) + 1
    print(b)

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

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

def order(a,b):
    return max(len(str(int(a))),len(str(int(b))))
    
ans = [] 


for i in range(1,int(math.ceil(math.sqrt(n)))+1):
    if n % i == 0:
        ans.append(order(n/i,i))

if len(ans) == 0:
    print(1)
else:
    print(min(ans))

Solution (Python):
import math
n=int(input())
x=math.floor(n**0.5)

while 1:
  if n % x ==0:
    break
  x-=1

print(max(len(str(int(n/x))),len(str(x))))

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

    mi = sys.maxsize
    for x in range(1, n + 1):
        if x > int(n / x):
            break
        if n % x == 0:
            mi = min(mi, max(len(str(x)), len(str(int(n / x)))))
    print(mi)


if __name__ == "__main__":
    main()

Solution (Python):
import math

N = int(input())
p, q, r = 1, 1, N
if N % 2 == 0:
    p = 2
    q = 3
n = int(math.sqrt(N))
while q <= n:
    if N % q == 0:
        p = q
    q += 1
ans = len(str(N//p))

print(ans)

Solution (Python):
import math

N = int(input())
p, q, r = 1, 1, N
if N % 2 == 0:
    p = 2
    q = 3
n = int(math.sqrt(N))
while q <= n:
    if N % q == 0:
        p = q
    q += 1
num = str(max(p, N//p))

ans = len(num)
print(ans)

Solution (Python):
import math
n = int(input())
ans = 10000000000
for i in range(int(math.ceil(math.sqrt(n))), 0, -1):
    if n % i == 0:
        ans = min(ans, len(sorted([str(i), str(int(n / i))], key=len)[1]))
print(ans)

Solution (Python):

"""
https://beta.atcoder.jp/contests/abc057/tasks/abc057_c

"""
import sys
from sys import stdin
input = stdin.readline


def calc_divisors(N):
    ans = [N]
    for i in range(2, int(N**0.5)+1):
        if N % i == 0:
            ans.append(i)
            
            
    ans.sort()
    return ans


def solve(N):
    min_ans = float('inf')
    divs = calc_divisors(N)

    for d in divs:
        A = d
        B = N // d
        A_len = len(str(A))
        B_len = len(str(B))
        AB_len = max(A_len, B_len)
        min_ans = min(min_ans, AB_len)
    return min_ans


def main(args):
    N = int(input())
    ans = solve(N)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

div = 1
max_v = int(sqrt(N))
for num in range(max_v,1,(-1)):
	if N % num == 0:
		div = num
		break


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

Solution (Python):
N = int(input())
A = 1
ans = len(str(N))
while A**2 <= N:
    if N % A != 0:
        
        A += 1
        continue
    B = N // A
    cur = max(len(str(A)), len(str(B)))
    ans = min(ans, cur)
    A += 1
print(ans)

Solution (Python):
import math
n=int(input())
ans=[]
for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        ans.append(n//i)
v=min(ans)
data=int(math.log10(v)+1)
print(data)

Solution (Python):
import math

num = int(input())

res = float("inf")
for i in range(1, math.ceil(pow(num, 0.5))+1):
    if num % i == 0:
        if max(len(str(i)), len(str(int(num/i)))) < res:
            res = max(len(str(i)), len(str(int(num/i))))
print(res)

Solution (Python):
import math

N = int(input())

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

elements = []

for i in range(1, math.ceil(math.sqrt(N+1))):
    if N % i == 0: elements.append(i)

a = elements[-1]
b = N // a
print(F(a,b))

Solution (Python):
import math


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

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

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
from math import sqrt


N = int(input())

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

Solution (Python):
from math import floor, sqrt, log10

N = int(input())

for i in range(floor(sqrt(N)), 0, -1):
    if N % i == 0:
        print(floor(log10(N // i)) + 1)
        break