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):
import math
n=int(input())
k=int(math.sqrt(n))
l=[]
for i in range(1,k+2):
    n%i==0:l.append(max(len(str(i),len(str(n//i))))
print(min(l))

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

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

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):
from math import sqrt

def F(t):
    return max(len(str(t[0])), len(str(t[1])))

N = long(input())
m = list(map(F,[(r,int(N / r)) for r in range(2, int(sqrt(N))) if N % r == 0]))
print(min(m)) if len(m) != 0 else print(len(str(N)))

N = int(input())
m = list(map(lambda t:max(len(str(t[0])), len(str(t[1]))),[(r,int(N / r)) for r in range(2, int(N ** 0.5) + 2) if N % r == 0]))
print(min(m) if len(m) != 0 else len(str(N)))

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())
res = 0
for i in int(sqrt(n) + 1):
  if(n % i == 0):
    tmp = max([len(i), len(n*i)])
    if(res > tmp):
      res = tmp
print(res)

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)

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

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):
import math

N = int(input())

def solve(N,A):
	if(N % A == 0):
		B = N / A
		return int(math.log10(max(A,B)) + 1)
	else:
		return -1
		

ans = []
for A in range(1,N):
	ans.append(solve(N,A))
print(max(ans))

import math

N = int(input())

def enum(N,A):
    if(N % A == 0):
        B = N // A
        return (A,B)
    else:
        return 'NULL'

def F(tupleX):
    t = max(tupleX)
    return int(math.log10(t) + 1)

X = []
hu = int(math.sqrt(N)) + 1
for n in range(1,hu):
    X.append(enum(N,n))

Y = []
for x in X:
    if (x == 'NULL'):
        continue
    else:
        y = F(x)
        Y.append(y)

print(min(Y))

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())
s = 0
for i in range(1, n//2 + 1):
  if n % i == 0:
    s.append(max(len(str(i)), len(str(n//i))))
print(min(s))

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

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

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):
import math
n = int(input())

def is_prime(n):
    for i in range(2, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            return False
    return n != 1

def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table

sq = math.sqrt(n)
if sq.is_integer():
    ansInt = sq

if is_prime(n):
    ansInt = n
else:
    ansInt = prime_decomposition(n)
print(len(str(int(max(ansInt)))))

n = int(input())
ans = len(str(n))
a = 0
while a**2 <= n:
    a += 1
    if n % a != 0:
        continue
    b = n // a
    cur = max(len(str(a)), len(str(b)))
    if ans > cur:
        ans = cur
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())
a=int((n+1)/2)
ans=1
while True:
    a=int(a/10)
    if a==0:
        break
    ans+=1
print(ans)

import math
n=int(input())
ans=100
for i in range(1, int(math.sqrt(n))+1):
    if n%i != 0:
        continue
    b=n/i
    dig=1
    while True:
        b=int(b/10)
        if b==0:
            break
        dig+=1
    if ans>dig:
        ans=dig
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())
min_f = 10
for n in range(1, int(math.sqrt(N))):
    a = n
    if N % n != 0:
        continue
    b = N / n
    f = max(len(str(a)), len(str(b)))
    min_f = min(min_f, f)
print(min_f)

import math

N = int(input())
min_f = 10
for n in range(1, math.sqrt(N)):
    a = n
    if N % n != 0:
        continue
    b = N / n
    f = max(len(str(a)), len(str(b)))
    min_f = min(min_f, f)
print(min_f)

import math

N = int(input())
min_f = 10
for n in range(1, int(math.sqrt(N)) + 1):
    a = n
    if N % n != 0:
        continue
    b = int(N / n)
    f = max(len(str(a)), len(str(b)))
    min_f = min(min_f, f)
print(min_f)

Verdicts: 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):
import math

N = int(input())
A = []
B = []
F = []
for i in range(1,N/2):
    if (N%i)== 0:
        A.append(N/i)
        B.append(i)
for i in range(len(A)):
    count_A = int(math.log10(A[i])+1)
    count_B = int(math.log10(B[i])+1)
    if count_A >= count_B:
        F.append(count_A)
    else:
        F.append(count_B)
print(min(F))


import math

N = int(input())
A = []
B = []
F = []

for i in range(1,int(math.sqrt(N))+1,1):
    if (N%i)== 0:
        A.append(N/i)
        B.append(i)
for i in range(len(A)):
    count_A = int(math.log10(A[i])+1)
    count_B = int(math.log10(B[i])+1)
    if count_A >= count_B:
        F.append(count_A)
    else:
        F.append(count_B)
print(min(F))


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())
ans = len(str(n))
l = [ i for i in range(1,n+1) if i*i < n]
for a in l:
    if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))
        ans = max(len(str(a)),len(str(int(n / a))))
print(ans)

import math
n=int(input())
ans = len(str(n))
for a in range(1,int(math.sqrt(n)+1)):
    if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))
        ans = max(len(str(a)),len(str(int(n / a))))
print(ans)

import math
n=int(input())
ans = len(str(n))
# print(int(math.sqrt(n)))
for a in range(1,int(math.sqrt(n)+1)):
    # print(a,n/a,n % a)
    if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))
        ans = max(len(str(a)),len(str(int(n / a))))
print(ans)

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


Verdicts: Runtime Error

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):
def getdigit(N):
  cnt = 0
  while(N>0):
    cnt++
    N //= 10
  return cnt

N = int(input())
for i in reversed(range(1,sqrt(N)+1)):
  if(N % i == 0):
    print(max(getdigit(i), getdigit(N/i)))
    exit()
          
  


def getdigit(N):
  cnt = 0
  while(N>0):
    cnt += 1
    N //= 10
  return cnt

N = int(input())
for i in reversed(range(1,int(pow(N, 1/2))+1)):
  if(N % i == 0):
    print(max(getdigit(i), getdigit(N/i)))
    exit()

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

def trial_division(n):
    
    factor = []
    
    tmp = int(n ** 0.5) + 1
    for num in range(2, tmp):
        while n % num == 0:
            n //= num
            factor.append(num)

    if n > 1:
        factor.append(n)

    return factor

N = int(input())
a = trial_division(N)
if len(a) == 1:
    a.append(1)
a.sort()
l = len(a)
b = []
c = []
seki1 = 1
seki2 = 1
for i in range(l):
    seki1 *= a[i]
    seki2 *= a[l-1-i]
    b.append(seki1)
    c.append(seki2)

ans = 10 ** 9
for i in range(l-1):
    F = max(b[i], c[l-2-i])
    ans = min(ans, len(str(F)))

print(a)
print(b)
print(c)
print(ans)



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

N = int(input())
a = make_divisor(N)

ans = 100
for i in range(len(a)):
    F = max(len(str(a[i])), len(str(N // a[i])))
    ans = min(ans, F)

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())
f=[]
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        f.append(i)
        f.append(int(n/i))
print(f)
if n==1:
    print('1')
else:
    print(len(str(f[-1])))


n=int(input())
f=[]
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        f.append(i)
        f.append(int(n/i))
if n==1:
    print('1')
else:
    print(len(str(f[-1])))

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 = input()


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

minimumList = []
for a in range(1, int(N)+1):
    if int(N) % a == 0:
        b = int(N) / a
        minimumList.append(F(int(a), b))
print(min(minimumList))

N = int(input())


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

minimumList = []
for a in range(1, int(N**0.5) + 1):
    if N % a == 0:
        b = N // a  
        minimumList.append(F(a, b))
print(min(minimumList))

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 = input()
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(len(str(a))+len(str(b)))

import math

N = 25
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(max(len(str(a)),len(str(b))))

import math

N = int(input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(len(str(a))+len(str(b)))


N = map(int,input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(len(str(a))+len(str(b)))

import math

N = int(input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
    if i > 0 :
       if N%i == 0:
           S.append(i)
a =  S[-1]
b = N//a
print(max(len(str(a)),len(str(b))))

Verdicts: Runtime Error

Wrong Answer

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())

i = 1
a = n
b = i

while i <= min(n,10**5) and a < b:
	if n % i == 0:
		a = i
		b = n // i
	i += 1
print(len(str(b)))

import math
n = int(input())
a = 1
b = n

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

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 = 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)

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

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):
from math import log10

N = int(input())

ans = int(log10(N)) + 1

for i in range(2, int(N ** 0.5) + 1):
    if N % i == 0:
        tmp = int(log10(N // i)) + 1
        if tmp < ans:
            ans = tmp
            print(tmp)

print(ans)

from math import log10

N = int(input())

ans = int(log10(N)) + 1

for i in range(2, int(N ** 0.5) + 1):
    if N % i == 0:
        tmp = int(log10(N // i)) + 1
        if tmp < ans:
            ans = 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())
m=0
for i in range(1,int((n)**(1/2))+1):
  if n%i==0:
    num1=i
    num2=n//i
    l1=len(str(num1))
    l2=len(str(num2))
    if m>max(l1,l2):
      m=max(l1,l2)
print(m)

n=int(input())
m=100000000000
for i in range(1,int((n)**(1/2))+1):
  if n%i==0:
    num1=i
    num2=n//i
    l1=len(str(num1))
    l2=len(str(num2))
    m1=max(l1,l2)
    if m>m1:
      m=m1
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):
n = int(input())
ans = []
a = 0
for i in range(n+1):
    for j in range(n+1):
        if n == int(i)*int(j):
            a == i*j
            ans.append(a)
print(ans)
print(min(ans))

import math
N = int(input())
n = math.ceil(math.sqrt(N))
A = 1
B = N
for i in range(n+1):
  A = n-i
  if N%A==0:
    B = N//A
    break

print(len(str(B)))

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

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)

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)


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)

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

Verdicts: 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):
N = int(input())

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

import math
N = int(input())

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

N = int(input())

def f(a,b):
    if len(str(a)) < len(str(b)):
        return len(str(b))
    else:
        return len(str(a))

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

N = int(input())

def f(a,b):
    if len(str(a)) < len(str(b)):
        return len(str(b))
    else:
        return len(str(a))

ans = 100000000000
for i in range(1,N**(1/2)):
    if N % i == 0:
        ans = min(ans,f(i,N//i))
print(ans)

import math

N = int(input())

def f(a,b):
    if len(str(a)) < len(str(b)):
        return len(str(b))
    else:
        return len(str(a))

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

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):
import math
N = int(input())
m = int(math.sqrt(N)+1)
print(m)
for i in range(m):
  if N % (m-i) == 0:
    j = int(N/(m-i))
    num = len(str(j))
    break
print(num)

import math
N = int(input())
m = int(math.sqrt(N)+1)
print(m)
for i in range(m):
  if N % (m-i) == 0:
    j = int(N/(m-i))
    num = len(str(j))
    break
print(num)


import math
N = int(input())
m = int(math.sqrt(N)+1)
for i in range(m):
  if N % (m-i) == 0:
    j = int(N/(m-i))
    num = len(str(j))
    break
print(num)


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


def factorization(n):
    R = int(n)
    s = 0
    L = []
    div = 2
    while s == 0:
        for i in range(div, R + 1):
            if n % i == 0:
                n = n / i
                div = i
                if n == 1:
                    s = 1
                L.append(i)
                break
    return L


n = int(input())
if n == 1:
    print(1)
    exit()
divs = factorization(n)
N = [i for i in divs]  
maxDigit = n

print(N)
for i in range(1, 1 << len(N)):
    # output = []
    # nonout = []
    outNum = 1
    nonOutNum = 1
    for j in range(len(N)):
        if ((i >> j) & 1) == 1:
            
            outNum *= N[j]
        # else:
            # nonout.append(N[j])
            
    # print("{} vs {}".format(outNum, nonOutNum))
    nonOutNum = int(n/outNum)
    digitOut = 0
    digitNonOut = 0
    while outNum > 0:
        digitOut += 1
        outNum = int(outNum / 10)
    while nonOutNum > 0:
        digitNonOut += 1
        nonOutNum = int(nonOutNum / 10)
    if max(digitOut, digitNonOut) < maxDigit:
        maxDigit = max(digitOut, digitNonOut)
print(maxDigit)




def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def divisorize(fct):
    b, e = fct.pop()  
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base ** exponent
    return a

n = int(input())
if n == 1:
    print(1)
    exit()
fct = factorize(n)
maxDigit = n
for div in divisorize(fct):
    outNum = num(div)
    nonOutNum = int(n/outNum)
    digitOut = 0
    digitNonOut = 0
    while outNum > 0:
        digitOut += 1
        outNum = int(outNum / 10)
    while nonOutNum > 0:
        digitNonOut += 1
        nonOutNum = int(nonOutNum / 10)
    if max(digitOut, digitNonOut) < maxDigit:
        maxDigit = max(digitOut, digitNonOut)
print(maxDigit)


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):
from math import sqrt
from math import log10
n=int(input())

i=1
ans=13
j=0

while i<=sqrt(n):
    if n%i==0:
        j=n//i
        ans=int(min(ans,max(log10(i)+1,log10(j)+1)))
        print(i,j)
    i+=1
if j==0:
    ans=int(max(log10(i)+1,log10(j)+1))
print(ans)
    



from math import sqrt
from math import log10
n=int(input())

i=1
ans=13
j=0

while i<=sqrt(n):
    if n%i==0:
        j=n//i
        ans=int(min(ans,max(log10(i)+1,log10(j)+1)))
    i+=1
if j==0:
    ans=int(max(log10(i)+1,log10(j)+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):
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)


from math import sqrt

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


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):
    str_a = str(a)
    len_a = len(str_a)
    str_b = str(b)
    len_b = len(str_b)

    return len_a if len_a > len_b else len_b

N = int(input())

min = 10**10
for i in range(1, N//2 + 1):
    a = i
    if N % a == 0:
        b = int(N / a)
    else:
        continue

    if len(str(a)) > len(str(N)) // 2 + 1:
        break

    ret = f(a, b)
    if min > ret:
        print(a, b, min, ret)
        min = ret

print(min)


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

    return len_a if len_a > len_b else len_b

N = int(input())

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

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

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

print(min)


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 prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n //= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

N = int(input())
if N = 1:
    print(1)
else:
    table = prime_decomposition(N)
    digN = len(str(N))
    digMaxEle = len(str(table[-1]))
    if digN / 2  < digMaxEle:
        print(digMaxEle)
    else:
        print(digN//2 + digN%2)


N = int(input())

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

ans = count_digit(N)

A = 1
while (A * A <= N):
    if N%A != 0: pass
    else:
        B = N//A
        curDig = max(count_digit(A), count_digit(B))
    ans = min(ans, curDig)
    A += 1
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())

min_l = len(str(N))

if type(math.sqrt(N)) is int:
    for i in range(1, int(math.sqrt(N))):
        if N % i == 0:
            j = int(N / i)
            min_l = min(min_l, max(len(str(i)), len(str(j))))
    print(min_l)
else:
    print(min_l)


import math

N = int(input())

min_l = len(str(N))

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


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())
nn = int(math.sqrt(n))
for i in range(nn,n+1):
    if n%i==0:
        print(len(str(i)))
        break
print(0)


import math
n = int(input())
nn = int(math.sqrt(n))
for i in range(nn,0,-1):
    if n%i==0:
        print(len(str(n//i)))
        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())
ans = n
for i in range(int(n**(1/2))):
  if i * (n-i) == n:
    ans = min(ans, i, n-i)
print(ans)

n = int(input())
ans = len(str(n))
for i in range(1, int(n**(1/2))+1):
  if n%i == 0:
    ans = min(ans, max(len(str(i)), len(str(n//i))))
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())

divList = []

n = N

while n != 1:
    if n % 2 == 0:
        n = n // 2
        divList.append(2)
        continue
    if n % 3 == 0:
        n = n // 3
        divList.append(3)
        continue

    newN = n
    isFind = False
    for i in range(6, (n**(1/2)) + 1, 6):
        if n % (i - 1) == 0:
            divList.append(i - 1)
            newN = newN // (i - 1)
            isFind = True
        if n % (i + 1) == 0:
            divList.append(i + 1)
            newN = newN // (i + 1)
            isFind = True

        if isFind == True:
            break

    if isFind == False:
        divList.append(n)
        newN = 1
    n = newN

    # print(divList)

# print(divList)

t = [([1], [1])]

for d in divList:
    newT = []
    for ab in t:
        a, b = ab[0], ab[1]
        a_add = a[:]
        a_add.append(d)
        b_add = b[:]
        b_add.append(d)

        newT.append((a, b_add))
        newT.append((a_add, b))
    t = newT

# print(t)

from functools import reduce

a1 = [(reduce(lambda a, b:a * b, ab[0]), reduce(lambda a, b:a * b, ab[1]))
      for ab in t]
# print(a1)


a2 = set([(len(str(ab[0])), len(str(ab[1]))) for ab in a1])

# print(a2)

a3 = [max(ab[0], ab[1]) for ab in a2]

# print(a3)

print(min(a3))


N = int(input())


def countDigits(n):
    return len(str(n))


ans = countDigits(N)
A = 1
while A * A <= N:
    if(N % A != 0):
        A += 1
        continue
    B = N // A

    cur = max(countDigits(A), countDigits(B))
    if (ans > cur):
        ans = cur
    A += 1
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):
# -*- coding: utf-8 -*-
import math
n = int(input())
nn = n

primes = []
x = 2
while x*x<=n:
    if n%x==0:
        primes.append(x)
    x += 1



def digit(x):
    return math.ceil(math.log10(x))

res = digit(nn)
for i in range(len(primes)):
    a = primes[i]
    b = n//a
    t = max(digit(a), digit(b))
    # print(a,b,t)
    res = min(res, t)

print(res)


# -*- coding: utf-8 -*-
import math
n = int(input())

if n==1:
    print(1)
    exit()
primes = []
x = 2
while x*x<=n:
    if n%x==0:
        primes.append(x)
        primes.append(n//x)
    x += 1



def digit(x):
    return math.ceil(math.log10(x)) + (1 if x%10==0 else 0)

res = digit(n)
for i in range(len(primes)):
    a = primes[i]
    b = n//a
    t = max(digit(a), digit(b))
    # print(a,b,t)
    res = min(res, t)

print(res)


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 = 10**18

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

N = int(input())

ans = 10**18

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

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):
F=lambda*m:max(len(str(x))for x in m);print(m)
N=int(input())
print(min(F(x,N//x)for x in range(1,int(N**.5)+1)if N%x==0))

F=lambda*m:max(len(str(x))for x in m)
N=int(input())
print(min(F(x,N//x)for x in range(1,int(N**.5)+1)if N%x==0))

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):
ans = 100000000000000000
N = int(input())
for A in range(1, int(N / 2)+1):
    if N % A == 0:
        B = str(int(N / A))
        A = str(A)
        AL = len(A)
        BL = len(B)
        m = min(AL, BL)
        if ans > m :
            ans = m
        
print(ans)

from math import sqrt, log10
ans = 100000000000000000
N = int(input())
for i in range(1, int(sqrt(N)+1)) :
    print(i)
    A = i
    B = int(N / A)
    if N % A == 0:
        print(A)
        print(B)
        if A > B :
            m = int(log10(A)) + 1
        else :
            m = int(log10(B)) + 1
            print(m)
        if m < ans :
            ans = m
        
print(ans)


from math import sqrt, log10
ans = 100000000000000000
N = int(input())
for i in range(1, int(sqrt(N))+1) :
    A = i
    B = int(N / A)
    if N % A == 0:
        if A >= B :
            m = int(log10(A)) + 1
        else :
            m = int(log10(B)) + 1
        if m < ans :
            ans = m
            #print(ans)
            
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):
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
    

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


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())
root = math.ceil(math.sqrt(n))
nums = []
for i in range(1,root+1):
  if n % i == 0:
    count_i = len(str(i))
    count_j = len(str(j))
    ans = max(count_i,count_j)  
    nums.append(ans) 
nummm = sorted(nums,reverse = True)
print(nummm[0])

import math
n = int(input())
root = math.ceil(math.sqrt(n))
nums = []
for i in range(1,root+1):
  if n % i == 0:
    count_i = len(str(i))
    count_j = len(str(int(n/i)))
    ans = max(count_i,count_j)  
    nums.append(ans) 
print(min(nums))


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

def alldiv(x):
    div = [[1,x]]
    for i in range(2,math.floor(math.sqrt(x))+1):
        if x % i == 0:
            div.append([i, x//i])
    return div


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


N = int(input())
div = alldiv(N)
print(div)
F = [max(digit(i[0]),digit(i[1])) for i in div]
print(min(F))



import math

def alldiv(x):
    div = [[1,x]]
    for i in range(2,math.floor(math.sqrt(x))+1):
        if x % i == 0:
            div.append([i, x//i])
    return div


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


N = int(input())
div = alldiv(N)
#print(div)
F = [max(digit(i[0]),digit(i[1])) for i in div]
print(min(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

N = int(input())
answer = []
b = 0
for a in range(1,round(sqrt(N))+1):
  if N%a == 0:
    b = N//a
    answer.append(max(len(str(a)), len(str(b))))
print(min(answer))


N = int(input())
answer = []
answer.append(1)
b = 0
for a in range(1,round(abs(N))):
  if N%a == 0:
    b = N//a
    answer.append(max(len(str(a)), len(str(b))))
print(min(answer))


N = int(input())
answer = []
answer.append(1)
b = 0
for a in range(1,round(abs(N))+1):
  if N%a == 0:
    b = N//a
    answer.append(max(len(str(a)), len(str(b))))
print(min(answer))


N = int(input())
answer = 1000
b = 0
for a in range(round(abs(N))):
  if N&a == 0:
    b = N/a
    if answer < min(len(str(a)), len(str(b))):
      answer = min(len(str(a)), len(str(b)))
print(answer)

N = int(input())
answer = 1000
for a in range(round(abs(N))):
  if N&a == 0:
    b = N/a
    if answer < min(len(str(a)), len(str(b))):
      answer = min(len(str(a)), len(str(b)))
print(answer)

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


Verdicts: Runtime Error

Wrong Answer

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):
import math
import fractions
N=int(input())
A=fractions.sqrt(N)
A=fractions.ceil(A)
mini=100000000000
for i in range(1,A+1):
    if N%i==0:
        x=len(str(i))
        y=len(str(N//i))
        if mini>max(x,y):
            mini=max(x,y)
print(mini)


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


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())
for i in range(2,int(n**.5)+1):
	if n%i==0:
		print(len(str(n//i)))
		exit()
print(len(str(n)))

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

Verdicts: Wrong Answer

Accepted