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 math
input = lambda: sys.stdin.readline()
exec("try:sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w')\nexcept:pass")

length = lambda x: len(str(int(x)))

n = int(input())
ans = []
for i in range(1, int(math.sqrt(n)) + 1):
    if n % i == 0:
        if n // i == i:
            ans.append(length(n // i))
        else:
            ans.append(max(length(i), length(n // i)))
print(min(ans))

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def make_divisors(n: int) -> list:
    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 = i_input()

    num_list = make_divisors(n)

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

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
sqrt = pow(N, 0.5)
ans = 10**10

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

Solution (Python):

import math
N = int(input())


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

print(saisho)

Solution (Python):
import math

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

Solution (Python):
import math

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

Solution (Python):
import math
def resolve():
    n = int(input())
    ans = len(str(n))
    MAX = int(math.sqrt(n))

    for a in range(1, MAX + 1):
        if n % a != 0:
            continue
        b = int(n / a)
        tmp = max(len(str(a)), len(str(b)))
        ans = min(ans, tmp)

    print(ans)
    return

resolve()

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

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

for A in range(1, rootN+1):
  if N % A == 0:
    B = int(N / A)
    ans.add(max(len(str(A)), len(str(B))))
  else:
    pass
print(min(ans))

Solution (Python):
N = int(input())
l = []
for a in range(1, 10**5+1):
  if N % a == 0:
    b = N // a
    s = max(len(str(a)), len(str(b)))
    l.append(int(s))
print(min(l))

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

ans = 0
for i in list(range(1,int(n**0.5)+1))[::-1]:
    if n%i == 0:
        print(len(str(i)) if i > n/i else len(str(n//i)))
        exit()
print(len(str(n)))

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



left = []
right = []
for i in range(1, floor(sqrt(N)) + 1):
    if (N % i == 0):
        left.append(i)
        right.append(N // i)
    else:
        continue

last_left = str(left[-1])
last_right = str(right[-1])

ans = []
for i in range(len(left) - 1, -1, -1):
    ans.append(max(len(str(left[i])), len(str(right[i]))))

print(min(ans))

Solution (Python):
from math import sqrt
n = int (input())
nsqrt = int(sqrt(n))
for i in range(nsqrt, 0, -1):
    if n % i == 0:
        b = n // i
        a = i
        break
    if i == 1:
        b = 1
        a = n
def digits(n):
    ans = 0
    while n > 0:
        ans += 1
        n //= 10
    return ans
print (max(digits(a), digits(b)))

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

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

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

ans = 10**18

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

Solution (Python):
import math as ma
N = int (input ())
n = ma.floor(int(ma.sqrt(N)))
while 1 < n+1:
  if (N/n)%1 == 0:
    x = str(N/n)
    print (len(x)-2)
    break
  else:
    n -= 1

Solution (Python):
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()

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

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

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

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

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

    return arr



def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def 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


inf = 10 ** 18
mod = 10 ** 9 + 7

n = ir()
if n == 1:
    print(1)
    sys.exit()
tmp = make_divisors(n)
leng = len(tmp)
ans = 0
if leng%2 == 0:
    ans = max(len(str(tmp[leng//2-1])), len(str(tmp[leng//2])))
else:
    ans = len(str(tmp[leng//2]))
print(ans)

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

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

Solution (Python):

import math
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


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


n = I()
divs = make_divisors(n)
divs = [elem for elem in divs if elem <= math.sqrt(n)]
ans = f(divs[0], n // divs[0])
for i in divs:
    ans = min(ans, f(i, n // i))
print(ans)

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

root = math.sqrt(n)
x = str(int(root // 1))
answer = 0

for i in reversed(range(1, int(x) + 1)):
    if n % i == 0:
        answer = i
        break
answer_2 = int(n / answer)

if len(str(answer)) >= len(str(answer_2)):
    print(len(str(answer)))
else:
    print(len(str(answer_2)))

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

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




def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))


def main():
	ans=15
	n=II()

	nn=int(n**0.5)+10

	for i in range(1,nn):
		if n%i==0:
			a=len(str(i))
			b=len(str(n//i))
			ans=min(ans,max(a,b))
			

	print(ans)




if __name__ == "__main__":
	main()

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_nl = lambda: list(map(int, readline().split()))
in_na = lambda: map(int, read().split())
in_s = lambda: readline().rstrip().decode('utf-8')


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


def main():
    N = in_n()
    yaku = make_divisors(N)
    keta = lambda s: len(str(s))

    ans = 11
    for t in yaku:
        ans = min(ans, max(keta(t), keta(N // t)))

    print(ans)


if __name__ == '__main__':
    main()

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

ans_list=[]
a_max=int(n**(1/2))+1
for a in range(1,a_max):
    if n%a==0:
        
        b=n//a
        num_a=len(list(str(a)))
        num_b=len(list(str(b)))
        
        ans_list.append(max(num_a,num_b))
    
print(min(ans_list))

Solution (Python):
N = int(input())
ans = len(str(10**10))
for a in range(1, int(N**0.5)+1):
    d, r = divmod(N, a)
    if r==0:
        l = max([len(str(n)) for n in [d, a]])
        ans = min(ans, l)
print(ans)

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


N = int(input())

ans = 10**11
for i in range(1,int(N**0.5)+1):
    if N%i == 0:
        B = N//i
        
        tmp = max(calc_digits(i),calc_digits(B))
        
        ans = min(ans,tmp)

print(ans)

Solution (Python):

import math
import sys

n = int(input())

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

ans = sys.maxsize

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

print(int(math.log10(ans) + 1))

Solution (Python):
import math
N = int(input())
min_= 100
for i in range(1,math.ceil(math.sqrt(N))+1,1):
    if (N % i != 0):
        continue
    a = i;
    b = int(N/a)
    min_ =min(min_,max(len(str(a)),len(str(b))))
print(min_)

Solution (Python):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

N = int(input())

div = make_divisors(N)
ans = 100

for d in div:
    a = d
    b = N // a
    ans = min(ans, max(len(str(a)), len(str(b))))
print(ans)

Solution (Python):
import sys
import math
n=int(input())
ans=100000000
N=int(math.sqrt(n))
for a in range(1,N+1):
    b=n//a
    if n==a*b:
        aa=str(a)
        bb=str(b)
        tmp=max(len(aa),len(bb))
        ans=min(ans,tmp)
print(ans)

Solution (Python):
N = int(input())
min = 10000000000000000000000000000000000000000000
M = int((N)**(1/2))
for i in range(1,M+1):
  if N%i==0:
    A = i
    B = N//i
    FAB  = max(len(str(A)),len(str(B)))
    if FAB < min:
      min = FAB
print(min)

Solution (Python):
import math


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

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

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

    return arr


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

    C = []
    for a, n in A:
        for i in range(n):
            C.append(math.log10(a))

    C = sorted(C, reverse=True)
    t = sum(C) / 2

    p = 0
    q = 0
    for c in C:
        pp = p + c
        qq = q + c

        tp = abs(t - pp) + abs(t - q)
        tq = abs(t - p) + abs(t - qq)

        if tp < tq:
            p = pp
        else:
            q = qq

    p = int(p) + 1
    q = int(q) + 1

    print(max(p, q))


main()

Solution (Python):
def main():
    n = int(input())
    div = []
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            div.append(n//i)
    
    f = div[-1]
    ans = 0
    while f > 0:
        f//=10
        ans+=1
    print(ans)
main()

Solution (Python):
n = int(input())
ans = len(str(n))

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

print(ans)

Solution (Python):



def F(n, m):
  return max(len(str(n)), len(str(m)))

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

Solution (Python):
N = int(input())
ans = len(str(N))
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):
n = int(input())
ans = len(str(n))
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):
import math

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

N = int(input())
minimum = len(str(N))

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


print(minimum)

Solution (Python):
n = int(input())
i = 1
ans = n
lst = []
while i * i <= n:
    if n % i == 0:
        ans = n // i
    i += 1

print(len(str(ans)))

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

for i in range(root_N, 0, -1):
    if N % i == 0:
        k = N//i
        print(len(str(k)))
        break

Solution (Python):
from math import sqrt
n = int(input())
m = int(sqrt(n))
lst = []
for i in range(2, m + 1):
    if n % i == 0:
        j = 0
        while True:
            if n % i == 0:
                n //= i
                j += 1
            else:
                for k in range(j):
                    lst.append(i)
                break

lst.append(n)

ans = float("INF")
for i in range(2 ** len(lst)):
    num1 = 1
    num2 = 1
    for j in range(len(lst)):
        if (i >> j) & 1:
            num1 *= lst[j]
        else:
            num2 *= lst[j]
    ans = min(ans, max(len(str(num1)), len(str(num2))))
    
print(ans)

Solution (Python):
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
  
n = int(input())
div = prime_factorize(n)

ans = 11
m = len(div)
for i in range(1<<m):
    a, b = 1, 1
    for j in range(m):
        if i & (1<<j):
            a *= div[j]
        else:
            b *= div[j]
    tmp = max(a, b)
    ans = min(ans, len(str(tmp)))
print(ans)

Solution (Python):
def f(a, b):
    str_a = str(a)
    len_a = len(str_a)
    str_b = str(b)
    len_b = len(str_b)

    return len_a if len_a > len_b else len_b

N = int(input())

min = 10**10
max_iter = 10 ** (len(str(N))//2 + 1)

for i in range(1, max_iter):
    a = i
    if N % a == 0:
        b = int(N / a)
    else:
        continue

    ret = f(a, b)
    if min > ret:
        min = ret
        if min <= len(str(N))//2:
            break

print(min)

Solution (Python):
N = int(input())
import math
c = []
for i in range(1,math.floor(N**0.5)+1):
  if N % i == 0:
    c.append([i,int(N/i)])
cc = []
for j in c:
  r = max(len(str(j[0])),len(str(j[1])))
  cc.append(r)
print(min(cc))

Solution (Python):
N=int(input())
ans=float('inf')

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

Solution (Python):
import math

N = int(input())
sq = int(N ** 0.5)
for i in range(sq,0,-1):
    if N % i == 0:
        A = i
        B = N//i
        break
print(int(math.log10(B))+1)

Solution (Python):
import math

N = int(input())
sq = int(N ** 0.5)
for i in range(sq,0,-1):
    if N % i == 0:
        A = i
        B = N//i
        break
print(int(math.log10(B))+1)

Solution (Python):
import math
N = int(input())
m = int(math.sqrt(N)) + 1
mi = 1000000000
for i in range(1, m):
    if N % i == 0:
        mi = min(mi, int(math.log10(N/i)+1))
print(mi)

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

Solution (Python):

import math

n = int(input())

for a in range(math.ceil(math.sqrt(n)), 0, -1):
    if n % a == 0:
        break

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

print(ans)

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

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

Solution (Python):
def LI():return map(int,input().split())
def I(): return input().split()

n=int(input())
lst=[]
ans=float("inf")
for i in range(1,int(n**0.5)+1):
    if n % i==0:
        lst.append((i,n//i))

for j,k in lst:
    ans=min(ans,max(len(str(j)),len(str(k))))
print(ans)

Solution (Python):
import itertools

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

n = int(input())

f = factorization(n)



if len(f) == 1 and f[0][1] == 1:
    print(len(str(n)))
else:
    pf = []
    for r in f:
        if r[0] == 1:
            continue
        pf += [r[0]]*r[1]
    ans = len(str(n))
    for i in range(1,len(pf)//2+1):
        for c in itertools.combinations(pf, i):
            
            tmp = 1
            for t in c:
                tmp *= t
            ans = min(ans, max(len(str(tmp)), len(str(n//tmp))))
    print(ans)

Solution (Python):
import math

N = int(input())
ans = len(str(N))

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

print(ans)

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




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

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

sqrt = 0

while sqrt*sqrt < n:
    sqrt += 1

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

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

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

sosu = make_divisors(n)

kumi = []
for i in range(len(sosu)):
  for j in range(len(sosu)):
    
    if sosu[i]*sosu[j] == n:
      kumi.append([str(sosu[i]), str(sosu[j])])

top = 10000000000


for i in kumi[:int(len(kumi)/2)+2]:
  sums = max(len(i[0]), len(i[1]))
  if top > sums:
    top = sums
    
print(top)

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

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

Solution (Python):
import math
N = int(input())
max_num = 0
for v in range(1,int(math.sqrt(N))+1):
    if N % v == 0:
        max_num = max(max_num,v)
n = N // max_num

c_n = max(max_num,n)

res = 0

while 0 < c_n:
    c_n //= 10
    res += 1
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)
    return divisors

def F(A,B):
    N=len(str(A))
    M=len(str(B))
    if N>=M:
        return N
    else:
        return M

N=int(input())
divisors=make_divisors(N)
ans=float("inf")
for A in divisors:
    B=N//A
    ans=min(ans,F(A,B))
print(ans)

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

yaku = []

for i in range(1, N+1):
    if N % i == 0:
        if i in yaku:
            break
        if N/i <= i:
            yaku.append(i)
            break
        yaku.append(i)
        yaku.append(N//i)
    elif N/i < i:
        break

yaku.sort()
ans = str(yaku[len(yaku)//2])
print(len(ans))

Solution (Python):
def resolve():
    '''
    code here
    '''
    import math
    N = int(input())
    sqrt_n = math.sqrt(N)

    B1=10**10
    for i in range(1, int(sqrt_n)+1):
        if N % i == 0:
            B1 = min(B1, N//i)
            
    B2 = N // B1
    print(max(len(str(B1)), len(str(B2))))


if __name__ == "__main__":
    resolve()

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

Solution (Python):
n = int(input())
for i in range(int(n ** 0.5),-1,-1):
    if (n / i).is_integer():
        print(len(str(int(n / i))))
        exit()

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

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

Solution (Python):
n = int(input())
factors = []
while n%2 == 0:
    factors.append(2)
    n //=2

for f in range(3, int(n**0.5)+ 1, 2):
    while n%f == 0:
        factors.append(f)
        n //= f
if n != 1:
    factors.append(n)

nf = len(factors)

fab = 11
sset = set()
als = 2**nf
for i in range(als):
    if als^i in sset:
        continue
    sset.add(i)
    a = 1
    b = 1
    for j in range(nf):
        if (i>>j)&1:
            a *= factors[j]
        else:
            b *= factors[j]

    fab = min(fab, max(len(str(a)), len(str(b))))
print(fab)

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

for i in range(1,m+1):
    if n%i == 0:
        p = int(n/i)
        if Q > len(str(p)):
            Q = len(str(p))
print(Q)

Solution (Python):

N = int(input())

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

print(min(lst))

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

ans=100000000
now=0

for i in range(1,int(N**0.5) +2):
    if N%i !=0:
        continue
    else:
        A=i
        B=int(N/A)
        now =max(len(str(A)),len(str(B)))
        ans =min(ans,now)
    
print(ans)

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

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

L = make_divisors(N)
l = len(L)
if l % 2 == 0:
    a1 = str(L[l // 2] - 1)
    a2 = str(L[l // 2])
    print(max(len(a1), len(a2)))
else:
    a1 = str(L[l // 2 - 1])
    a2 = str(L[l // 2])
    a3 = str(L[l // 2 + 1])
    d1 = max(len(a1), len(a2))
    d2 = max(len(a2), len(a3))
    print(min(d1, d2))

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

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

ans=make_divisors(N)

def keta(n):
    for a in range(11):
        if 10**a<=n<10**(a+1):
            return a+1
F=[]
for num in ans:
    a=keta(num)
    b=keta(N//num)
    f=max(a,b)
    F.append(f)

print(min(F))

Solution (Python):

def calc_digit(n):
    tmp = str(n)

    return len(tmp)

n = int(input())

a = 1
ans = calc_digit(n)

while a**2 <= n:
    if n%a == 0:
        b = n//a

        cur = max(calc_digit(a),calc_digit(b))

        if ans > cur:
            ans = cur

    a += 1

print(ans)

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


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


f = []
i = 1
while i * i <= N:
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        f.append(max(d1, d2))
    i += 1

print(min(f))

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


def digit(N):
    d = 0
    while N >= 1:
        N /= 10
        d += 1
    return d


f = []
i = 1
while i * i <= N:
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        f.append(max(d1, d2))
    i += 1

print(min(f))

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


def digit(N):
    d = 0
    while N >= 1:
        N /= 10
        d += 1
    return d


f = []
for i in range(1, int(math.sqrt(N))+1):
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        f.append(max(d1, d2))

print(min(f))

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def 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(readline())
    divs = divisors(n)
    ans = INF

    for a in divs:
        b = n // a
        score = max(len(str(a)), len(str(b)))
        ans = min(ans, score)

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
ans = float("inf")
a = 1
b = 1

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

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

Solution (Python):
import sys
import math


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

number = 1
ans = 1

for i in range(1, M+1):
    if N % i == 0:
        number = i

number = math.floor(N/number)
ans = len(str(number))

print(ans)

Solution (Python):

import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def make_divisors(n): 
    if n == 1:
        return 1
    lower_divisors , upper_divisors = [], [] 
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return n // lower_divisors[-1]

N = int(readline())
ans = make_divisors(N)
print(len(str(ans)))

Solution (Python):


import math


def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(input())
    return N


def F(A: int, B: int) -> int:
    """
    10進表記における、Aの桁数とBの桁数のうち大きい方を返す.

    Args:\n
        A (int): 整数
        B (int): 整数

    Returns:\n
        int: 10進表記における、Aの桁数とBの桁数のうち大きい方
    """
    digits_A = len(str(A))
    digits_B = len(str(B))
    return max(digits_A, digits_B)


def main(N: int) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 整数（1 <= N <= 10^10）
    """
    
    
    
    ans = len(str(N))  
    for a in range(1, int(math.sqrt(N)) + 1):
        
        if N % a != 0:
            continue

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

    
    print(ans)


if __name__ == "__main__":
    
    N = get_input()

    
    main(N)

Solution (Python):


import math


N = int(input())

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


ans = len(str(N))
for a in range(1, int(math.sqrt(N)) + 1):
    if N % a != 0:
        continue
    b = int(N / a)
    ans = min(ans, F(a, b))
    

print(ans)

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