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:
from sys import stdin
import math
def keta(n):
    if n < 10:
        return 1
    else:
        return 1 + keta(int(n/10))
def main():
    n = int(input())

    for i in range(1, int(math.sqrt(n)))[::-1]:
        if (n // i) * i == n:
            print(keta(n/i))
            return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int((n+1)/2)
ans=1
while True:
    a=int(a/10)
    if a==0:
        break
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
print(int(math.log10(math.sqrt(int(input())))))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


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


def main():
    N = int(input())
    a = prime_factorize(N)
    a.sort()
    a.reverse()
    A = B = 1
    for i in a:
        if A > B:
            B *= i
        else:
            A *= i

    print(max(len(str(A)), len(str(B))))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

def prime_factrize(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

num = pow(N, 0.5)

if num.is_integer():
    ans = len(str(int(num)))
else:
    ans = len(str(max(prime_factrize(N))))

print(ans)

Submission status: Wrong Answer

Solution code:
def F(a,b):
  m = max(a,b)
  count=1
  while m//10!=0:
    count+=1
    m//=10
  return count

N = int(input())
tmp=10**9
for i in range(1,N//2):
  if N%i==0:
    if tmp>F(i,N//i):
      tmp = F(i,N//i)
print(tmp)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))

def main():
  n = ni()

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

  def digitlen(n):
    return len(str(n))
  
  if n == 1:
    print(1)
    return 

  x = divi(n)
  x.sort()
  m = len(x) // 2
  if m == 1:
    m = 0
  print(max(digitlen(x[m]), digitlen(x[m+1])))

main()

Submission status: Wrong Answer

Solution code:
N = int(input())
answer=[]

def trial_division(N):
    while N % 2 == 0:
        answer.append(2)
        N //= 2
    
    f=3
    while f*f <= N:
        if  N%f == 0:
            answer.append(f)
            N //= f
        else:
            f += 2
        
    if N != 1:
        answer.append(N)

trial_division(N)
x=1
while (answer):
    x *= answer[-1]
    if (N/x - x >= 0):
        answer.pop()
    else:
        x //=  answer.pop()
print(len(str(N//x)))

Submission status: Wrong Answer

Solution code:
N = int(input())
answer=[]

def trial_division(N):
    while N % 2 == 0:
        answer.append(2)
        N //= 2
    
    f=3
    while f*f <= N:
        if  N%f == 0:
            answer.append(f)
            N //= f
        else:
            f += 2
        
    if N != 1:
        answer.append(N)

trial_division(N)
x=1
while (answer):
    x *= answer[-1]
    if (N/x - x >= 0):
        answer.pop()
    else:
        x //=  answer.pop()
print(len(str(x)))

Submission status: Wrong Answer

Solution code:
def f(a:int, b:int) -> int:
    return max(len(str(a)), len(str(b)))

_n=int(input())
n=_n
primes = []
while n % 2 == 0:
    primes.append(2)
    n //= 2
d = 3
while d * d <= n:
    if n % d == 0:
        primes.append(d)
        n //= d
    else:
        d += 2
if n != 1:
    primes.append(n)

if len(primes) == 0:
    print(1)
    quit()

a=1
ans=f(a, _n/a)
for _p in primes:
    a*=_p
    dig=f(a, int(_n/a))
    if ans >= dig:
        ans=dig

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

i = 1
temp = 1
while temp ** 2 <= N:
    if N % temp == 0:
        i = N // temp
        temp += 1
    else:
        temp += 1

print(min(len(str(i)), len(str(N // i))))

Submission status: Wrong Answer

Solution code:
def prime_factorization(N):
    tmp = N
    ans = []
    for i in range(2, int(N ** 0.5) + 1):
        count = 0
        while tmp % i == 0:
            tmp //= i
            count += 1
        if count != 0:
            ans.append([i, count])
    if tmp != 1:
        ans.append([tmp, 1])
    if ans == []:
        ans.append([N, 1])
    return ans

def get_keta(N):
    ans = 1
    while True:
        if N // 10 != 0:
            ans += 1
            N //= 10
        if N // 10 == 0:
            break
    return ans

N = int(input())
prime_list = prime_factorization(N)
# print(prime_list)
a = 1
b = 1
flag = "a"
for i in range(len(prime_list) - 1, -1, -1):
    while prime_list[i][1] != 0:
        if flag == "a":
            a *= prime_list[i][0]
            prime_list[i][1] -= 1
            if a >= b:
                flag = "b"
        else:
            b *= prime_list[i][0]
            prime_list[i][1] -= 1
            if b >= a:
                flag = "a"
# print(a)
# print(b)
# print(get_keta(a))
# print(get_keta(b))
print(max(get_keta(a), get_keta(b)))

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
if n == 1:
  print(1)
  sys.exit()
else:
  PFs = []
  PNs = []
  for div in range(2, int(n**(0.5) + 1)):
    for pn in PNs:
      if div % pn == 0:
        break
    else:
      PNs.append(div)
      while n % div == 0:
        n /= div
        PFs.append(div)
if len(PFs) == 0:
  PFs = [n]
#print(PFs)
  
Pats = [[]]
for i in range(len(PFs)):
  temp = []
  for pat in Pats:
    temp.append(pat + [0])
    temp.append(pat + [1])
  Pats = temp
  
min_max = 1000000000000000
for pat in Pats:
  a = 1
  b = 1
  for i, num in enumerate(pat):
    if num == 0:
      a *= PFs[i]
    else:
      b *= PFs[i]
#  print(a, b, pat)
  fx = max(len(str(a)), len(str(b)))
  min_max = min(min_max, fx)
print(min_max)

Submission status: Wrong Answer

Solution code:
# C - Digits in Multiplication
N = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
# C - Digits in Multiplication
N = int(input())

A = int(N**0.5)
ans = 0

for i in range(A,N):
    if N % i == 0:
        ans = len(str(i))
        break
    else:
        ans = len(str(i))

print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
def isPrime(n):
  if n < 2:
    return False
  i = 2
  while i*i <= n:
    if n%i == 0:
      return False
    i += 1
  return True
if isPrime(N):
  print(len(str(N)))
else:
  ans = float("inf")
  i = 1
  while i < math.sqrt(N):
    if N % i == 0:
      if i >= N // i:
        ans = min(ans,len(str(i)))
      else:
        ans = min(ans,len(str(N // i)))
    i += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
na = lambda : map(int, stdin.readline().split())
ni = lambda : int(ns())
def main():
  n = ni()
  if n == 1:
    print(1)
    return
  nagasa = lambda x: len(str(x))
  def f(a, b):
    x = nagasa(a)
    y = nagasa(b)
    return x if x > y else y

  def divi(n):
    res = []
    for i in range(1, int(n**0.5)+1):
      if n % i == 0:
        res.append(i)
        if i != n // i:
          res.append(n // i)
    return res
  x = divi(n)
  print(f(x[-1], x[-2]))

main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

from math import sqrt, ceil


def func(x):
    li = [(1, x)]
    for i in range(2, ceil(sqrt(x))):
        if x % i == 0:
            li.append((i, x // i))
    return li


n = int(input())

cands = func(n)

ans = float("inf")
for cand in cands:
    f = max(len(str(cand[0])), len(str(cand[1])))
    ans = min(ans, f)

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

from math import sqrt, ceil


def func(x):
    li = []
    for i in range(1, ceil(sqrt(x))):
        if x % i == 0:
            li.append((i, x // i))
    return li


n = int(input())

cands = func(n)

ans = float("inf")
for cand in cands:
    f = max(len(str(cand[0])), len(str(cand[1])))
    ans = min(ans, f)

print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())

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

    # divisors.sort()
    return divisors

fact = make_divisors(N)

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())

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

fact = prime_factorize(N)

a = 1
b = 1
for i in fact:
    if a < b:
        a = a * i
    else:
        b = b * i
print(max(len(str(a)),len(str(b))))

Submission status: Wrong Answer

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())

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

fact = prime_factorize(N)

a = 1
b = 1
for i in fact[::-1]:
    if a >= b:
        b = b * i
    else:
        a = a * i
print(max(len(str(a)),len(str(b))))

Submission status: Wrong Answer

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())

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

fact = prime_factorize(N)

a = 1
b = 1
for i in fact[::-1]:
    if len(str(a)) > len(str(b)):
        b = b * i
    else:
        a = a * i
print(max(len(str(a)),len(str(b))))

Submission status: Wrong Answer

Solution code:
def main():

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a,b,c = 0,0,float("Inf")
for i in range(1,int(n**0.5)):
    if n % i == 0:
        a = max(i,n//i)
        b = 0
        while not a == 0:
            a //= 10
            b += 1
        c = min(c,b)
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(2,int(n**.5)+1):
	if n%i==0:
		print(len(str(n//i)))
		exit()
print(len(str(n)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

import math


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

def solve(N: int):
    from functools import reduce
    from operator import mul

    a = prime_factorize(N)
    a.sort(reverse=True)
    if(len(a)==1):
        print(len(str(a[0])))
        exit()

    x = 1
    y = 1
    for v in a:
        if(x>y):
            y *= v
        else:
            x *= v
    print(max(len(str(x)), len(str(y))))
    


    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<10:
  print(1)
  exit()
a=10
for i in range(1,int(n**0.5)):
  if n%i==0:
    a=min(a,max(len(str(i)),len(str(n//i))))
print(a)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=11
for i in range(1,int(n**0.5)):
  if n%i==0:
    a=min(a,max(len(str(i)),len(str(n//i))))
print(a)

Submission status: Wrong Answer

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

N = int(input())
ans = float('inf')
for a in range(1,N):
  if N % a != 0: continue
  ans = min(ans,F(a,int(N/a)))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = n
for i in range(int(n**(1/2))):
  if i * (n-i) == n:
    ans = min(ans, i, n-i)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import sqrt
from math import ceil
n = int(input())
result = len(str(n))
for a in range(1, ceil(sqrt(n))):
    if n % a == 0:
        b = n // a
        result = min(result, max(len(str(a)), len(str(b))))
print(result)

Submission status: Wrong Answer

Solution code:
from math import sqrt
from math import floor
n = int(input())
result = len(str(n))
for a in range(1, floor(sqrt(n))):
    if n % a != 0:
        continue
    b = n // a
    f = max(len(str(a)), len(str(b)))
    if result > f:
        result = f
print(result)

Submission status: Wrong Answer

Solution code:
from math import sqrt
from math import ceil
n = int(input())
result = len(str(n))
for a in range(1, ceil(sqrt(n))):
    if n % a != 0:
        continue
    b = n // a
    f = max(len(str(a)), len(str(b)))
    if result > f:
        result = f
print(result)

Submission status: Wrong Answer

Solution code:
import math

if __name__ == '__main__':
    N = int(input())
    root_N_int = math.floor(math.sqrt(N))
    for A in range(root_N_int, 0, -1):
        if N % A == 0:
            B = int(N / A)
            print(B)
            break
    digit = len(str(B))
    print(digit)

Submission status: Wrong Answer

Solution code:
from math import*
N=int(input())
i=int(sqrt(N)//1)
l=[]
for a in range(i+1):
	for b in range(i+1):
		if a*b==N:(max((len(str(a))),(len(str(b)))))
if l==[]:
	print(len(str(N)))
else:
	print(min(l))

Submission status: Wrong Answer

Solution code:
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:
        ans = min(len(str(li[len(li)//2 + 1])), ans)
print(ans)

Submission status: Wrong Answer

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

li = make_divisors(ni())
ans = 10000000000000000
for i in range(len(li) // 2):
    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:
        ans = min(len(str(li[len(li)//2 + 1])), ans)
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

box = []

for A in range(1, math.floor(math.sqrt(N))):
     if N % A == 0:
        B = N // A
        box.append(max(math.floor(math.log10(A)+1),math.floor(math.log10(B)+1)))
    
   

print(min(box)) if N != 1 else print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ret = []
while True:
  t = 2
  while t < N:
    if N % t == 0:
      ret.append(t)
      N //= t
      break
    else:
      t += 1
  else:
    ret.append(t)
    break

a, b = 1, 1
for r in reversed(ret):
  if a < b:
    a *= r
  else:
    b *= r

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ab = []
ans = []
for i in range(1, int(n**(0.5))):
	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))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
fmax = 0
for i in range(1,n//2+1):
  a = i
  b = n // i
  if b != n/i :
    continue
  
  alen = len(str(a))
  blen = len(str(b))
  f = max(alen, blen)
  fmax = max(fmax,f)
print(fmax)

Submission status: Wrong Answer

Solution code:
import numpy as np
def factorize(N):
    up = int(np.sqrt(N))+2
    out = {}

    for i in range(2,up):
        if N%i == 0:
            temp = N
            count = 0
            while(True):
                N = N//i
                count += 1
                if N%i != 0:
                    break
            out[i] = count
        else:
            continue
    if N != 1:
        out[N] = 1
    return out

print(factorize(int(input())))

Submission status: Wrong Answer

Solution code:
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
    else:
        B = 0
    ans = min(ans, max(len(str(i)), len(str(B))))
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt

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

Submission status: Wrong Answer

Solution code:
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))])
    print(i, len(str(i)),  n//i, len(str(n//i)))
    if(res > tmp):
      res = tmp
print(res)

Submission status: Wrong Answer

Solution code:


import math
n=int(input())

prime=[]
prime.append(2)
a=math.floor(math.log10(n))+1
for i in range(1,math.ceil(math.sqrt(n))):
  if n%i==0:
#    print (i)
    a=min(max(math.floor(math.log10(i))+1,math.floor(math.log10(n/i))+1),a)
    
print (a)

Submission status: Wrong Answer

Solution code:


import math
n=int(input())

prime=[]
prime.append(2)
a=math.floor(math.log10(n))+1
for i in range(2,math.ceil(math.sqrt(n))):
  if n%i==0:
#    print (i)
    a=min(max(math.floor(math.log10(i))+1,math.floor(math.log10(n/i))+1),a)
    
print (a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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)))
            print(a, b)
            c = max(a, b)

            if c < val:
                val = c

    print(val)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math

if __name__ == '__main__':
    N = int(input())
    val = 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)))
            print(a, b)
            c = max(a, b)

            if c < val:
                val = c

    print(val)

Submission status: Wrong Answer

Solution code:
import math
def keta(n):
    return len(str(n))

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)))
    else:
        continue
print(r)

Submission status: Wrong Answer

Solution code:

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, math.ceil(math.sqrt(n))):
    b = n / a
    if n % a == 0:
        r = min(r, max(keta(a), keta(b)))
    else:
        continue
print(r)

Submission status: Wrong Answer

Solution code:

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))):
    b = n / a
    if n % a == 0:
        r = min(r, max(keta(a), keta(b)))
    else:
        continue
print(r)

Submission status: Wrong Answer

Solution code:

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))):
    b = n / a
    if n % a == 0:
        print(b)
        r = min(r, max(keta(a), keta(b)))
    else:
        continue
print(r)

Submission status: Wrong Answer

Solution code:
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))):
    b = n / a
    if n % a == 0:
        print(b)
        r = min(r, max(keta(a), keta(b)))
    else:
        continue
print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

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

min_x = len(list(str(N)))

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

min_x = len(list(str(N)))

for i in range(1, N // 2 + 1):
  if N % i == 0:
    min_x = min(min_x, f(str(i), str(N // i)))
  if len(str(i)) >= len(str(N // i)):
    break
print(min_x)

Submission status: Wrong Answer

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

min_f = float('inf')

for i in range(1, m):
  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)

Submission status: Wrong Answer

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

min_f = float('inf')

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

import collections
import itertools
import sys

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

def get_divisor(n):
    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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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):
    if N % i == 0:
        ans = min(ans, f(i, N // i))
print(ans)

Submission status: Wrong Answer

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


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


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

Submission status: Wrong Answer

Solution code:
n = int(input())
half = min(n//10**(len(str(n))//2),n%10**(len(str(n))//2))

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

Submission status: Wrong Answer

Solution code:
n = int(input())
half = min(n//10**(len(str(n))//2),n%10**(len(str(n))//2))

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

Submission status: Wrong Answer

Solution code:
n = int(input())
half = max(n//10**(len(str(n))//2),n%10**(len(str(n))//2))

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

Submission status: Wrong Answer

Solution code:
n = int(input())
half = n//10**(len(str(n))//2)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

def get_prime_number_list(num):
    pn = 2
    pnlist = []
    while pn * pn <= num:
        while num % pn == 0:
            pnlist.append(pn)
            num = num // pn
        pn += 1

    if num > 1:
        pnlist.append(num)

    return pnlist

pns = get_prime_number_list(n)

a = 1
b = 1
for i in reversed(range(len(pns))):
    if a > b:
        b *= pns[i]
    else:
        a *= pns[i] 

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

Submission status: Wrong Answer

Solution code:
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):
  if n % i == 0:
    t = n // i
    ans = min(ans, f(i, t))

print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt, ceil

def check(n):
    minf = len(str(n))
    square = ceil(sqrt(n)) # 10^5
    print(square)
    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

#print(check(10**10))
N = int(input())
print(check(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
last = N
for num in range(1, N):
  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

Submission status: Wrong Answer

Solution code:
#### import ####
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))):
  if N%i==0:
    ans = len(str(N//i))

print(ans)

Submission status: Wrong Answer

Solution code:
#### import ####
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 = 10
for i in range(1,int(math.sqrt(N))):
  if N%i==0:
    ans = len(str(N//i))

print(ans)

Submission status: Wrong Answer

Solution code:
import math
from sys import exit, stdin
N = int(stdin.readline().rstrip())
N = int(math.sqrt(N))

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