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



Sample input:
10000


Sample output:
3

Submission status: Wrong Answer

Solution code:
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)

#print(f)

if len(f) == 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)

Submission status: Wrong Answer

Solution code:
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)

#print(f)

if len(f) == 1:
    print(len(str(n)))
else:
    pf = []
    for r in f:
        pf += [r[0]]*r[1]
    ans = len(str(n))
    for i in range(1,len(pf)//2+2):
        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)

Submission status: Wrong Answer

Solution code:
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)

print(f)

if len(f) == 1:
    print(len(str(n)))
else:
    pf = []
    for r in f:
        pf += [r[0]]*r[1]
    ans = len(str(n))
    for i in range(1,len(pf)//2+2):
        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)

Submission status: Wrong Answer

Solution code:
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)
#print(f)
if len(f) == 1:
    print(len(str(n)))
else:
    pf = []
    for r in f:
        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)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

def prime(n):
    a = [1]
    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

l = prime(N)

sqrt = str(int(math.sqrt(N)))
print(max(len(sqrt),len(str(l[-1]))))

Submission status: Wrong Answer

Solution code:
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)
#print(type(sosu))
kumi = []
for i in range(len(sosu)):
  for j in range(len(sosu)):
    #print(type(sosu[i]))
    if sosu[i]*sosu[j] == n:
      kumi.append([str(sosu[i]), str(sosu[j])])
#print(kumi)
top = 10000000000
#iter = 0
#if 
for i in kumi[:int(len(kumi)/2)]:
  sums = max(len(i[0]), len(i[1]))
  if top > sums:
    top = sums
    #iter = max(len(kumi[0]), len(kumi[1]))
print(top)

Submission status: Wrong Answer

Solution code:
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)
#print(type(sosu))
kumi = []
for i in range(len(sosu)):
  for j in range(len(sosu)):
    #print(type(sosu[i]))
    if sosu[i]*sosu[j] == n:
      kumi.append([str(sosu[i]), str(sosu[j])])
if len(kumi)%2 == 0:
  #print(int(round(len(kumi)/2)))
  print(len(max(kumi[int(len(kumi)/2)])))
else:
  #print(int(round(len(kumi)/2)))
  print(len(max(kumi[int(round(len(kumi)/2))])))

Submission status: Wrong Answer

Solution code:
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)
#print(type(sosu))
kumi = []
for i in range(len(sosu)):
  for j in range(len(sosu)):
    #print(type(sosu[i]))
    if sosu[i]*sosu[j] == n:
      kumi.append([str(sosu[i]), str(sosu[j])])
if len(kumi)%2 == 0:
  #print(int(round(len(kumi)/2)))
  print(len(min(kumi[int(len(kumi)/2)])))
else:
  #print(int(round(len(kumi)/2)))
  print(len(min(kumi[int(round(len(kumi)/2))])))

Submission status: Wrong Answer

Solution code:
def resolve():
    '''
    code here
    '''

    N = int(input())

    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

    A = prime_factorize(N)

    B1 = 1
    B2 = 1

    for j in A[::-1]:
        if B1 >= B2:
            B2 *= j
        else:
            B1 *= j
    # print(A, B1, B2)
    print(max(len(str(B1)), len(str(B2))))


if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 10
for i in range(1, n+1):
    if i <= n/i:
        if n % i == 0:
            if len(str(max(i, n/i))) <= ans:
                ans = len(str(max(i, n/i)))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())


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


ans = 10
for i in range(1, N):
    if i * i > N:
        break
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        d = max(d1, d2)
        if d < ans:
            ans = d
if ans == 10:
    ans = 1

print(ans)

Submission status: Wrong Answer

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


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


ans = math.inf
for i in range(1, N):
    if i * i > N:
        break
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        d = max(d1, d2)
        if d < ans:
            ans = d
if ans == math.inf:
    ans = 0

print(ans)

Submission status: Wrong Answer

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


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


ans = math.inf
for i in range(1, N):
    if i * i > N:
        break
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        d = max(d1, d2)
        if d < ans:
            ans = d

print(ans)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import sys
import math

# python3にlongの概念はない
N = int(input())
M = int(math.sqrt(N))
# N**0.5でも可能
number = 1
ans = 1

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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 upper_divisors[-1]

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
frac=[]
for i in range(1,math.floor(math.sqrt(N))):
  if N%i==0:
    frac.append(len(str(int(N/i))))
if N !=1:
  print(min(frac))
else:
  print(1)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
frac=[]
for i in range(1,math.ceil(math.sqrt(N))):
  if N%i==0:
    frac.append(len(str(int(N/i))))
if N !=1:
  print(min(frac))
else:
  print(1)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
frac=[]
result=len(str(N))
for i in range(1,math.ceil(math.sqrt(N))):
  if N%i==0:
    frac.append((i,int(N/i)))
for f in frac:
  if result >len(str(f[1])):
    result=len(str(f[1]))
  
print(result)

Submission status: Wrong Answer

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

    def enum_divisors(n):
        ans = 10**12
        for i in range(1, n):
            if i*i > n:
                break
            if n % i == 0:
                v1 = str(i)
                v2 = str(n//i)
                ans = min(ans, max(len(v1), len(v2)))
        return ans

    print(enum_divisors(N))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

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

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

    return True

n=int(input())
if is_prime(n):
    print(len(str(n)))
    exit()

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

t=factorization(n)
if len(t)==2:
    if t[0][1]==t[1][1]==1:
        print(len(str(t[1][0])))

ns=int(math.sqrt(n)//1)

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

Submission status: Wrong Answer

Solution code:
import math

a=int(input())

i = 1

list_wa = []

while a >= i:
    if a % i == 0:
        list_wa.append(i)
        i = i+1

    else:
        i = i+1


print(list_wa)

ans = (len(list_wa) /2)
ans = math.floor(ans)

print(ans)
print(len(str(list_wa[ans])))

Submission status: Wrong Answer

Solution code:
import math
N= int(input())
mn = 100
ref = 100
for i in range(1,int(N/2)+1):
    if N%i == 0:
        #print(i,int(N/i))
        ref = max(len(str(i)),len(str(int(N/i))))
        #print(mn,ref)
        if ref < mn:
            mn = ref
print(mn)

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = N

ls = []
i = 2
while tmp%i == 0:
  tmp //= i
  ls.append(2)
i += 1
while i*i <= N:
  while tmp%i == 0:
    tmp //= i
    ls.append(i)
  i += 2
  
if tmp > 1:
  ls.append(tmp)
    
ls.sort()

sa = 0
sb = 0
A = 1
B = 1
for i in ls[::-1]:
  if sa <= sb:
    sa += i
    A *= i
  else:
    sb += i
    B *= i
    
A = str(A)
B = str(B)
print(max(len(A),len(B)))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
ans = float("inf")
a = 0
b = 0
for i in range(1, math.ceil(N**0.5)):
    a = i
    b = N/i
    if N%i==0:
        ans = min(ans, max(len(str(a)),len(str(int(b)))))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = float("inf")
a = 0
b = 0
for i in range(1, N//2):
    a = i
    b = N/i
    if N%i==0:
        ans = min(ans, max(len(str(a)),len(str(int(b)))))
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

min_len = len(str(n))
for i in range(1,n+1):
  for j in range(1,n+1):
    if n%i != 0 or n%j !=0:
      break
    if i*j > n:
      break
    if n == i*j:
      if max(len(str(i)),len(str(j))) < min_len:
        min_len = max(len(str(i)),len(str(j)))
        break
        
print(min_len)

Submission status: Wrong Answer

Solution code:
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())
fac_list = factorization(n)

p = []
for i in range(len(fac_list)):
    for j in range(fac_list[i][1]):
        p.append(fac_list[i][0])

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

Submission status: Wrong Answer

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

    m = int(n ** 0.5)
    if n < 4:
        m += 1

    for i in reversed(range(1, m + 1)):
        if n % i == 0:
            b = n // i
            db = len(str(b))
            di = len(str(i))
            print(abs(db - di))
            break


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
def factorization(n): #素因数分解のプログラム([素因数,指数]のリストのリストで出力→24→[[2, 3], [3, 1]])
    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
            for _ in range(cnt):
                arr.append(i)

    if temp!=1:
        arr.append(temp)

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

    return arr
ls = factorization(n)
mn = float("inf")
for i in range(2**len(ls)):
    a = 1
    for j in range(len(ls)):
        if (i>>j)&1:
            a *= ls[j]
    if a <= n**(1/2):
        b = int(n/a)
        m = max(len(str(a)),len(str(b)))
        if m < mn:
            mn = m
    else:
        break
print(mn)

Submission status: Wrong Answer

Solution code:
def fact(A): #fact(int)
    c0 = A
    r = 2
    lis = []
    count = 1
    while A != 1:
        if A%r == 0:
            A = A//r
            lis.append(r)
            r = 2
        else:
            r += 1
        if r > int(pow(c0,0.5))+1:
            lis.append(A)
            break
    return(lis)

n = int(input())
L = fact(n)
L = L[::-1]
a = 1
b = 1
for q in L:
    if a <= b:
        a *= q
    else:
        b *= q
print(len(str(max(a,b))))

Submission status: Wrong Answer

Solution code:
N = int(input())
min = 10**10
for i in range(1, int(N/2+1)):
    if N % i == 0:
        b = N // i
        if i <= b and len(list(map(int, str(b)))) < min:
            min = len(list(map(int, str(b))))
        elif i > b:
            break

print(min)

Submission status: Wrong Answer

Solution code:
N = int(input())
min = 10**10
for i in range(1, int(N/2)+1):
    if N % i == 0:
        b = int(N/i)
        if i <= b and len(list(map(int, str(b)))) < min:
            min = len(list(map(int, str(b))))
        elif i > b:
            break
        
print(min)

Submission status: Wrong Answer

Solution code:
N = int(input())
min = 10**10
for i in range(1, int(N/2)):
    if N % i == 0:
        b = int(N/i)
        if i <= b and len(list(map(int, str(b)))) < min:
            min = len(list(map(int, str(b))))
        elif i > b:
            break
        
print(min)

Submission status: Wrong Answer

Solution code:
def primes(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  # supposing you want multiple factors repeated
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac

n = int(input())

a = b = 1

for p in primes(n)[::-1]:
    if a >= b:
        b *= p
    else:
        a *= p

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 1
b = n
for i in range(1, int(n ** 0.5) + 1):
    if n % i == 0:
        a = i
        b //= i

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

Submission status: Wrong Answer

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

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(math.sqrt(n))):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(len(str(c)))

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(len(str(c))-1)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(5)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(9)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(2)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(1)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(len(str(c))+1)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = max(a, b)
print(len(str(c)))

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

    if n != 1:
        table.append([n, 1])
        
    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
A = str(a)
B = str(b)
if len(A) < len(B):
    c = len(B)
else:
    c = len(A)
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

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

    if len(table) == 0:
        table.append([n, 1])
    return table

    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = str(max(a, b))
print(len(c))

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

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

    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        
a = int(a)
b = int(b)
c = str(max(a, b))
print(len(c))

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

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

    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        

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

Submission status: Wrong Answer

Solution code:
n = int(input())

def primefact(n):
    x = 0
    table = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            x += 1
            
        if x != 0:
            table.append([i, x])
        x = 0

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

    return table
"""
    if len(table) == 0:
        table.append([n, 1])
"""
    
bunkai = primefact(n)

a = 1
b = 1
bunkai = list(reversed(bunkai))

for i in range(len(bunkai)):
    while bunkai[i][1] != 0:
        if a < b:
            a *= bunkai[i][0]
        else:
            b *= bunkai[i][0]
        bunkai[i][1] -= 1
        

c = str(b)
print(len(c))

Submission status: Wrong Answer

Solution code:
def p(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())
A = p(N)
B = A[::2]
C = A[1::2]
def P(L):
  P = 1
  for c in range(len(L)):
    P = P*L[c]
  return P    
print(max(len(str(P(B))),len(str(P(C)))))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
 
def m(A,B):
  a = max(len(str(A)),len(str(B)))
  return a
n = math.floor(math.sqrt(N))

min_a = 1*10**10
for i in range(1,n+1):

  for j in reversed(range(n+1,N+1)):
    x=i*j
    if N == x:
      min_a = min(min_a,m(i,j))

        
print(min_a)

Submission status: Wrong Answer

Solution code:
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())
siv = factorization(n)
a, b = 1, 1

for i in range(len(siv))[::-1]:
	c, d = siv[i][0],siv[i][1]
	for i in range(d):
		if a < b:
			a *= c
		else:
			b *= c

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

Submission status: Wrong Answer

Solution code:
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())
siv = factorization(n)
a, b = 1, 1
judge = 0

for i in range(len(siv))[::-1]:
	c, d = siv[i][0],siv[i][1]
	for i in range(d):
		if a <= b:
			a *= c
		else:
			b *= c
		judge += 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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


primes = prime_factorize(N)
primes.sort()

a, b = 1, 1
for eix, p in enumerate(primes):
    if eix & 1:
        a *= p
    else:
        b *= p

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
k = int(math.sqrt(n))
for i in range(1,k+2):
  if n%i == 0:
    a = n//i
    break
s = len(str(a))
print(s)

Submission status: Wrong Answer

Solution code:
import math

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

n = int(input())
if is_prime(n):
  print(int(math.log(n,10))+1)
k = int(math.sqrt(n))
for i in range(k,n+1):
  if n%i == 0:
    a = i
    break
s = int(math.log(a,10))+1
print(s)