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 sys
import copy
import string
import  math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: 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

n = ni()
li = make_divisors(n)
ans = 10000000000000000
for i in range(len(li) // 2):
    if li[i] * li[-(i+1)] == n:
        f = max(len(str(li[i])), len(str(li[-(i+1)])))
        ans = min(f, ans)
if len(li) % 2 != 0:
    if len(li) == 1:
        ans = 1
    else:
        print()
        ans = min(len(str(li[len(li)//2])), ans)
print(ans)

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

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


n = int(input())

ret = float('inf')
a = 0
while a * a <= n:
    a += 1
    if n % a != 0:
        continue
    b = n // a
    ret = min(ret, f(a, b))
print(ret)

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

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

cnt = 1
while b // 10 >= 1:
    cnt += 1
    b = b // 10
print(cnt)

Solution (Python):
N = int(input())
ret = len(str(N))
t = 2
while t * t <= N:
  if N % t == 0:
    ret = min(ret, max(len(str(N//t)), len(str(t))))
  t += 1
print(ret)

Solution (Python):
import math
import fractions
N=int(input())
A=math.sqrt(N)
A=math.ceil(A)
mini=100000000000
for i in range(1,A+1):
    if N%i==0:
        x=len(str(i))
        y=len(str(N//i))
        if mini>max(x,y):
            mini=max(x,y)
print(mini)

Solution (Python):
n=int(input())
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
    break
print(min(l))

Solution (Python):
n=int(input())
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==2:
    break
print(min(l))

Solution (Python):
n=int(input())
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==3:
    break
print(min(l))

Solution (Python):
N = int(input())
x = int(N**0.5)

for i in range(x, 0, -1):
    if N%i == 0:
        ans = len(str(N//i))
        break

print(ans)

Solution (Python):

n=int(input())
i=0
l=[]
while i**2<n:
    i+=1
    if n%i==0:
        l.append(max(len(str(i)),len(str(int(n/i)))))
print(min(l))

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

ab = []
ans = []
for i in range(1, int(n**(0.5))+1):
	ab.clear()
	if n%i == 0:
		ab.append(i)
		ab.append(int(n/i))
		ans.append(len(str(max(ab))))
			
if len(ans) == 0:
	ans.append(1)

print(min(ans))

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()


def getPrimeList(n):
  l=[]
  t=int(math.sqrt(n))+1
  
  for a in range(2,t):
    while n%a==0:
      n//=a
      l.append(a)
  
  if n!=1:
    l.append(n)
  
  return l

def main():
  n=I()
  l=getPrimeList(n)

  mn=len(str(n))
  for i in range(2**len(l)):
    a=n
    b=1
    for j in range(len(l)):
      if ((i>>j)&1):
        a//=l[j]
        b*=l[j]
    mn=min(mn,max(len(str(a)),len(str(b))))

  return mn


print(main())

Solution (Python):
n = int(input())
fmin = 100
for i in range(1,int(n**0.5)+1):
  a = i
  b = n // i
  if b != n/i :
    continue
  
  alen = len(str(a))
  blen = len(str(b))
  f = max(alen, blen)
  fmin = min(fmin,f)
print(fmin)

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

def count_digit(n):
    cnt = 1
    while True:
        n = n // 10
        if n == 0:
            break
        else:
            cnt += 1
    return cnt

def gcd(x,y):
    if x%y==0:
        return y
    else:
        return gcd(y, x%y)

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

divs_list = make_divisors(N)

min_f = 12
len_d = len(divs_list)
for i in range(len_d):
    if i > len_d-i:
        break
    cnt = max(count_digit(divs_list[i]),count_digit(divs_list[len_d-i-1]))
    if min_f > cnt:
        min_f = cnt
print(cnt)

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

end = int(N ** (1/2)) + 1

for i in reversed(range(1,end)):
    if N % i == 0:
        ans_a = i
        ans_b = int(N / i)
        print(max(len(str(ans_a)), len(str(ans_b))))
        exit()

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

ans = 100000000000000000
for div in d:
    r = n//div
    temp = max(len(str(div)),len(str(r)))
    if ans > temp:
        ans = temp

print(ans)

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

divisors = []
i = 1
while i <= math.sqrt(N):
    if N % i == 0:
        divisors.append([i, int(N/i)])
    i += 1
ans = N
for i in divisors:
    if max(i) < ans:
        ans = max(i)

print(len(str(ans)))

Solution (Python):
from math import sqrt
N = int(input())
ans = float("inf")
for a in range(1, round(sqrt(N)) + 1):
    if N % a:
        continue
    b = N // a
    ans = min(ans, max(len(str(a)), len(str(b))))
print(ans)

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

ans = n
for a in range(1, n):
    if a * a > n:
        break
    if n % a != 0:
        continue

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

print(ans)

Solution (Python):
import math

N = int(input())

yakusu_pair =[]

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

min_f=12
for pair in yakusu_pair:
    f=int(math.log10(max(pair[0],pair[1])))+1
    if min_f>f:min_f=f

print(min_f)

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

Solution (Python):
from math import sqrt

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

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

l=make_divisors(n)
m=len(l)
ans=10**100
for i in range(min(m//2+1,m)):
    a,b=len(str(l[i])),len(str(n//l[i]))
    ans=min(ans,max(a,b))
print(ans)

Solution (Python):



N = int(input().split()[0])
c = 0
for i in range(int(N ** (1/2)), 0, -1):
    if N % i == 0:
        a = int(N / i)
        d = (i, a)
        break

ans = len(str(max(d)))
print(ans)

Solution (Python):
N = int(input())
print(min([len(str(N//n)) for n in range(1, int(N**0.5) + 1) if N % n < 1]))

Solution (Python):
N = int(input())
ans = 10
for n in range(1, N+1):
    q, r = divmod(N, n)
    if n > q:
        break
    if r == 0:
        d = max(len(str(n)), len(str(q)))
        if ans > d:
            ans = d
print(ans)

Solution (Python):
import math
n = int(input())
res = 10**10
for i in range(1, int(math.sqrt(n) + 1)):
  if(n % i == 0):
    tmp = max([len(str(i)), len(str(n//i))])
    if(res > tmp):
      res = tmp
print(res)

Solution (Python):
n = int(input())
sqrt_n = int(n ** 0.5)
ans = 10

for i in range(1, sqrt_n + 1):
    let = n // i
    if n % i == 0:
        if len(str(max(i, let))) < ans:
            ans = len(str(max(i, let)))
print(ans)

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

ans = float('inf')
for i in range(1,sqrt_N+1):
  if N % i == 0:
    if ans > max(len(str(i)),len(str(int(N/i)))):
      ans = max(len(str(i)),len(str(int(N/i))))

print(ans)

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

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

print(ans)

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

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

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

    
    return divisors

l = make_divisors(n)

ans = 10**10
for v in l:
    ans = min(ans, f(v, n//v))
print(ans)

Solution (Python):
n = int(input())
import math
def F (a,b):
    a_len = len(str(a))
    b_len = len(str(b))
    return max(a_len,b_len)
result = 0
if n % 2 == 0:
    for i in range(2,int(math.sqrt(n))+1,2):
        if n % i == 0:
            result = len(str(n//i))
else:
    for j in range(1,int(math.sqrt(n))+1,2):
        if n % j == 0:
            result = len(str(n//j))
print(result)

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 F(a, b):
    return max(len(str(a)), len(str(b)))


ans = []
for n in make_divisors(N):
    n2 = N // n
    ans.append(F(n, n2))
print(min(ans))

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

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

res = len(str(n))
for a in range(1,n+1):
	if a * a > n:
		break
	if n%a != 0:
		continue
	b = n//a
	ans = max(len(str(a)), len(str(b)))
	if ans < res:
		res = ans

print(res)

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())
l=make_divisors(n)
print(len(str(l[len(l)//2])))

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


if __name__ == '__main__':
    print(main())

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

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

print(sorted([F(n,N//n) for n in range(1, int(2+N**0.5)) if N % n == 0])[0])

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

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

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

for i in range(len(f)):
    digit_num.append(max(len(str(f[i][0])),len(str(f[i][1]))))

print(min(digit_num))

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

a =  n**0.5//1
num = 0

while a-num>=2:
    if n%(a-num) == 0:
        break
    num += 1

def keta(b):
    c = 1
    while b/10**c >=1:
        c += 1
    return c
    
print(max(keta(a-num),keta(n/(a-num))))

Solution (Python):
import math
number = int(input())
ruijou = int(math.sqrt(number))
check = 0
count = 0
result =100000000000

for i in range(1,int(ruijou)+1):
    if number % i == 0:
        check = int(number / i)
        while not check == 0:
            check = int(check / 10)
            count += 1
        if count < result :
            result = count
    count = 0
print(result)

Solution (Python):
N = int(input())
r = 100
for A in range(1, min(N, 100000)+1):
  if N%A != 0:
    continue
  B = N//A
  d = max(len(str(A)), len(str(B)))
  r = min(r, d)
print(r)

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

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

sq = int(N ** 0.5) + 1

f = []
for i in range(1, sq):
    if N % i == 0:
        f.append((i, N // i))

ans = N
for a, b in f:
    ans = min(ans, max(len(str(a)), len(str(b))))

print(ans)

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

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

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

ans = 10000000000
for pair in pairs:
    a = len(str(pair[0]))
    b = len(str(pair[1]))
    ans = min(ans, a if a > b else b)
print(ans)

Solution (Python):
import sys
input=sys.stdin.readline
n=int(input())
i=1
while i**2<=n:
    if n%i==0:
        x=n//i
        count=1
        while not x<10:
            x=x/10
            count+=1
        ans=count
    i+=1
print(ans)

Solution (Python):

import math

if __name__ == '__main__':
    N = int(input())
    val = len(str(N))
    li = []
    for i in range(1, math.ceil(math.sqrt(N))+1):
        if N % i == 0:
            a = len(str(int(i)))
            b = len(str(int(N/i)))
            c = max(a, b)

            if c < val:
                val = c

    print(val)

Solution (Python):
n = int(input())
print(min(len(str(n // divisor)) for divisor in range(1, int(n ** .5) + 1) if n % divisor < 1))

Solution (Python):
import math
def keta(n):
    r = 1
    _n = n
    while _n != 0 :
        _n = _n // 10
        if _n > 0:
            r +=1
    return r
n = int(input())
r = keta(n)
for a in range(1, int(math.sqrt(n))+1):
    b = n / a
    if n % a == 0:
        r = min(r, max(keta(a), keta(b)))
print(r)

Solution (Python):
import sys

stdin = sys.stdin

def na(): return map(int, stdin.readline().split())

def ns(): return stdin.readline().strip()

n = int(ns())
i = 1
mi = n
while i*i <= n:
    if n % i == 0:
        x = n // i
        mi = min(mi, x)
    i += 1
print(len(str(mi)))

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


def get_divisors(n):
    """
    n の約数をリストで返す
    :param int n:
    :rtype: list of int
    """
    ret = []
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0:
            ret.append(i)
            if n // i != i:
                ret.append(n // i)
    return ret


N = int(sys.stdin.readline())
ans = IINF
for d in get_divisors(N):
    c = N // d
    f = max(len(str(c)), len(str(d)))
    ans = min(ans, f)
print(ans)

Solution (Python):

import sys
import math
INF = float("inf")


def divisors_pair(n):
    ret_A = []
    ret_B = []
    for i in range(1, int(n ** 0.5) + 1):
        d, m = divmod(n, i)
        if m == 0:
            ret_A.append(i)
            ret_B.append(d)
    return ret_A, ret_B


def solve(N: int):
    A, B = divisors_pair(N)
    m = INF
    for a, b in zip(A, B):
        curr = max(len(str(a)), len(str(b)))
        m = min(m, curr)
    print(m)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)


if __name__ == '__main__':
    main()

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

Solution (Python):
def f(n):
  a = 1
  while True:
    b, m = n // a, n % a
    if b < a:
      break
    if m == 0:
      yield b
    a += 1

n = int(input())
ans = len(str(n))
for b in f(n):
  ans = min(ans, len(str(b)))

print(ans)

Solution (Python):
N=int(input())
jN=N**0.5
for i in range(int(jN),0,-1):
    j=N/i
    if j==int(j):
        ans=max(i,j)
        break
c=0
while ans >0:
    c+=1
    ans//=10
print(c)

Solution (Python):


N = int(input())

ans = float('inf')

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

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(max(len(str(a)), len(str(b))))

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

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

Solution (Python):
import math

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

N = int(input())

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

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 




 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    yakusuu = make_divisors(N)
    
    ans = INF
    for i,val in enumerate(yakusuu):
        for j,vol in enumerate(yakusuu):
            if val*vol == N:
                tmp = max(val,vol)
                tmptmp = len(str(tmp))
                
                if ans > tmptmp:
                    ans = tmptmp
                    
    print(ans)
    
    
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
    
if __name__ == "__main__":
	main()

Solution (Python):


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

    
    return divisors

N = int(input())
l = make_divisors(N)

ans = 100
for i in range(len(l)):
    a = l[i]
    b = N//l[i]
    tmp = max(len(str(a)), len(str(b)))
    if tmp < ans :
        ans = tmp

print(ans)

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

min = len(str(N))
for a in range(2, int(math.sqrt(N))+1):
    if len(str(int(N/a))) < min and N % a == 0:
        min = len(str(int(N/a)))

print(min)

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

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

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

def factor(n):
    factList = []
    i = 1
    while i * i <= n:
        if n % i == 0:
            factList.append(i)
            factList.append(n // i)
        i += 1

    factList.sort()
    return factList

fact = factor(N)

ans = float('inf')
for i in range(len(fact)):
    f = max(len(str(fact[i])), len(str(fact[-1 - i])))
    ans = min(ans, f)

print(ans)

Solution (Python):
N = long(raw_input())
def dig(A,B):
        if A > B:
                return A
        else:
                return B
A = 0
B = 0 
X = []
i = long(1)
while N >= A*A:
        A = long(i)
        if N%i == 0:
                B = long(N/i)
                X.append(dig(A,B))
        if A in X:
                break
        i+=1
print len(str(min(X)))

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

min_f = float('inf')

for i in range(1, m+1):
  x = n/i
  if x.is_integer():
    x = int(x)
    i = int(i)
    f = max(len(str(i)), len(str(x)))
    if min_f > f:
      min_f = f
print(min_f)

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

Solution (Python):
import math

def F(x, y):
    tmp = max(x, y)
    ans = 0
    while tmp != 0:
      tmp = tmp // 10
      ans += 1
      
    
    return ans
  
n = int(input())

keta = F(0, n)



for i in range(1,int(math.sqrt(n))+1,1):
  if n % i == 0:
    tmp = F( n / i, i )
    if tmp < keta:
      keta = tmp

print( keta )

Solution (Python):

import collections
import itertools
import sys

def getint(): return int(input())
def getints(): return list(map(int, input().split()))

def get_divisor(n):
    if n == 1:
        return [1]
    res = []
    for i in range(1, n):
        if i * i > n:
            break
        if n % i == 0:
            res.append(i)
            if i != n // i:
                res.append(n//i)
    return res

n=getint()
divs=get_divisor(n)
res = 10
for d1 in divs:
    d2 = n // d1
    tmp = max(len(str(d1)), len(str(d2)))
    res = min(res, tmp)

print(res)

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

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


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


ans = 1e12
a = math.ceil(math.sqrt(N))
for i in range(1, a+1):
    if N % i == 0:
        ans = min(ans, f(i, N // i))
print(ans)

Solution (Python):
n,d=int(input()),[]
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)
d.sort()
print(len(str(d[int(len(d)/2)])))

Solution (Python):
import math
n = int(input())
min_len = 10**11
for a in range(1,int(math.sqrt(n))+1):
  b = (n//a)
  if a * b == n:
    tmp = max(len(str(a)), len(str(b)))
    if tmp < min_len:
      min_len = tmp
print(min_len)

Solution (Python):
import numpy as np
N = int(input())
lim = int(np.sqrt(N)) + 1
p = []
for i in range(1,lim):
    if N % i == 0:
        p.append(int(N / i))
st = str(p[-1])
print(len(st))

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

ans = []
for i in range(half, 0, -1):
    if n%i==0:
        ans.append(max(len(str(i)), len(str(n//i))))
print(min(ans))

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

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

a = max(divisor_list)
b = int(n/a)

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

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

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

b = n // a

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

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


n = int(input())
lst = make_divisors(n)
ans = 10**9
for l in lst:
    a = len(str(l[0]))
    b = len(str(l[1]))
    ans = min(ans,max(a,b))
print(ans)

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

Solution (Python):

import sys, math, fractions, itertools


def solve(N: int):
    a = math.floor(math.sqrt(N))
    mn = N
    for aa in range(1, a+1):
        if N % aa == 0:
            k = math.floor(math.log10(N // aa)) + 1
            mn = min(mn, k)
    print(mn)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

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

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

n2 = int(n ** 0.5)
ans = 10 ** 11

for i in range(1, n2+1):
  if n % i == 0:
    t = n // i
    ans = min(ans, f(i, t))

print(ans)

Solution (Python):
import math
n = int(input())
r = int(math.sqrt(n))
arr = []
for i in range(1,r+1):
  b = n / i
  if b.is_integer():
    arr.append(max(len(str(i)),len(str(int(b)))))
print(min(arr))

Solution (Python):
from math import sqrt, ceil

def check(n):
    minf = len(str(n))
    square = ceil(sqrt(n)) 
    for a in range(1, square+1):
        b, r = divmod(n, a)
        if r == 0:
            f = max(len(str(a)), len(str(b)))
            minf = min(f, minf)
    return minf


N = int(input())
print(check(N))

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

s = (n**0.5) + 1

li = []

for i in range(1, int(s+1)):
    if n%i == 0:
        li.append(i)
        li.append(n//i)
        
print(max(len(str(li[-1])), len(str(li[-2]))))

Solution (Python):
import math

N = int(input())

ans = 11

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

print(ans)

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

print(ans)

Solution (Python):
N = int(input())
last = N
for num in range(1, N+1):
  if num**2 > N:
    print(len(str(last)))
    break
  elif num**2 == N:
    print(len(str(num)))
    break
  else:
    if N%num == 0:
      last = N//num

Solution (Python):

import sys
sys.setrecursionlimit(10**7)
import math
from collections import defaultdict


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))



N = I()
ans = 11
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
from sys import exit, stdin
N = int(stdin.readline().rstrip())
ans = 0
for i in range(int(math.sqrt(N)), 0, -1):
    if N % i == 0:
        ans = N // i
        break
print(len(str(ans)))

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

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


def main():
    N = int(input())
    ans = float('INF')
    for i in range(1, int(N ** 0.5) + 1):
        if N % i == 0:
            ans = min(ans, f(i, N // i))
    print(ans)


main()

Solution (Python):
import math

N = int(input())

d=[]

for i in range(1,int(math.sqrt(N))+1):
    if N%i == 0:
        d.append(N//i)
        d.append(i)
    
Fmin=10**10

for i in d:
    if N%i ==0:
        A = i
        B = N//i
        F = max(len(str(A)),len(str(B)))
        if F < Fmin:
            Fmin = F
print(Fmin)

Solution (Python):

import itertools
from collections import Counter
from collections import defaultdict
import bisect
from heapq import heappush, heappop

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

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

        i += 1

    print(ans)

if __name__ == '__main__':
    main()

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

sqrt_N = math.floor(N**(1/2))

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


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

Solution (Python):
import math

N = int(input())

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

for n in range(1, tmp+1):
    if N % n == 0:
        a = N//n
print(len(str(a)))

Solution (Python):
N = int(input())
ans = 11
for A in range(1,int(N**(1/2))+1):
  if N%A == 0:
    B = str(N//A)
    tmp = len(B)
    ans = min(tmp,ans)
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


n = int(input())
div = make_divisors(n)
if len(div) % 2 == 0:
    print(len(str(div[int(len(div) / 2)])))
else:
    print(len(str(div[int(len(div) / 2)])))

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

Solution (Python):
import math

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

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

Solution (Python):
def main():
    n =int(input())
    a = 0
    for i in range(int(n**0.5//1),0,-1):
        if n%i ==0:
            a = i
            break
    ans = str(n//a)
    print(len(ans))
if __name__ == '__main__':
    main()

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

ret = float('inf')
i = 1
while i * i <= N :
    if N % i == 0 :
        ret = min(ret, len(str(N//i)))
    i += 1
print(ret)

Solution (Python):
import math

n = int(input())
cd = []
for i in range(int(n ** 0.5)):
    if n % (i + 1) == 0:
        cd.append(i + 1)
a = max(cd)
b = n // a
print(int(math.log10(b)) + 1)

Solution (Python):
N = int(input())
ans = 10
for i in range(1,int(N**(1/2))+1):
  if N%i == 0:
    j = N//i
    k = 0
    while j//(10**k) > 0:
      k += 1
    ans = min(ans,k)
print(ans)