TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N = int(input())
ans = 10**10 
ans_ = 10**10

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)
            if len(str(N//i))<=ans:
                ans =N//i
                ans_=i
            
if N ==1:
    ans =1
            
print(min(len(str(ans)),len(str(ans_))))

N = int(input())
ans = 10**10 
ans_ = 10**10

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

N = int(input())

def get_divisor_list(N):
    divisor_list = []

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

    return divisor_list

divisor_list_max = [max(x) for x in get_divisor_list(N)]


print(len(str(divisor_list_max)))

import math

N = int(input())

def get_divisor_list(N):
    divisor_list = []

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

    return divisor_list

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



print(len(str(divisor_list_max_min)))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input().strip())

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

f = N
for i in range(1, N):
    if i * i >= N:
        break
    if N % i == 0:
        _f = F(i, N // i)
        f = min(f, _f)



N = int(input().strip())

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

f = N
for i in range(1, N):
    if i * i > N:
        break
    if N % i == 0:
        _f = F(i, N // i)
        f = min(f, _f)

print(f)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
def f(a, b):
    al = len(str(a))
    bl = len(str(b))
    if al > bl:
        return al
    return bl
N = int(input())
result = len(str(N))
for a in range(1, N):
    if (N % a) != 0:
        continue
    if a*a >= N:
        break
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)


def f(a, b):
    al = len(str(a))
    bl = len(str(b))
    if al > bl:
        return al
    return bl
N = int(input())
result = len(str(N))
for a in range(1, N+1):
    if (N % a) != 0:
        continue
    if a*a > N:
        break
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)

def f(a, b):
    al = len(str(a))
    bl = len(str(b))
    if al > bl:
        return al
    return bl
N = int(input())
result = len(str(N))
for a in range(1, N+1):
    if (N % a) != 0:
        continue
    if a*a >= N:
        break
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)

def f(a, b):
    al = len(str(a))
    bl = len(str(b))
    if al > bl:
        return al
    return bl
N = int(input())
n = int(N**0.5)
result = len(str(N))
for a in range(1, n+1):
    if N % a != 0:
        continue
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)


def f(a, b):
    al = len(str(a))
    bl = len(str(b))
    if al > bl:
        return al
    return bl
N = int(input())
n = int(N**0.5)
result = len(str(N))
for a in range(1, n):
    if N % a != 0:
        continue
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)


def f(a, b):
    al = len(str(a))
    bl = len(str(b))
    if al > bl:
        return al
    return bl
N = int(input())
result = len(str(N))
for a in range(1, N+1):
    if a*a > N:
        break
    if (N % a) != 0:
        continue
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)

def f(a, b):
    al = len(str(int(a)))
    bl = len(str(int(b)))
    if al > bl:
        return al
    return bl
N = int(input())
result = len(str(N))
for a in range(1, N):
    if a*a > N:
        break
    if (N % a) != 0:
        continue
    b = N / a
    r = f(a, b)
    if r < result:
        result = r
print (result)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
f = lambda x, y: len(str(max(x, y)))

if __name__ == '__main__':
    n = int(input())
    a = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            a.append((i, n // i))
            if i != n // i:
                a.append((n//i, n // (n // i)))
    k = [f(e[0], e[1]) for e in a]
    print(max(set(k)))


f = lambda x, y: len(str(max(x, y)))

if __name__ == '__main__':
    n = int(input())
    a = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            a.append((i, n // i))
            if i != n // i:
                a.append((n//i, n // (n // i)))
    k = [f(e[0], e[1]) for e in a]
    print(min(set(k)))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

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


for i in range(m+1)[::-1]:
    if n%(i)==0:
        print(int(math.log10(n) + 1))
        break


import math

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



if n % m == 0:
    print(int(math.log10(m) + 1))

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())

def f(a,b):
    return max(len(str(a)),len(str(b)))
m=10000
for a in range(1,10**10):
    if n%a==0:
        print(a)
        m=min(f(a,n//a),m)
    if n<a or n//a<a:
        break
print(m)

#n, *d = map(int, open(0).read().split())

n=int(input())

def f(a,b):
    return max(len(str(a)),len(str(b)))
m=10000
for a in range(1,10**10):
    if n%a==0:
        m=min(f(a,n//a),m)
    if n<a or n//a<a:
        break
print(m)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# coding: utf-8
import math

num_N = int(input())


def is_prime(num):
    if num < 2:
        return False
    if num == 2 or num == 3 or num == 5:
        return True
    if num % 2 == 0 or num % 3 == 0 or num % 5 == 0:
        return False

    
    prime = 7
    step = 4
    num_sqrt = math.sqrt(num)
    while prime <= num_sqrt:
        if num % prime == 0:
            return False
        prime += step
        step = 6 - step

    return True


if is_prime(num_N):
    print(len(list(str(num_N))))
else:
    for i in range(math.ceil(math.sqrt(num_N)), num_N):
        if num_N % i == 0:
            num_A = i
            num_B = num_N / num_A
            num_A_len = len(list(str(num_A)))
            num_B_len = len(list(str(num_B)))
            len_two_max = max(num_A_len, num_B_len)
            print(len_two_max)
            break


# coding: utf-8
import math

num_N = int(input())

min_num = 999999
sqrt_N = math.floor(math.sqrt(num_N))

for i in range(1, sqrt_N + 1):
    if num_N % i == 0:
        len_num_A = len(str(i))
        len_num_B = len(str(int(num_N / i)))
        min_num = min(min_num, max(len_num_A, len_num_B))

print(min_num)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
N = int(input())
ans = 10
for A in range(1, int(math.sqrt(N))):
  if N % A == 0:
    B = N//A
    F = max(len(str(A)), len(str(B)))
    ans = F if ans > F
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

if N == 1:
    print(1)
else:
    for a in reversed(range(1, (N//2)+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
print(ans)



N = int(input())
import math
if N == 1:
    print(1)
else:
    for a in reversed(range(1, (int(math.sqrt(N)))+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
    print(ans)



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
max_num = []
  
def yakusu(num):
    cd = []
    for i in range(1, int(num*0.5 + 1)):
        if num % i ==0:
            cd.append(i)
    return cd
  
for A in yakusu(N):
    for B in yakusu(N):
        if A * B == N:
            max_num.append(max(A, B))
            
print(len(str(max(max_num))))

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import math
n = int(input())

a = 1
b = 1




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

for i in range(1, tmp):
    if n % i == 0:
        a = i

b = int(n / a)

f = max(len(str(a)), len(str(b)))

print(f, a, b)



import math
n = int(input())

a = 1
b = 1




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

for i in range(1, tmp):
    if n % i == 0:
        a = i

b = int(n / a)

f = max(len(str(a)), len(str(b)))

print(f)



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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

l = len(div)
flist = []
for i in range(l):
    fx = max([len(str(div[i][0])), len(str(div[i][1]))])
    flist.append(fx)

print(min(flist))


N = int(input())

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

l = len(div)
flist = []
for i in range(l):
    fx = max([len(str(div[i][0])), len(str(div[i][1]))])
    flist.append(fx)

print(min(flist))


N = int(input())

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

l = len(div)
flist = []
for i in range(l):
    fx = max([len(str(div[i][0])), len(str(div[i][1]))])
    flist.append(fx)

print(min(flist))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

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

print(min_len)

n = int(input())

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


print(min_len)

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

    divisors.sort()
    return divisors

N = int(input())
answer = 0
len_div = len(make_divisors(N))






if len_div % 2 == 0:
    A_len = len(str(make_divisors(N)[len_div // 2 - 1]))
    B_len = len(str(make_divisors(N)[len_div // 2]))
    if A_len <= B_len:
        answer = B_len
    else:
        answer = A_len
else:
    answer = len(str(make_divisors(N)[len_div // 2]))
    print(make_divisors(N)[len_div // 2])
print(answer)



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

    divisors.sort()
    return divisors

N = int(input())
answer = 0
len_div = len(make_divisors(N))

if len_div % 2 == 0:
    A_len = len(str(make_divisors(N)[len_div // 2 - 1]))
    B_len = len(str(make_divisors(N)[len_div // 2]))
    if A_len <= B_len:
        answer = B_len
    else:
        answer = A_len
else:
    answer = len(str(make_divisors(N)[len_div // 2]))
print(answer)



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())



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

    
    return divisors


org = make_divisors(n)
div = sorted(org)

divNum = len(div)


if (divNum % 2 == 0):
    indA = int(divNum / 2) - 1
    indB = int(divNum / 2)
else:
    indA = int((divNum - 1) / 2)
    indB = indA

# print(div[indA])

A = len(str(div[indA]))
B = len(str(div[indB]))

ans = max(A, B)
print(ans)a


n = int(input())



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

    
    return divisors


org = make_divisors(n)
div = sorted(org)

divNum = len(div)


if (divNum % 2 == 0):
    indA = int(divNum / 2) - 1
    indB = int(divNum / 2)
else:
    indA = int((divNum - 1) / 2)
    indB = indA

# print(div[indA])

A = len(str(div[indA]))
B = len(str(div[indB]))

ans = max(A, B)
print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):

import math
N=int(input())

def func(A,B):
  if A > B:
    return len(str(A))
  else:
    return len(str(B))


ans=[]
N2=int(math.sqrt(N))
for A in range(1,N2+1):
  if N%A==0:
    B=N/A
    ans.append(func(A,B))

print(min(ans))


import math
N=int(input())

def func(A,B):
  if A > B:
    return len(str(A))
  else:
    return len(str(B))


ans=[]
N2=math.floor(math.sqrt(N))
for A in range(1,N2+1):
  if N%A==0:
    B=int(N/A)
    ans.append(func(A,B))

print(min(ans))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
li=[]

for i in range(1,10**5):
  if n%i==0:
    a=i
    b=n//a
    f=max(len(str(a)),len(str(b)))
    li.append(f)
print(li)

n=int(input())
li=[]

for i in range(1,10**5):
  if n%i==0:
    a=i
    b=n//a
    f=max(len(str(a)),len(str(b)))
    li.append(f)
print(min(li))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
def main():
    N = int(input())
    count = 0
    for i in range(1,int(math.sqrt(N))):
        if N%i==0:
            count+=1
    print(count)

if __name__ == '__main__':
    main()


#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C
# CreatedDate:  2020-06-26 16:16:00 +0900
# LastModified: 2020-06-26 19:11:55 +0900
#


import os
import sys
from math import sqrt
# import numpy as np



def F(a, b):
    if len(str(a)) > len(str(b)):
        print(len(str(a)))
    else:
        print(len(str(b)))


def main():
    n = int(input())
    for i in range(int(sqrt(n)+1), -1, -1):
        if n % i == 0:
            a = i
            b = n//i
#            print(a,b)
            F(a, b)
            break


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def f(a, b):
    return max(len(str(a)), len(str(b)))

n = int(input())

ans = 11
for a in range(1, int(n ** 0.5) + 1):
    b = n / a
    if f(a, b) < ans and n % a == 0:
        ans = f(a, b)

print(ans)

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

n = int(input())

ans = 11
for a in range(1, int(n ** 0.5) + 1):
    b = n // a 
    if n % a == 0 and f(a, b) < ans:
        ans = f(a, b)

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

N = int(input())

a = math.ceil(N ** (1/2))

for i in range(a):
  if int(N % (a-i)) == 0:
    a = len(list(str(int(a-i))))
    b = len(list(str(int(N % (a-i)))))
    
    break

print(min(a,b))

import math

N = int(input())

a = math.ceil(N ** (1/2))

for i in range(a):
  if int(N % (a-i)) == 0:
    aa = len(list(str(int(a-i))))
    bb = len(list(str(int(N // (a-i)))))
    break

print(max(aa,bb))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
color=[]
count,free=0,0

for i in range(n):
    c=a[i]//400
    if a[i]<3200 and c not in color:
        color.append(c)
        count+=1
    elif a[i]>=3200:
        free+=1
      
min,max=0,0
if count==0:
    max=free
    min=1
else:
    max=count+free
    min=count
    
print(min,max)

n=int(input())

for a in range(1,n**0.5+1):
    if n%a==0:
        b=n//a
        sa=str(a)
        sb=str(b)
        if a<=b:
             ans=len(sb)
        else:
            break

print(ans)

import math

n=int(input())
for i in range(1,int(math.sqrt(n))+1):
    ans=0
    if n%i==0:
        j=int(n/i)
        ans1=str(i)
        ans2=str(j)
        if len(ans1)>=len(ans2):
            break

if len(ans1)>=len(ans2):
    print(len(ans1))
else:
    print(len(ans2))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
import math

if __name__ == '__main__':
    N = int(input())
    val = len(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)



# -*- 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)


# -*- 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)


# -*- 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)))
            c = max(a, b)

            if c < val:
                val = c

    print(val)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# coding: utf-8
# Here your code !
import math;

n = int(input());
a = int(math.sqrt(n));
print("a,n = " , a, n);

while True:
    b = n // a;
    if n == a * b:
        print("a,b", a, b+1)
        print(int(math.log10(b))+1);
        break
    a = a-1;


# coding: utf-8
# Here your code !
import math;

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

while True:
    b = n // a;
    if n == a * b:
        print("a,b", a, b+1)
        print(int(math.log10(b))+1);
        break
    a = a-1;


import math;
 
n = int(input());
a = int(math.sqrt(n));
 
while True:
    b = n // a;
    if n == a * b:
        print(int(math.log10(b))+1);
        break
    a = a-1;

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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


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)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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

    
    return divisors

X = make_divisors(N)
ans = 10

for i in X:
    ans = min(ans, max(len(str(i[0])), len(str(i[1]))))

print(ans)

for i in X:
    ans = min(ans, max(len(str(i[0])), len(str(i[1]))))

print(ans)


N = int(input())

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

    
    return divisors

X = make_divisors(N)
ans = 10

for i in X:
    ans = min(ans, max(len(str(i[0])), len(str(i[1]))))

print(ans)



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

for i in range(N**0.5, 0, -1):
    div, mod = divmod(N)
    if not mod:
        print(len(str(min(div, N//div))))



DEBUG = True
N = int(input())

# if N == 1:
#     print(1)
#     exit()

divisors = []

tmp = N
for i in range(2, int(N**0.5)+1):
    while tmp % i == 0:
        tmp //= i
        divisors.append(i)
if tmp != 1:
    divisors.append(tmp)

if DEBUG:
    print(divisors)

A = 1
B = 1
while divisors:
    x = divisors.pop()
    if A > B:
        B *= x
    else:
        A *= x

if DEBUG:
    print("A: {}, B: {}".format(A, B))

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


N = int(input())

for i in range(int(N**0.5)+1, 0, -1):
    div, mod = divmod(N, i)
    if not mod:
        print(len(str(max(div, N//div))))
        exit()


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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

        return divisor_list

A = make_divisor_list(N)

B = []
ans = 0

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

print(ans)

N = int(input())

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

        return divisor_list

A = make_divisor_list(N)

B = []
ans = 0

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

print(ans)

N = int(input())

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

        return divisor_list

A = make_divisor_list(N)

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

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

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
N = int(input())
ans = 10

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

print(ans)

import math
N = int(input())
ans = 10

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

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
import math
input = sys.stdin.readline

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

A = 0
B = 0
for i in reversed(range(1, a + 1)):
  if not N % i:
    A = i
    B = N // A
    break

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

import sys
import math
input = sys.stdin.readline
 
N = int(input())
a = int(math.sqrt(N))
 
A = 0
B = 0
for i in reversed(range(1, a + 1)):
  if not N % i:
    A = i
    B = N // A
    break
 
print(max(len(str(A)), len(str(B))))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n, m = int(input()), 0
for i in range(1, n**.5 + 1):
  if n%i == 0:
    m = max(m, i)
print(len(str(n // m)))

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
for i in range(2,1+s):
  if n%i==0:
    while True:
      f.append(i)
      n=n//i
      if n%i!=0:
        break
itr=2**(len(f))-1
l=len(f)
for i in range(2**(len(f)-1)):
  itr+=1
  litr=str(bin(itr))[3:]
  a,b=1,1
  for j in range(l):
    if litr[j]=="0":
      a*=f[j]
    else:
      b*=f[j]
    t=max(len(str(a)),len(str(b)))
    if t<ans:
      ans=t
print(ans)
  

n=int(input())
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
for i in range(2,1+s):
  if n%i==0:
    while True:
      f.append(i)
      n=n//i
      if n%i!=0:
        break
itr=2**(len(f))-1
l=len(f)
for i in range(2**len(f)):
  itr+=1
  litr=str(bin(itr))[3:]
  a,b=1,1
  for j in range(l):
    if litr[j]=="0":
      a*=f[j]
    else:
      b*=f[j]
    t=max(len(str(a)),len(str(b)))
    if t<ans:
      ans=t
print(ans)
  

n=int(input())
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
for i in range(2,1+s):
  if n%i==0:
    while True:
      f.append(i)
      n=n//i
      if n%i!=0:
        break
itr=2**(len(f))-1
l=len(f)
for i in range(2**(len(f-1))):
  itr+=1
  litr=str(bin(itr))[3:]
  a,b=1,1
  for j in range(l):
    if litr[j]=="0":
      a*=f[j]
    else:
      b*=f[j]
    t=max(len(str(a)),len(str(b)))
    if t<ans:
      ans=t
print(ans)
  

n=int(input())
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
ans=len(str(n))
for i in range(2,s+1):
    if n%i==0:
        t=max(len(str(i)),len(str(n//i)))
        if t<ans:
            ans=t
print(ans)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
rootn = int(N**0.5) +1
A = range(1, rootn)
min_digits = 11
for i in A:
    if (N % A) == 0:
        B = N // A
        p, q =len(str(A)), len(str(B))
        if (p > q) and p < min_digits:
            min_digits = p
        elif (p <= q) and q < min_digits:
            min_digits = q
print(min_digits)

N = int(input())
rootn = int(N*0.5) +1
A = range(1, rootn)
min_digits = 11
for i in A:
    if (N % A) == 0:
        B = N // A
        p, q =len(str(A)), len(str(B))
        if (p > q) and p < min_digits:
            min_digits = p
        elif (p <= q) and q < min_digits:
            min_digits = q
print(min_digits)
            
      

N = int(input())
rootn = int(N**0.5) +1
A = range(1, rootn)
min_digits = 11
for i in A:
    if (N % i) == 0:
        B = N // i
        p, q =len(str(A)), len(str(B))
        if (p > q) and p < min_digits:
            min_digits = p
        elif (p <= q) and q < min_digits:
            min_digits = q
print(min_digits)

N = int(input())
rootn = int((N**0.5) +1)
A = range(1, rootn)
min_digits = 11
for i in A:
    if (N % i) == 0:
        B = N // i
        p, q =len(str(i)), len(str(B))
        if (p > q) and (p < min_digits):
            min_digits = p
        elif (p <= q) and (q < min_digits):
            min_digits = q
print(min_digits)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

    
    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)

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)

    
    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)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
for i in range(int(n**0.5),0,-1):
    if n%i == 0:
        a = max(i,n//i)
        print(int(math.log10(a))+1)
        break

import math
n = int(input())
for i in range(int(n**0.5),0,-1):
    if n%i == 0:
        a = max(i,n//i)
        print(int(math.log10(a))+1)
        break

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

ans1 = 0

A = '1'
B = str(N)

if len(A)>=len(B):
    ans = len(A)
else:
    ans = len(B)
    
for i in range(2,N+1):
    A = i
    if N%A==0:
        B = int(N / A)
        A = str(A)
        B = str(B)
        print(A, B)
        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
print(ans)


N = int(input())

ans1 = 0

A = '1'
B = str(N)

if len(A)>=len(B):
    ans = len(A)
else:
    ans = len(B)
    
for i in range(2,int(math.sqrt(N)+1):
    A = i
    if N%A==0:
        B = int(N / A)
        A = str(A)
        B = str(B)
        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
print(ans)


import math

N = int(input())

ans1 = 0

A = '1'
B = str(N)

if len(A)>=len(B):
    ans = len(A)
else:
    ans = len(B)
    
for i in range(2,int(math.sqrt(N)+1):
    A = i
    if N%A==0:
        B = int(N / A)
        A = str(A)
        B = str(B)
        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
print(ans)


import math

N = int(input())

ans1 = 0

A = '1'
B = str(N)

if len(A)>=len(B):
    ans = len(A)
else:
    ans = len(B)
    
for i in range(2,int(math.sqrt(N))+1):
    A = i
    if N%A==0:
        B = int(N / A)
        A = str(A)
        B = str(B)
        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
print(ans)


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

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

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


import math

N = int(input())

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x


import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
# A = [ int(input()) for _ in range(N) ]
##############################

N = int(input())

a = 1
ans = len(str(N))

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

print(ans)

Verdicts: Runtime Error

Accepted