problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03775
u221345507
2,000
262,144
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.
['N = int(input())\nans = 10**10 \nans_ = 10**10\n\ndivisors = []\nfor i in range(1, int(N**0.5)+1):\n if N % i == 0:\n divisors.append(i)\n if i != N // i:\n divisors.append(N//i)\n if len(str(N//i))<=ans:\n ans =N//i\n ans_=i\n \nif N ==1:\n ans =1\n \nprint(min(len(str(ans)),len(str(ans_))))', 'N = int(input())\nans = 10**10 \nans_ = 10**10\n\ndivisors = []\nfor i in range(1, int(N**0.5)+1):\n if N % i == 0:\n divisors.append(i)\n divisors.append(N//i)\n if len(str(N//i))<=ans:\n ans =N//i\n ans_=i\n \nif N ==1:\n ans =1\n \nprint((len(str(ans))))']
['Wrong Answer', 'Accepted']
['s256985493', 's679395504']
[3188.0, 3188.0]
[31.0, 30.0]
[389, 331]
p03775
u227085629
2,000
262,144
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.
['import math\nn = int(input())\nk = int(math.sqrt(n))\nfor i in range(1,k+2):\n if n%i == 0:\n a = n//i\n break\ns = len(str(a))\nprint(s)', 'import math\nn = int(input())\nk = int(math.sqrt(n))\nfor i in range(k+2,0,-1):\n if n%i == 0:\n a = n//i\n break\ns = len(str(a))\nprint(s)']
['Wrong Answer', 'Accepted']
['s674419502', 's465642510']
[2940.0, 2940.0]
[18.0, 30.0]
[136, 139]
p03775
u228759454
2,000
262,144
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.
['import math\n\nN = int(input())\n\ndef get_divisor_list(N):\n divisor_list = []\n\n for i in range(1, int(math.sqrt(N)) + 1):\n if N % i == 0:\n divisor_list.append([i, N //i])\n\n return divisor_list\n\ndivisor_list_max = [max(x) for x in get_divisor_list(N)]\n\n\nprint(len(str(divisor_list_max)))', 'import math\n\nN = int(input())\n\ndef get_divisor_list(N):\n divisor_list = []\n\n for i in range(1, int(math.sqrt(N)) + 1):\n if N % i == 0:\n divisor_list.append([i, N //i])\n\n return divisor_list\n\ndivisor_list_max_min = min([max(x) for x in get_divisor_list(N)])\n\n\n\nprint(len(str(divisor_list_max_min)))']
['Wrong Answer', 'Accepted']
['s539242189', 's566918845']
[3188.0, 3188.0]
[27.0, 27.0]
[310, 324]
p03775
u230117534
2,000
262,144
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.
['N = int(input().strip())\n\ndef F(a, b):\n return max(len(str(a)), len(str(b)))\n\nf = N\nfor i in range(1, N):\n if i * i >= N:\n break\n if N % i == 0:\n _f = F(i, N // i)\n f = min(f, _f)\n\n', 'N = int(input().strip())\n\ndef F(a, b):\n return max(len(str(a)), len(str(b)))\n\nf = N\nfor i in range(1, N):\n if i * i > N:\n break\n if N % i == 0:\n _f = F(i, N // i)\n f = min(f, _f)\n\nprint(f)']
['Wrong Answer', 'Accepted']
['s916009610', 's381141370']
[2940.0, 2940.0]
[43.0, 44.0]
[211, 218]
p03775
u235905557
2,000
262,144
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.
['import math\ndef f(a, b):\n al = len(str(a))\n bl = len(str(b))\n if al > bl:\n return al\n return bl\nN = int(input())\nresult = len(str(N))\nfor a in range(1, N):\n if (N % a) != 0:\n continue\n if a*a >= N:\n break\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)\n', 'def f(a, b):\n al = len(str(a))\n bl = len(str(b))\n if al > bl:\n return al\n return bl\nN = int(input())\nresult = len(str(N))\nfor a in range(1, N+1):\n if (N % a) != 0:\n continue\n if a*a > N:\n break\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)', 'def f(a, b):\n al = len(str(a))\n bl = len(str(b))\n if al > bl:\n return al\n return bl\nN = int(input())\nresult = len(str(N))\nfor a in range(1, N+1):\n if (N % a) != 0:\n continue\n if a*a >= N:\n break\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)', 'def f(a, b):\n al = len(str(a))\n bl = len(str(b))\n if al > bl:\n return al\n return bl\nN = int(input())\nn = int(N**0.5)\nresult = len(str(N))\nfor a in range(1, n+1):\n if N % a != 0:\n continue\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)\n', 'def f(a, b):\n al = len(str(a))\n bl = len(str(b))\n if al > bl:\n return al\n return bl\nN = int(input())\nn = int(N**0.5)\nresult = len(str(N))\nfor a in range(1, n):\n if N % a != 0:\n continue\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)\n', 'def f(a, b):\n al = len(str(a))\n bl = len(str(b))\n if al > bl:\n return al\n return bl\nN = int(input())\nresult = len(str(N))\nfor a in range(1, N+1):\n if a*a > N:\n break\n if (N % a) != 0:\n continue\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)', 'def f(a, b):\n al = len(str(int(a)))\n bl = len(str(int(b)))\n if al > bl:\n return al\n return bl\nN = int(input())\nresult = len(str(N))\nfor a in range(1, N):\n if a*a > N:\n break\n if (N % a) != 0:\n continue\n b = N / a\n r = f(a, b)\n if r < result:\n result = r\nprint (result)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s053378669', 's118235530', 's356353595', 's387486567', 's604381017', 's735223525', 's609063518']
[3060.0, 3064.0, 3064.0, 3060.0, 3060.0, 3064.0, 3064.0]
[2104.0, 2104.0, 2104.0, 31.0, 31.0, 45.0, 45.0]
[327, 315, 316, 300, 298, 315, 323]
p03775
u236823931
2,000
262,144
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.
["f = lambda x, y: len(str(max(x, y)))\n\nif __name__ == '__main__':\n n = int(input())\n a = []\n for i in range(1, int(n ** 0.5) + 1):\n if n % i == 0:\n a.append((i, n // i))\n if i != n // i:\n a.append((n//i, n // (n // i)))\n k = [f(e[0], e[1]) for e in a]\n print(max(set(k)))", "\nf = lambda x, y: len(str(max(x, y)))\n\nif __name__ == '__main__':\n n = int(input())\n a = []\n for i in range(1, int(n ** 0.5) + 1):\n if n % i == 0:\n a.append((i, n // i))\n if i != n // i:\n a.append((n//i, n // (n // i)))\n k = [f(e[0], e[1]) for e in a]\n print(min(set(k)))"]
['Wrong Answer', 'Accepted']
['s064031465', 's161629443']
[3316.0, 3316.0]
[31.0, 31.0]
[329, 330]
p03775
u239375815
2,000
262,144
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.
['import math\n\nn=int(input())\nm = int(math.sqrt(n))\n\n\nfor i in range(m+1)[::-1]:\n if n%(i)==0:\n print(int(math.log10(n) + 1))\n break\n', 'import math\n\nn = int(input())\nm = int(math.sqrt(n))\n\n\n\nif n % m == 0:\n print(int(math.log10(m) + 1))\n\nelse:\n for i in range(1, m)[::-1]:\n if n % (i) == 0:\n print(int(math.log10(n / i) + 1))\n break\n']
['Wrong Answer', 'Accepted']
['s632231872', 's901488681']
[2940.0, 2940.0]
[30.0, 30.0]
[148, 232]
p03775
u242358695
2,000
262,144
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.
['n=int(input())\n\ndef f(a,b):\n return max(len(str(a)),len(str(b)))\nm=10000\nfor a in range(1,10**10):\n if n%a==0:\n print(a)\n m=min(f(a,n//a),m)\n if n<a or n//a<a:\n break\nprint(m)', '#n, *d = map(int, open(0).read().split())\n\nn=int(input())\n\ndef f(a,b):\n return max(len(str(a)),len(str(b)))\nm=10000\nfor a in range(1,10**10):\n if n%a==0:\n m=min(f(a,n//a),m)\n if n<a or n//a<a:\n break\nprint(m)']
['Wrong Answer', 'Accepted']
['s781395278', 's867890515']
[9020.0, 9104.0]
[50.0, 53.0]
[205, 260]
p03775
u243492642
2,000
262,144
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.
['# coding: utf-8\nimport math\n\nnum_N = int(input())\n\n\ndef is_prime(num):\n if num < 2:\n return False\n if num == 2 or num == 3 or num == 5:\n return True\n if num % 2 == 0 or num % 3 == 0 or num % 5 == 0:\n return False\n\n \n prime = 7\n step = 4\n num_sqrt = math.sqrt(num)\n while prime <= num_sqrt:\n if num % prime == 0:\n return False\n prime += step\n step = 6 - step\n\n return True\n\n\nif is_prime(num_N):\n print(len(list(str(num_N))))\nelse:\n for i in range(math.ceil(math.sqrt(num_N)), num_N):\n if num_N % i == 0:\n num_A = i\n num_B = num_N / num_A\n num_A_len = len(list(str(num_A)))\n num_B_len = len(list(str(num_B)))\n len_two_max = max(num_A_len, num_B_len)\n print(len_two_max)\n break\n', '# coding: utf-8\nimport math\n\nnum_N = int(input())\n\nmin_num = 999999\nsqrt_N = math.floor(math.sqrt(num_N))\n\nfor i in range(1, sqrt_N + 1):\n if num_N % i == 0:\n len_num_A = len(str(i))\n len_num_B = len(str(int(num_N / i)))\n min_num = min(min_num, max(len_num_A, len_num_B))\n\nprint(min_num)']
['Wrong Answer', 'Accepted']
['s856245800', 's552829146']
[3064.0, 3060.0]
[2104.0, 32.0]
[933, 311]
p03775
u260036763
2,000
262,144
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.
['import math\nN = int(input())\nans = 10\nfor A in range(1, int(math.sqrt(N))):\n if N % A == 0:\n B = N//A\n F = max(len(str(A)), len(str(B)))\n ans = F if ans > F\nprint(ans)', 'import math\nN = int(input())\nans = 10\nfor A in range(1, int(math.sqrt(N))+1):\n if N % A == 0:\n B = N//A\n F = max(len(str(A)), len(str(B)))\n if ans > F:\n ans = F \nprint(ans)']
['Runtime Error', 'Accepted']
['s399693560', 's314078953']
[2940.0, 3060.0]
[17.0, 32.0]
[177, 187]
p03775
u261082314
2,000
262,144
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.
['N = int(input())\n\nif N == 1:\n print(1)\nelse:\n for a in reversed(range(1, (N//2)+1)):\n if N % a == 0:\n b = N/a\n ans=max(len(str(int(a))), len(str(int(b))))\n break\nprint(ans)\n\n', 'N = int(input())\nimport math\nif N == 1:\n print(1)\nelse:\n for a in reversed(range(1, (int(math.sqrt(N)))+1)):\n if N % a == 0:\n b = N/a\n ans=max(len(str(int(a))), len(str(int(b))))\n break\n print(ans)\n\n']
['Runtime Error', 'Accepted']
['s562225221', 's696674743']
[9088.0, 9092.0]
[2206.0, 41.0]
[220, 248]
p03775
u262481526
2,000
262,144
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.
['N = int(input())\nmax_num = []\n \ndef yakusu(num):\n cd = []\n for i in range(1, int(num*0.5 + 1)):\n if num % i ==0:\n cd.append(i)\n return cd\n \nfor A in yakusu(N):\n for B in yakusu(N):\n if A * B == N:\n max_num.append(max(A, B))\n \nprint(len(str(max(max_num))))', 'n = int(input())\na = int(n **(0.5) + 1)\nnum = 1\nfor i in range(1,a + 1):\n if n%i == 0:\n num = i\nans = max(num, n // num)\nprint(len(str(ans)))']
['Runtime Error', 'Accepted']
['s950355575', 's279895569']
[3060.0, 3060.0]
[2103.0, 31.0]
[316, 152]
p03775
u294211484
2,000
262,144
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.
['import math\nn = int(input())\n\na = 1\nb = 1\n\n\n\n\ntmp = int(math.sqrt(n) + 1)\n\nfor i in range(1, tmp):\n if n % i == 0:\n a = i\n\nb = int(n / a)\n\nf = max(len(str(a)), len(str(b)))\n\nprint(f, a, b)\n\n', 'import math\nn = int(input())\n\na = 1\nb = 1\n\n\n\n\ntmp = int(math.sqrt(n) + 1)\n\nfor i in range(1, tmp):\n if n % i == 0:\n a = i\n\nb = int(n / a)\n\nf = max(len(str(a)), len(str(b)))\n\nprint(f)\n\n']
['Wrong Answer', 'Accepted']
['s166380216', 's410132842']
[3064.0, 3064.0]
[31.0, 32.0]
[830, 824]
p03775
u304058693
2,000
262,144
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.
['N = int(input())\n\ndiv = []\nfor i in range(1, int(N ** 0.5) + 1):\n if N % i == 0:\n div.append([i, N // i])\nprint(div)\n\nl = len(div)\nflist = []\nfor i in range(l):\n fx = max([len(str(div[i][0])), len(str(div[i][1]))])\n flist.append(fx)\n\nprint(min(flist))\n', 'N = int(input())\n\ndiv = []\nfor i in range(1, int(N ** 0.5) + 1):\n if N % i == 0:\n div.append([i, N // i])\nprint(div)\n\nl = len(div)\nflist = []\nfor i in range(l):\n fx = max([len(str(div[i][0])), len(str(div[i][1]))])\n flist.append(fx)\n\nprint(min(flist))\n', 'N = int(input())\n\ndiv = []\nfor i in range(1, int(N ** 0.5) + 1):\n if N % i == 0:\n div.append([i, N // i])\n#print(div)\n\nl = len(div)\nflist = []\nfor i in range(l):\n fx = max([len(str(div[i][0])), len(str(div[i][1]))])\n flist.append(fx)\n\nprint(min(flist))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s225233053', 's804869765', 's612878196']
[9472.0, 9448.0, 9424.0]
[42.0, 41.0, 40.0]
[268, 268, 269]
p03775
u305965165
2,000
262,144
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.
['n = int(input())\n\nmin_len = len(str(n))\nfor i in range(2,int(n**(1/2))+1):\n if n%i==0:\n l = max(len(str(i)), len(str(n/i)))\n min_len = min(min_len, l)\n\nprint(min_len)', 'n = int(input())\n\nmin_len = len(str(n))\nfor i in range(2,int(n**(1/2))+1):\n if n%i==0:\n l = max(len(str(i)), len(str(n//i)))\n min_len = min(min_len, l)\n\n\nprint(min_len)']
['Wrong Answer', 'Accepted']
['s598539677', 's991040548']
[3060.0, 3060.0]
[30.0, 32.0]
[183, 185]
p03775
u309141201
2,000
262,144
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.
['def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n divisors.sort()\n return divisors\n\nN = int(input())\nanswer = 0\nlen_div = len(make_divisors(N))\n\n\n\n\n\n\nif len_div % 2 == 0:\n A_len = len(str(make_divisors(N)[len_div // 2 - 1]))\n B_len = len(str(make_divisors(N)[len_div // 2]))\n if A_len <= B_len:\n answer = B_len\n else:\n answer = A_len\nelse:\n answer = len(str(make_divisors(N)[len_div // 2]))\n print(make_divisors(N)[len_div // 2])\nprint(answer)\n\n', 'def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n divisors.sort()\n return divisors\n\nN = int(input())\nanswer = 0\nlen_div = len(make_divisors(N))\n\nif len_div % 2 == 0:\n A_len = len(str(make_divisors(N)[len_div // 2 - 1]))\n B_len = len(str(make_divisors(N)[len_div // 2]))\n if A_len <= B_len:\n answer = B_len\n else:\n answer = A_len\nelse:\n answer = len(str(make_divisors(N)[len_div // 2]))\nprint(answer)\n\n']
['Wrong Answer', 'Accepted']
['s808717267', 's962199695']
[3188.0, 3188.0]
[46.0, 45.0]
[813, 586]
p03775
u312078744
2,000
262,144
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.
['n = int(input())\n\n\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\n\norg = make_divisors(n)\ndiv = sorted(org)\n\ndivNum = len(div)\n\n\nif (divNum % 2 == 0):\n indA = int(divNum / 2) - 1\n indB = int(divNum / 2)\nelse:\n indA = int((divNum - 1) / 2)\n indB = indA\n\n# print(div[indA])\n\nA = len(str(div[indA]))\nB = len(str(div[indB]))\n\nans = max(A, B)\nprint(ans)a\n', 'n = int(input())\n\n\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\n\norg = make_divisors(n)\ndiv = sorted(org)\n\ndivNum = len(div)\n\n\nif (divNum % 2 == 0):\n indA = int(divNum / 2) - 1\n indB = int(divNum / 2)\nelse:\n indA = int((divNum - 1) / 2)\n indB = indA\n\n# print(div[indA])\n\nA = len(str(div[indA]))\nB = len(str(div[indB]))\n\nans = max(A, B)\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s778032245', 's832085944']
[3064.0, 3064.0]
[18.0, 27.0]
[596, 595]
p03775
u314825579
2,000
262,144
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.
['\nimport math\nN=int(input())\n\ndef func(A,B):\n if A > B:\n return len(str(A))\n else:\n return len(str(B))\n\n\nans=[]\nN2=int(math.sqrt(N))\nfor A in range(1,N2+1):\n if N%A==0:\n B=N/A\n ans.append(func(A,B))\n\nprint(min(ans))', '\nimport math\nN=int(input())\n\ndef func(A,B):\n if A > B:\n return len(str(A))\n else:\n return len(str(B))\n\n\nans=[]\nN2=math.floor(math.sqrt(N))\nfor A in range(1,N2+1):\n if N%A==0:\n B=int(N/A)\n ans.append(func(A,B))\n\nprint(min(ans))']
['Wrong Answer', 'Accepted']
['s838004644', 's159936991']
[9188.0, 9192.0]
[42.0, 41.0]
[229, 241]
p03775
u318859025
2,000
262,144
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.
['n=int(input())\nli=[]\n\nfor i in range(1,10**5):\n if n%i==0:\n a=i\n b=n//a\n f=max(len(str(a)),len(str(b)))\n li.append(f)\nprint(li)', 'n=int(input())\nli=[]\n\nfor i in range(1,10**5):\n if n%i==0:\n a=i\n b=n//a\n f=max(len(str(a)),len(str(b)))\n li.append(f)\nprint(min(li))']
['Wrong Answer', 'Accepted']
['s008386700', 's956771416']
[3060.0, 3060.0]
[31.0, 31.0]
[140, 145]
p03775
u326552320
2,000
262,144
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.
["import math\ndef main():\n N = int(input())\n count = 0\n for i in range(1,int(math.sqrt(N))):\n if N%i==0:\n count+=1\n print(count)\n\nif __name__ == '__main__':\n main()\n", '#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tC\n# CreatedDate: 2020-06-26 16:16:00 +0900\n# LastModified: 2020-06-26 19:11:55 +0900\n#\n\n\nimport os\nimport sys\nfrom math import sqrt\n# import numpy as np\n\n\n\ndef F(a, b):\n if len(str(a)) > len(str(b)):\n print(len(str(a)))\n else:\n print(len(str(b)))\n\n\ndef main():\n n = int(input())\n for i in range(int(sqrt(n)+1), -1, -1):\n if n % i == 0:\n a = i\n b = n//i\n# print(a,b)\n F(a, b)\n break\n\n\nif __name__ == "__main__":\n main()\n']
['Wrong Answer', 'Accepted']
['s538404021', 's019888481']
[2940.0, 9164.0]
[27.0, 39.0]
[196, 593]
p03775
u327310087
2,000
262,144
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.
['def f(a, b):\n return max(len(str(a)), len(str(b)))\n\nn = int(input())\n\nans = 11\nfor a in range(1, int(n ** 0.5) + 1):\n b = n / a\n if f(a, b) < ans and n % a == 0:\n ans = f(a, b)\n\nprint(ans)', 'def f(a, b):\n return max(len(str(a)), len(str(b)))\n\nn = int(input())\n\nans = 11\nfor a in range(1, int(n ** 0.5) + 1):\n b = n // a \n if n % a == 0 and f(a, b) < ans:\n ans = f(a, b)\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s872575669', 's671211800']
[3060.0, 3060.0]
[198.0, 43.0]
[204, 206]
p03775
u329407311
2,000
262,144
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.
['import math\n\nN = int(input())\n\na = math.ceil(N ** (1/2))\n\nfor i in range(a):\n if int(N % (a-i)) == 0:\n a = len(list(str(int(a-i))))\n b = len(list(str(int(N % (a-i)))))\n \n break\n\nprint(min(a,b))', 'import math\n\nN = int(input())\n\na = math.ceil(N ** (1/2))\n\nfor i in range(a):\n if int(N % (a-i)) == 0:\n aa = len(list(str(int(a-i))))\n bb = len(list(str(int(N // (a-i)))))\n break\n\nprint(max(aa,bb))\n']
['Wrong Answer', 'Accepted']
['s291882304', 's104650525']
[3060.0, 3060.0]
[43.0, 44.0]
[206, 207]
p03775
u338597441
2,000
262,144
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.
['n=int(input())\na=list(map(int,input().split()))\ncolor=[]\ncount,free=0,0\n\nfor i in range(n):\n c=a[i]//400\n if a[i]<3200 and c not in color:\n color.append(c)\n count+=1\n elif a[i]>=3200:\n free+=1\n \nmin,max=0,0\nif count==0:\n max=free\n min=1\nelse:\n max=count+free\n min=count\n \nprint(min,max)', 'n=int(input())\n\nfor a in range(1,n**0.5+1):\n if n%a==0:\n b=n//a\n sa=str(a)\n sb=str(b)\n if a<=b:\n ans=len(sb)\n else:\n break\n\nprint(ans)', 'import math\n\nn=int(input())\nfor i in range(1,int(math.sqrt(n))+1):\n ans=0\n if n%i==0:\n j=int(n/i)\n ans1=str(i)\n ans2=str(j)\n if len(ans1)>=len(ans2):\n break\n\nif len(ans1)>=len(ans2):\n print(len(ans1))\nelse:\n print(len(ans2))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s124948433', 's561212876', 's842947070']
[9188.0, 9432.0, 9028.0]
[21.0, 28.0, 46.0]
[336, 195, 275]
p03775
u338929851
2,000
262,144
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.
["# -*- coding: utf-8 -*-\nimport math\n\nif __name__ == '__main__':\n N = int(input())\n val = len(N)\n li = []\n for i in range(1, math.ceil(math.sqrt(N))+1):\n if N % i == 0:\n a = len(str(int(i)))\n b = len(str(int(N/i)))\n print(a, b)\n c = max(a, b)\n\n if c < val:\n val = c\n\n print(val)\n\n", "# -*- coding: utf-8 -*-\nimport math\n\nif __name__ == '__main__':\n N = int(input())\n val = N\n li = []\n for i in range(1, math.ceil(math.sqrt(N))+1):\n if N % i == 0:\n a = len(str(int(i)))\n b = len(str(int(N/i)))\n print(a, b)\n c = max(a, b)\n\n if c < val:\n val = c\n\n print(val)\n", "# -*- coding: utf-8 -*-\nimport math\n\nif __name__ == '__main__':\n N = int(input())\n val = len(str(N))\n li = []\n for i in range(1, math.ceil(math.sqrt(N))+1):\n if N % i == 0:\n a = len(str(int(i)))\n b = len(str(int(N/i)))\n print(a, b)\n c = max(a, b)\n\n if c < val:\n val = c\n\n print(val)\n", "# -*- coding: utf-8 -*-\nimport math\n\nif __name__ == '__main__':\n N = int(input())\n val = len(str(N))\n li = []\n for i in range(1, math.ceil(math.sqrt(N))+1):\n if N % i == 0:\n a = len(str(int(i)))\n b = len(str(int(N/i)))\n c = max(a, b)\n\n if c < val:\n val = c\n\n print(val)\n"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s274841299', 's582016504', 's832480421', 's122248339']
[3060.0, 3316.0, 3444.0, 3060.0]
[18.0, 31.0, 32.0, 33.0]
[371, 365, 375, 351]
p03775
u343437894
2,000
262,144
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.
['# coding: utf-8\n# Here your code !\nimport math;\n\nn = int(input());\na = int(math.sqrt(n));\nprint("a,n = " , a, n);\n\nwhile True:\n b = n // a;\n if n == a * b:\n print("a,b", a, b+1)\n print(int(math.log10(b))+1);\n break\n a = a-1;\n', '# coding: utf-8\n# Here your code !\nimport math;\n\nn = int(input());\na = int(math.sqrt(n));\n\nwhile True:\n b = n // a;\n if n == a * b:\n print("a,b", a, b+1)\n print(int(math.log10(b))+1);\n break\n a = a-1;\n', 'import math;\n \nn = int(input());\na = int(math.sqrt(n));\n \nwhile True:\n b = n // a;\n if n == a * b:\n print(int(math.log10(b))+1);\n break\n a = a-1;']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s305477245', 's370391053', 's591652869']
[2940.0, 2940.0, 2940.0]
[43.0, 45.0, 44.0]
[255, 231, 168]
p03775
u343490140
2,000
262,144
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.
['n = int(input())\nans = 10\nfor i in range(1, n/2+1):\n if n % i == 0:\n if len(str(max(i, n/i))) <= ans:\n ans = len(str(max(i, n/i)))\nprint(ans)\n', 'n = int(input())\nans = 11\nfor i in range(1, int(n**0.5)+1):\n if n % i != 0:\n continue\n b = n // i\n ans = min(ans, max(len(str(i)),len(str(b))))\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s192765972', 's704828979']
[9032.0, 9296.0]
[22.0, 39.0]
[163, 171]
p03775
u354916249
2,000
262,144
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.
['N = int(input())\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n temp = []\n if n % i == 0:\n temp.append(i)\n temp.append(n//i)\n divisors.append(temp)\n\n \n return divisors\n\nX = make_divisors(N)\nans = 10\n\nfor i in X:\n ans = min(ans, max(len(str(i[0])), len(str(i[1]))))\n\nprint(ans)\n\nfor i in X:\n ans = min(ans, max(len(str(i[0])), len(str(i[1]))))\n\nprint(ans)\n', 'N = int(input())\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n temp = []\n if n % i == 0:\n temp.append(i)\n temp.append(n//i)\n divisors.append(temp)\n\n \n return divisors\n\nX = make_divisors(N)\nans = 10\n\nfor i in X:\n ans = min(ans, max(len(str(i[0])), len(str(i[1]))))\n\nprint(ans)\n\n']
['Wrong Answer', 'Accepted']
['s371444159', 's481228337']
[3188.0, 3188.0]
[30.0, 28.0]
[464, 384]
p03775
u357949405
2,000
262,144
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.
['N = int(input())\n\nfor i in range(N**0.5, 0, -1):\n div, mod = divmod(N)\n if not mod:\n print(len(str(min(div, N//div))))\n', '\nDEBUG = True\nN = int(input())\n\n# if N == 1:\n# print(1)\n# exit()\n\ndivisors = []\n\ntmp = N\nfor i in range(2, int(N**0.5)+1):\n while tmp % i == 0:\n tmp //= i\n divisors.append(i)\nif tmp != 1:\n divisors.append(tmp)\n\nif DEBUG:\n print(divisors)\n\nA = 1\nB = 1\nwhile divisors:\n x = divisors.pop()\n if A > B:\n B *= x\n else:\n A *= x\n\nif DEBUG:\n print("A: {}, B: {}".format(A, B))\n\nprint(max(len(str(A)), len(str(B))))\n', 'N = int(input())\n\nfor i in range(int(N**0.5)+1, 0, -1):\n div, mod = divmod(N, i)\n if not mod:\n print(len(str(max(div, N//div))))\n exit()\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s477476979', 's815221263', 's476516438']
[3064.0, 3064.0, 3060.0]
[17.0, 30.0, 48.0]
[132, 463, 157]
p03775
u362560965
2,000
262,144
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.
['N = int(input())\n\ndef make_divisor_list(num):\n if num < 1:\n return []\n elif num == 1:\n return [1]\n else:\n divisor_list = []\n divisor_list.append(1)\n for i in range(2, num // 2 + 1):\n if i > N/i:\n break\n if num % i == 0:\n divisor_list.append(i)\n\n return divisor_list\n\nA = make_divisor_list(N)\n\nB = []\nans = 0\n\nfor a in A:\n b = int(N/a)\n c = max(a,b)\n ans = min(ans,len(str(c)))\n\nprint(ans)', 'N = int(input())\n\ndef make_divisor_list(num):\n if num < 1:\n return []\n elif num == 1:\n return [1]\n else:\n divisor_list = []\n divisor_list.append(1)\n for i in range(2, num // 2 + 1):\n if i > N/i:\n break\n if num % i == 0:\n divisor_list.append(i)\n\n return divisor_list\n\nA = make_divisor_list(N)\n\nB = []\nans = 0\n\nfor a in A:\n b = int(N/a)\n c = max(a,b)\n ans = max(ans,len(str(c)))\n\nprint(ans)', 'N = int(input())\n\ndef make_divisor_list(num):\n if num < 1:\n return []\n elif num == 1:\n return [1]\n else:\n divisor_list = []\n divisor_list.append(1)\n for i in range(2, num // 2 + 1):\n if i > N/i:\n break\n if num % i == 0:\n divisor_list.append(i)\n\n return divisor_list\n\nA = make_divisor_list(N)\n\nB = []\nans = float("inf")\n\nfor a in A:\n b = int(N/a)\n c = max(a,b)\n ans = min(ans,len(str(c)))\n\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s602618887', 's612648524', 's150713308']
[3064.0, 3064.0, 3064.0]
[41.0, 41.0, 41.0]
[500, 500, 511]
p03775
u368749019
2,000
262,144
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.
['import math\nN = int(input())\nans = 10\n\nfor i in reversed(range(1,int(math.sqrt(N)) + 1)):\n if N % i == 0:\n A = len(str(i))\n B = len(str(N / i))\n ans = min(ans,max(A,B))\n\nprint(ans)', 'import math\nN = int(input())\nans = 10\n\nfor i in reversed(range(1,int(math.sqrt(N)) + 1)):\n if N % i == 0:\n A = len(str(i))\n B = len(str(N // i))\n ans = min(ans,max(A,B))\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s608255749', 's330649717']
[3060.0, 3060.0]
[30.0, 29.0]
[204, 207]
p03775
u371385198
2,000
262,144
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.
['import sys\nimport math\ninput = sys.stdin.readline\n\nN = int(input())\na = int(math.sqrt(N))\n\nA = 0\nB = 0\nfor i in reversed(range(1, a + 1)):\n if not N % i:\n A = i\n B = N // A\n break\n\nprint(max(len(str(A)), len(str(B)))', 'import sys\nimport math\ninput = sys.stdin.readline\n \nN = int(input())\na = int(math.sqrt(N))\n \nA = 0\nB = 0\nfor i in reversed(range(1, a + 1)):\n if not N % i:\n A = i\n B = N // A\n break\n \nprint(max(len(str(A)), len(str(B))))']
['Runtime Error', 'Accepted']
['s663725290', 's810892038']
[3060.0, 3060.0]
[19.0, 31.0]
[226, 230]
p03775
u373047809
2,000
262,144
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.
['n, m = int(input()), 0\nfor i in range(1, n**.5 + 1):\n if n%i == 0:\n m = max(m, i)\nprint(len(str(n // m)))', 'n, m = int(input()), 0\nfor i in range(1, **.5 + 1):\n if n%i == 0:\n m = max(m, i)\nprint(len(str(n // m)))', 'n, m = int(input()), 0\nfor i in range(1, int(n**.5) + 1):\n if n%i == 0:\n m = max(m, i)\nprint(len(str(n // m)))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s545626085', 's680739274', 's417060825']
[9380.0, 9168.0, 9256.0]
[24.0, 22.0, 43.0]
[109, 108, 114]
p03775
u375172966
2,000
262,144
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.
['n = int(input())\nans = 10**10+1\nfor i in range(1, int(n**0.5)+1):\n if n%i != 0:\n continue\n n /= i\n if n <= ans:\n ans = n\nans = len(str(int(ans)))\nprint(ans)', 'n = int(input())\nans = 10**10+1\nfor i in range(1, int(n**0.5)+1):\n if n%i != 0:\n continue\n tmp = n\n tmp /= i\n if tmp <= ans:\n ans = tmp\nans = len(str(int(tmp)))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s887364311', 's111327439']
[3060.0, 3060.0]
[41.0, 30.0]
[179, 197]
p03775
u380933932
2,000
262,144
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.
['n=int(input())\nans=len(str(n))\nfrom math import floor,sqrt\ns=floor(sqrt(n))\nf=[]\nfor i in range(2,1+s):\n if n%i==0:\n while True:\n f.append(i)\n n=n//i\n if n%i!=0:\n break\nitr=2**(len(f))-1\nl=len(f)\nfor i in range(2**(len(f)-1)):\n itr+=1\n litr=str(bin(itr))[3:]\n a,b=1,1\n for j in range(l):\n if litr[j]=="0":\n a*=f[j]\n else:\n b*=f[j]\n t=max(len(str(a)),len(str(b)))\n if t<ans:\n ans=t\nprint(ans)\n ', 'n=int(input())\nans=len(str(n))\nfrom math import floor,sqrt\ns=floor(sqrt(n))\nf=[]\nfor i in range(2,1+s):\n if n%i==0:\n while True:\n f.append(i)\n n=n//i\n if n%i!=0:\n break\nitr=2**(len(f))-1\nl=len(f)\nfor i in range(2**len(f)):\n itr+=1\n litr=str(bin(itr))[3:]\n a,b=1,1\n for j in range(l):\n if litr[j]=="0":\n a*=f[j]\n else:\n b*=f[j]\n t=max(len(str(a)),len(str(b)))\n if t<ans:\n ans=t\nprint(ans)\n ', 'n=int(input())\nans=len(str(n))\nfrom math import floor,sqrt\ns=floor(sqrt(n))\nf=[]\nfor i in range(2,1+s):\n if n%i==0:\n while True:\n f.append(i)\n n=n//i\n if n%i!=0:\n break\nitr=2**(len(f))-1\nl=len(f)\nfor i in range(2**(len(f-1))):\n itr+=1\n litr=str(bin(itr))[3:]\n a,b=1,1\n for j in range(l):\n if litr[j]=="0":\n a*=f[j]\n else:\n b*=f[j]\n t=max(len(str(a)),len(str(b)))\n if t<ans:\n ans=t\nprint(ans)\n ', 'n=int(input())\nans=len(str(n))\nfrom math import floor,sqrt\ns=floor(sqrt(n))\nf=[]\nans=len(str(n))\nfor i in range(2,s+1):\n if n%i==0:\n t=max(len(str(i)),len(str(n//i)))\n if t<ans:\n ans=t\nprint(ans)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s113412708', 's349078662', 's423575970', 's128369391']
[3064.0, 3064.0, 3064.0, 3060.0]
[2104.0, 2104.0, 33.0, 30.0]
[451, 447, 451, 224]
p03775
u392029857
2,000
262,144
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.
['N = int(input())\nrootn = int(N**0.5) +1\nA = range(1, rootn)\nmin_digits = 11\nfor i in A:\n if (N % A) == 0:\n B = N // A\n p, q =len(str(A)), len(str(B))\n if (p > q) and p < min_digits:\n min_digits = p\n elif (p <= q) and q < min_digits:\n min_digits = q\nprint(min_digits)', 'N = int(input())\nrootn = int(N*0.5) +1\nA = range(1, rootn)\nmin_digits = 11\nfor i in A:\n if (N % A) == 0:\n B = N // A\n p, q =len(str(A)), len(str(B))\n if (p > q) and p < min_digits:\n min_digits = p\n elif (p <= q) and q < min_digits:\n min_digits = q\nprint(min_digits)\n \n ', 'N = int(input())\nrootn = int(N**0.5) +1\nA = range(1, rootn)\nmin_digits = 11\nfor i in A:\n if (N % i) == 0:\n B = N // i\n p, q =len(str(A)), len(str(B))\n if (p > q) and p < min_digits:\n min_digits = p\n elif (p <= q) and q < min_digits:\n min_digits = q\nprint(min_digits)', 'N = int(input())\nrootn = int((N**0.5) +1)\nA = range(1, rootn)\nmin_digits = 11\nfor i in A:\n if (N % i) == 0:\n B = N // i\n p, q =len(str(i)), len(str(B))\n if (p > q) and (p < min_digits):\n min_digits = p\n elif (p <= q) and (q < min_digits):\n min_digits = q\nprint(min_digits)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s463443090', 's760653180', 's920537159', 's791821468']
[3188.0, 3060.0, 3188.0, 3064.0]
[18.0, 18.0, 30.0, 32.0]
[319, 338, 319, 325]
p03775
u405256066
2,000
262,144
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.
['from sys import stdin\nN = int(stdin.readline().rstrip())\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n print(i)\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\nfact = make_divisors(N)\n\nans = 10000\nfor a in fact:\n b = N // a\n ans = min(ans,max(len(str(a)),len(str(b))))\nprint(ans)', 'from sys import stdin\nN = int(stdin.readline().rstrip())\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n #print(i)\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\nfact = make_divisors(N)\n\nans = 10000\nfor a in fact:\n b = N // a\n ans = min(ans,max(len(str(a)),len(str(b))))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s043805595', 's877170016']
[3920.0, 3064.0]
[89.0, 28.0]
[442, 443]
p03775
u405733072
2,000
262,144
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.
['n = int(input())\nfor i in range(int(n**0.5),0,-1):\n if n%i == 0:\n a = max(i,n//i)\n print(int(math.log10(a))+1)\n break', 'import math\nn = int(input())\nfor i in range(int(n**0.5),0,-1):\n if n%i == 0:\n a = max(i,n//i)\n print(int(math.log10(a))+1)\n break']
['Runtime Error', 'Accepted']
['s290166163', 's730638898']
[9352.0, 9360.0]
[38.0, 38.0]
[141, 153]
p03775
u409542115
2,000
262,144
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.
["N = int(input())\n\nans1 = 0\n\nA = '1'\nB = str(N)\n\nif len(A)>=len(B):\n ans = len(A)\nelse:\n ans = len(B)\n \nfor i in range(2,N+1):\n A = i\n if N%A==0:\n B = int(N / A)\n A = str(A)\n B = str(B)\n print(A, B)\n if len(A)>=len(B):\n ans1 = len(A)\n else:\n ans1 = len(B)\n if ans1 <= ans:\n ans = ans1\n if len(str(A))==len(str(B)):\n break\nprint(ans)\n", "N = int(input())\n\nans1 = 0\n\nA = '1'\nB = str(N)\n\nif len(A)>=len(B):\n ans = len(A)\nelse:\n ans = len(B)\n \nfor i in range(2,int(math.sqrt(N)+1):\n A = i\n if N%A==0:\n B = int(N / A)\n A = str(A)\n B = str(B)\n if len(A)>=len(B):\n ans1 = len(A)\n else:\n ans1 = len(B)\n if ans1 <= ans:\n ans = ans1\n if len(str(A))==len(str(B)):\n break\nprint(ans)\n", "import math\n\nN = int(input())\n\nans1 = 0\n\nA = '1'\nB = str(N)\n\nif len(A)>=len(B):\n ans = len(A)\nelse:\n ans = len(B)\n \nfor i in range(2,int(math.sqrt(N)+1):\n A = i\n if N%A==0:\n B = int(N / A)\n A = str(A)\n B = str(B)\n if len(A)>=len(B):\n ans1 = len(A)\n else:\n ans1 = len(B)\n if ans1 <= ans:\n ans = ans1\n if len(str(A))==len(str(B)):\n break\nprint(ans)\n", "import math\n\nN = int(input())\n\nans1 = 0\n\nA = '1'\nB = str(N)\n\nif len(A)>=len(B):\n ans = len(A)\nelse:\n ans = len(B)\n \nfor i in range(2,int(math.sqrt(N))+1):\n A = i\n if N%A==0:\n B = int(N / A)\n A = str(A)\n B = str(B)\n if len(A)>=len(B):\n ans1 = len(A)\n else:\n ans1 = len(B)\n if ans1 <= ans:\n ans = ans1\n if len(str(A))==len(str(B)):\n break\nprint(ans)\n"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s083899140', 's545548904', 's566714356', 's805998684']
[3244.0, 2940.0, 2940.0, 3064.0]
[2104.0, 17.0, 17.0, 75.0]
[439, 434, 447, 448]
p03775
u433515605
2,000
262,144
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.
['N = int(input())\n\nsosuu = 1\nfor i in range(1,int(math.sqrt(N+1))):\n if N % i == 0:\n sosuu = i\n B = N // i\n\nprint(len(str(max(sosuu, B))))\n', 'import math\n\nN = int(input())\n\nsosuu = 1\nB = 1\nfor i in range(1,int(math.sqrt(N)+1)):\n if N % i == 0:\n sosuu = i\n B = N // i\n\nprint(len(str(max(sosuu, B))))']
['Runtime Error', 'Accepted']
['s679303817', 's128922907']
[2940.0, 3060.0]
[17.0, 31.0]
[155, 173]
p03775
u433532588
2,000
262,144
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.
['x', '\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(2147483647)\nINF=float("inf")\nMOD=10**9+7\n# A = [ int(input()) for _ in range(N) ]\n##############################\n\nN = int(input())\n\na = 1\nans = len(str(N))\n\nwhile a*a <= N:\n if N%a == 0:\n b = N//a\n tmp = len(str(b))\n ans = min(ans, tmp)\n a += 1\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s830747677', 's568754919']
[3068.0, 3064.0]
[17.0, 42.0]
[1, 344]
p03775
u440129511
2,000
262,144
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.
['import math\nn=int(input())\nk=int(math.sqrt(n))\nl=[]\nfor i in range(1,k+2):\n n%i==0:l.append(max(len(str(i),len(str(n//i))))\nprint(min(l))', 'import math\nn=int(input())\nk=int(math.sqrt(n))\nl=[]\nfor i in range(1,k+2):\n if n%i==0:l.append(max(len(str(i),len(str(n//i))))\nprint(min(l))', 'import math\nn=int(input())\nk=int(math.sqrt(n))\nl=[]\nfor i in range(1,k+2):\n if n%i==0:l.append(max( len(str(i)), len(str(n//i)) ))\nprint(min(l))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s199962699', 's248369657', 's002750069']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 30.0]
[140, 143, 147]
p03775
u450145303
2,000
262,144
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.
['from math import sqrt\n\ndef F(t):\n return max(len(str(t[0])), len(str(t[1])))\n\nN = long(input())\nm = list(map(F,[(r,int(N / r)) for r in range(2, int(sqrt(N))) if N % r == 0]))\nprint(min(m)) if len(m) != 0 else print(len(str(N)))', 'N = int(input())\nm = 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]))\nprint(min(m) if len(m) != 0 else len(str(N)))']
['Runtime Error', 'Accepted']
['s238060858', 's826863980']
[3064.0, 3316.0]
[18.0, 29.0]
[231, 190]
p03775
u450904670
2,000
262,144
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.
['n = int(input())\nres = 0\nfor i in int(sqrt(n) + 1):\n if(n % i == 0):\n tmp = max([len(i), len(n*i)])\n if(res > tmp):\n res = tmp\nprint(res)', 'import math\nn = int(input())\nres = 10**10\nfor i in range(1, int(math.sqrt(n) + 1)):\n if(n % i == 0):\n tmp = max([len(str(i)), len(str(n//i))])\n print(i, len(str(i)), n//i, len(str(n//i)))\n if(res > tmp):\n res = tmp\nprint(res)', 'import math\nn = int(input())\nres = 10**10\nfor i in range(1, int(math.sqrt(n) + 1)):\n if(n % i == 0):\n tmp = max([len(str(i)), len(str(n//i))])\n if(res > tmp):\n res = tmp\nprint(res)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s208742737', 's501313702', 's316502531']
[2940.0, 3396.0, 3060.0]
[17.0, 32.0, 30.0]
[149, 241, 192]
p03775
u462626125
2,000
262,144
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.
['import math\n\nN = int(input())\n\ndef solve(N,A):\n\tif(N % A == 0):\n\t\tB = N / A\n\t\treturn int(math.log10(max(A,B)) + 1)\n\telse:\n\t\treturn -1\n\t\t\n\nans = []\nfor A in range(1,N):\n\tans.append(solve(N,A))\nprint(max(ans))', "import math\n\nN = int(input())\n\ndef enum(N,A):\n if(N % A == 0):\n B = N // A\n return (A,B)\n else:\n return 'NULL'\n\ndef F(tupleX):\n t = max(tupleX)\n return int(math.log10(t) + 1)\n\nX = []\nhu = int(math.sqrt(N)) + 1\nfor n in range(1,hu):\n X.append(enum(N,n))\n\nY = []\nfor x in X:\n if (x == 'NULL'):\n continue\n else:\n y = F(x)\n Y.append(y)\n\nprint(min(Y))"]
['Runtime Error', 'Accepted']
['s285671096', 's665263073']
[68760.0, 3956.0]
[2108.0, 53.0]
[207, 409]
p03775
u468972478
2,000
262,144
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.
['n = int(input())\ns = 0\nfor i in range(1, n//2 + 1):\n if n % i == 0:\n s.append(max(len(str(i)), len(str(n//i))))\nprint(min(s))', 'n = int(input())\nfor i in range(int(n**0.5), 0, -1):\n if n % i == 0:\n print(n//i)\n break', 'n = int(input())\nfor i in range(int(n**0.5), 0, -1):\n if n % i == 0:\n print(len(str(n//i)))\n break']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s223489197', 's239485992', 's534003966']
[9168.0, 9396.0, 9360.0]
[28.0, 39.0, 38.0]
[129, 95, 105]
p03775
u469063372
2,000
262,144
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.
['import math\nn = int(input())\n\ndef is_prime(n):\n for i in range(2, n + 1):\n if i * i > n:\n break\n if n % i == 0:\n return False\n return n != 1\n\ndef prime_decomposition(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n /= i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\n\nsq = math.sqrt(n)\nif sq.is_integer():\n ansInt = sq\n\nif is_prime(n):\n ansInt = n\nelse:\n ansInt = prime_decomposition(n)\nprint(len(str(int(max(ansInt)))))', 'n = int(input())\nans = len(str(n))\na = 0\nwhile a**2 <= n:\n a += 1\n if n % a != 0:\n continue\n b = n // a\n cur = max(len(str(a)), len(str(b)))\n if ans > cur:\n ans = cur\nprint(ans)']
['Runtime Error', 'Accepted']
['s794641111', 's302382594']
[3064.0, 3060.0]
[52.0, 63.0]
[564, 206]
p03775
u489108157
2,000
262,144
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.
['n=int(input())\na=int((n+1)/2)\nans=1\nwhile True:\n a=int(a/10)\n if a==0:\n break\n ans+=1\nprint(ans)', 'import math\nn=int(input())\nans=100\nfor i in range(1, int(math.sqrt(n))+1):\n if n%i != 0:\n continue\n b=n/i\n dig=1\n while True:\n b=int(b/10)\n if b==0:\n break\n dig+=1\n if ans>dig:\n ans=dig\nprint(ans)']
['Wrong Answer', 'Accepted']
['s752571744', 's816626511']
[2940.0, 3060.0]
[17.0, 30.0]
[112, 257]
p03775
u492532572
2,000
262,144
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.
['import math\n\nN = int(input())\nmin_f = 10\nfor n in range(1, int(math.sqrt(N))):\n a = n\n if N % n != 0:\n continue\n b = N / n\n f = max(len(str(a)), len(str(b)))\n min_f = min(min_f, f)\nprint(min_f)', 'import math\n\nN = int(input())\nmin_f = 10\nfor n in range(1, math.sqrt(N)):\n a = n\n if N % n != 0:\n continue\n b = N / n\n f = max(len(str(a)), len(str(b)))\n min_f = min(min_f, f)\nprint(min_f)', 'import math\n\nN = int(input())\nmin_f = 10\nfor n in range(1, int(math.sqrt(N)) + 1):\n a = n\n if N % n != 0:\n continue\n b = int(N / n)\n f = max(len(str(a)), len(str(b)))\n min_f = min(min_f, f)\nprint(min_f)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s296764262', 's440687378', 's773225042']
[3060.0, 3060.0, 3060.0]
[36.0, 17.0, 34.0]
[215, 210, 224]
p03775
u494058663
2,000
262,144
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.
['import math\n\nN = int(input())\nA = []\nB = []\nF = []\nfor i in range(1,N/2):\n if (N%i)== 0:\n A.append(N/i)\n B.append(i)\nfor i in range(len(A)):\n count_A = int(math.log10(A[i])+1)\n count_B = int(math.log10(B[i])+1)\n if count_A >= count_B:\n F.append(count_A)\n else:\n F.append(count_B)\nprint(min(F))\n', 'import math\n\nN = int(input())\nA = []\nB = []\nF = []\n\nfor i in range(1,int(math.sqrt(N))+1,1):\n if (N%i)== 0:\n A.append(N/i)\n B.append(i)\nfor i in range(len(A)):\n count_A = int(math.log10(A[i])+1)\n count_B = int(math.log10(B[i])+1)\n if count_A >= count_B:\n F.append(count_A)\n else:\n F.append(count_B)\nprint(min(F))\n']
['Runtime Error', 'Accepted']
['s655313155', 's763951146']
[3188.0, 3064.0]
[20.0, 31.0]
[337, 356]
p03775
u496744988
2,000
262,144
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.
['n=int(input())\nans = len(str(n))\nl = [ i for i in range(1,n+1) if i*i < n]\nfor a in l:\n if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))\n ans = max(len(str(a)),len(str(int(n / a))))\nprint(ans)', 'import math\nn=int(input())\nans = len(str(n))\nfor a in range(1,int(math.sqrt(n)+1)):\n if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))\n ans = max(len(str(a)),len(str(int(n / a))))\nprint(ans)', 'import math\nn=int(input())\nans = len(str(n))\n# print(int(math.sqrt(n)))\nfor a in range(1,int(math.sqrt(n)+1)):\n # print(a,n/a,n % a)\n if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))\n ans = max(len(str(a)),len(str(int(n / a))))\nprint(ans)', 'import math\nn=int(input())\nk = math.floor(math.sqrt(n))\nfor a in range(k+1,0,-1):\n if n % a == 0:\n print(max(len(str(a)),len(str(n//a))))\n break\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s112699653', 's262186076', 's328087897', 's949634564']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 32.0, 17.0, 29.0]
[215, 212, 264, 162]
p03775
u501643136
2,000
262,144
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.
['def getdigit(N):\n cnt = 0\n while(N>0):\n cnt++\n N //= 10\n return cnt\n\nN = int(input())\nfor i in reversed(range(1,sqrt(N)+1)):\n if(N % i == 0):\n print(max(getdigit(i), getdigit(N/i)))\n exit()\n \n \n', 'def getdigit(N):\n cnt = 0\n while(N>0):\n cnt += 1\n N //= 10\n return cnt\n\nN = int(input())\nfor i in reversed(range(1,int(pow(N, 1/2))+1)):\n if(N % i == 0):\n print(max(getdigit(i), getdigit(N/i)))\n exit()']
['Runtime Error', 'Accepted']
['s906554691', 's006718646']
[2940.0, 3060.0]
[17.0, 30.0]
[220, 217]
p03775
u502389123
2,000
262,144
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.
['\ndef trial_division(n):\n \n factor = []\n \n tmp = int(n ** 0.5) + 1\n for num in range(2, tmp):\n while n % num == 0:\n n //= num\n factor.append(num)\n\n if n > 1:\n factor.append(n)\n\n return factor\n\nN = int(input())\na = trial_division(N)\nif len(a) == 1:\n a.append(1)\na.sort()\nl = len(a)\nb = []\nc = []\nseki1 = 1\nseki2 = 1\nfor i in range(l):\n seki1 *= a[i]\n seki2 *= a[l-1-i]\n b.append(seki1)\n c.append(seki2)\n\nans = 10 ** 9\nfor i in range(l-1):\n F = max(b[i], c[l-2-i])\n ans = min(ans, len(str(F)))\n\nprint(a)\nprint(b)\nprint(c)\nprint(ans)\n', '\ndef make_divisor(n):\n divisor = []\n for i in range(1, int(n ** 0.5) + 1):\n if n % i == 0:\n divisor.append(i)\n divisor.append(n)\n return divisor\n\nN = int(input())\na = make_divisor(N)\n\nans = 100\nfor i in range(len(a)):\n F = max(len(str(a[i])), len(str(N // a[i])))\n ans = min(ans, F)\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s447056649', 's839766128']
[3064.0, 3188.0]
[28.0, 27.0]
[715, 347]
p03775
u503283842
2,000
262,144
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.
["n=int(input())\nf=[]\nfor i in range(1,int(n**0.5)+1):\n if n%i==0:\n f.append(i)\n f.append(int(n/i))\nprint(f)\nif n==1:\n print('1')\nelse:\n print(len(str(f[-1])))\n", "n=int(input())\nf=[]\nfor i in range(1,int(n**0.5)+1):\n if n%i==0:\n f.append(i)\n f.append(int(n/i))\nif n==1:\n print('1')\nelse:\n print(len(str(f[-1])))"]
['Wrong Answer', 'Accepted']
['s595688802', 's283251696']
[3060.0, 3060.0]
[32.0, 31.0]
[181, 171]
p03775
u508405635
2,000
262,144
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.
['N = input()\n\n\ndef F(A, B):\n A = str(A)\n B = str(B)\n if len(A) >= len(B):\n return len(A)\n else:\n return len(B)\n\nminimumList = []\nfor a in range(1, int(N)+1):\n if int(N) % a == 0:\n b = int(N) / a\n minimumList.append(F(int(a), b))\nprint(min(minimumList))', 'N = int(input())\n\n\ndef F(A, B):\n A = str(A)\n B = str(B)\n if len(A) >= len(B):\n return len(A)\n else:\n return len(B)\n\nminimumList = []\nfor a in range(1, int(N**0.5) + 1):\n if N % a == 0:\n b = N // a \n minimumList.append(F(a, b))\nprint(min(minimumList))']
['Wrong Answer', 'Accepted']
['s720803876', 's167455074']
[3060.0, 3064.0]
[2110.0, 30.0]
[318, 323]
p03775
u513900925
2,000
262,144
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.
['N = input()\nM = int(N**0.5//1)\nS = list()\nfor i in range(M+1):\n if i > 0 :\n if N%i == 0:\n S.append(i)\na = S[-1]\nb = N//a\nprint(len(str(a))+len(str(b)))', 'import math\n\nN = 25\nM = int(N**0.5//1)\nS = list()\nfor i in range(M+1):\n if i > 0 :\n if N%i == 0:\n S.append(i)\na = S[-1]\nb = N//a\nprint(max(len(str(a)),len(str(b))))', 'import math\n\nN = int(input())\nM = int(N**0.5//1)\nS = list()\nfor i in range(M+1):\n if i > 0 :\n if N%i == 0:\n S.append(i)\na = S[-1]\nb = N//a\nprint(len(str(a))+len(str(b)))\n', 'N = map(int,input())\nM = int(N**0.5//1)\nS = list()\nfor i in range(M+1):\n if i > 0 :\n if N%i == 0:\n S.append(i)\na = S[-1]\nb = N//a\nprint(len(str(a))+len(str(b)))', 'import math\n\nN = int(input())\nM = int(N**0.5//1)\nS = list()\nfor i in range(M+1):\n if i > 0 :\n if N%i == 0:\n S.append(i)\na = S[-1]\nb = N//a\nprint(max(len(str(a)),len(str(b))))']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s199378342', 's330740324', 's423817623', 's474368466', 's703431041']
[3060.0, 3060.0, 3060.0, 3064.0, 3060.0]
[18.0, 17.0, 38.0, 18.0, 35.0]
[171, 184, 190, 180, 194]
p03775
u514678698
2,000
262,144
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.
['n = int(input())\n\ni = 1\na = n\nb = i\n\nwhile i <= min(n,10**5) and a < b:\n\tif n % i == 0:\n\t\ta = i\n\t\tb = n // i\n\ti += 1\nprint(len(str(b)))', 'import math\nn = int(input())\na = 1\nb = n\n\nfor i in range(1, int(math.sqrt(n))+1):\n\tif n % i == 0:\n\t\ta = i\n\t\tb = n // i\nprint(len(str(b)))']
['Wrong Answer', 'Accepted']
['s123587929', 's039149499']
[9132.0, 9168.0]
[29.0, 43.0]
[135, 137]
p03775
u514894322
2,000
262,144
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.
['n = int(input())\nans = 99\nfor i in range(int(n**0.5),0,-1):\n if n%i==0:\n ans = min([ans,len(str(n//i))+len(str(i))])\nprint(ans)', 'n = int(input())\nans = 11\nfor i in range(int(n**0.5),0,-1):\n if n%i==0:\n ans = min([ans,len(str(n//i))])\nprint(ans)']
['Wrong Answer', 'Accepted']
['s229266140', 's527759956']
[2940.0, 2940.0]
[33.0, 33.0]
[131, 119]
p03775
u515128734
2,000
262,144
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.
['from math import log10\n\nN = int(input())\n\nans = int(log10(N)) + 1\n\nfor i in range(2, int(N ** 0.5) + 1):\n if N % i == 0:\n tmp = int(log10(N // i)) + 1\n if tmp < ans:\n ans = tmp\n print(tmp)\n\nprint(ans)', 'from math import log10\n\nN = int(input())\n\nans = int(log10(N)) + 1\n\nfor i in range(2, int(N ** 0.5) + 1):\n if N % i == 0:\n tmp = int(log10(N // i)) + 1\n if tmp < ans:\n ans = tmp\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s791441309', 's486002210']
[9404.0, 9380.0]
[42.0, 42.0]
[239, 216]
p03775
u518042385
2,000
262,144
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.
['n=int(input())\nm=0\nfor i in range(1,int((n)**(1/2))+1):\n if n%i==0:\n num1=i\n num2=n//i\n l1=len(str(num1))\n l2=len(str(num2))\n if m>max(l1,l2):\n m=max(l1,l2)\nprint(m)', 'n=int(input())\nm=100000000000\nfor i in range(1,int((n)**(1/2))+1):\n if n%i==0:\n num1=i\n num2=n//i\n l1=len(str(num1))\n l2=len(str(num2))\n m1=max(l1,l2)\n if m>m1:\n m=m1\nprint(m)\n']
['Wrong Answer', 'Accepted']
['s010389890', 's836938947']
[3060.0, 3060.0]
[31.0, 30.0]
[186, 200]
p03775
u519939795
2,000
262,144
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.
['n = int(input())\nans = []\na = 0\nfor i in range(n+1):\n for j in range(n+1):\n if n == int(i)*int(j):\n a == i*j\n ans.append(a)\nprint(ans)\nprint(min(ans))', 'import math\nN = int(input())\nn = math.ceil(math.sqrt(N))\nA = 1\nB = N\nfor i in range(n+1):\n A = n-i\n if N%A==0:\n B = N//A\n break\n\nprint(len(str(B)))']
['Wrong Answer', 'Accepted']
['s878532600', 's754100564']
[2940.0, 3060.0]
[2104.0, 37.0]
[182, 155]
p03775
u541883958
2,000
262,144
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.
['import math\ndef keta(n):\n return len(str(n))\n\nn = int(input())\nr = keta(n)\nfor a in range(1, int(math.sqrt(n))+1):\n b = n / a\n if n % a == 0:\n r = min(r, max(keta(a), keta(b)))\n else:\n continue\nprint(r)', 'import math\ndef keta(n):\n r = 1\n _n = n\n while _n != 0 :\n _n = _n // 10\n if _n > 0:\n r +=1\n return r\nn = int(input())\nr = keta(n)\nfor a in range(1, int(math.sqrt(n))):\n b = n / a\n if n % a == 0:\n print(b)\n r = min(r, max(keta(a), keta(b)))\n else:\n continue\nprint(r)', 'import math\ndef keta(n):\n return len(str(n))\n\nn = int(input())\nr = keta(n)\nfor a in range(1, int(math.sqrt(n))+1):\n b = n / a\n if n % a == 0:\n r = min(r, max(keta(a), keta(b)))\n else:\n continue\nprint(r)', '\nimport math\ndef keta(n):\n r = 1\n _n = n\n while _n != 0 :\n _n = _n // 10\n if _n > 0:\n r +=1\n return r\nn = int(input())\nr = keta(n)\nfor a in range(1, int(math.sqrt(n))):\n b = n / a\n if n % a == 0:\n print(b)\n r = min(r, max(keta(a), keta(b)))\n else:\n continue\nprint(r)', 'import math\ndef keta(n):\n r = 1\n _n = n\n while _n != 0 :\n _n = _n // 10\n if _n > 0:\n r +=1\n return r\nn = int(input())\nr = keta(n)\nfor a in range(1, int(math.sqrt(n))+1):\n b = n / a\n if n % a == 0:\n r = min(r, max(keta(a), keta(b)))\nprint(r)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s492291434', 's548496849', 's571413998', 's624143936', 's092589421']
[3060.0, 3316.0, 3060.0, 3188.0, 3060.0]
[39.0, 40.0, 41.0, 42.0, 39.0]
[228, 332, 228, 333, 290]
p03775
u542932305
2,000
262,144
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.
['N = int(input())\n\nfor i in range(math.ceil(math.sqrt(N)), 0, -1):\n if N % i == 0:\n print(len(str(N//i)))\n break', 'import math\nN = int(input())\n\nfor i in range(int(math.sqrt(N)), 0, -1):\n if N % i == 0:\n print(len(str(N//i)))\n break']
['Runtime Error', 'Accepted']
['s797886600', 's816046158']
[2940.0, 3060.0]
[17.0, 30.0]
[128, 134]
p03775
u546440137
2,000
262,144
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.
['import math\n\nN = int(input())\n\ndef f(a,b):\n if len(str(a)) < len(str(b)):\n return len(str(b))\n else:\n return len(str(a))\n\nans = 100000000000\nfor i in range(1,math.sqrt(N)+1):\n if N % i == 0:\n ans = min(ans,f(i,N//i))\nprint(ans)\n \n ', 'N = int(input())\n\ndef f(a,b):\n if len(str(a)) < len(str(b)):\n return len(str(b))\n else:\n return len(str(a))\n\nans = 100000000000\nfor i in range(1,N**(1/2)):\n if N % i == 0:\n ans = min(ans,f(i,N//i))\nprint(ans)', 'import math\n\nN = int(input())\n\ndef f(a,b):\n if len(str(a)) < len(str(b)):\n return len(str(b))\n else:\n return len(str(a))\n\nans = 100000000000\nfor i in range(1,int(math.sqrt(N)+1)):\n if N % i == 0:\n ans = min(ans,f(i,N//i))\nprint(ans)\n ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s349973801', 's482725352', 's060688301']
[9112.0, 9332.0, 9084.0]
[25.0, 24.0, 42.0]
[275, 238, 271]
p03775
u549161102
2,000
262,144
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.
['import math\nN = int(input())\nm = int(math.sqrt(N)+1)\nprint(m)\nfor i in range(m):\n if N % (m-i) == 0:\n j = int(N/(m-i))\n num = len(str(j))\n break\nprint(num)', 'import math\nN = int(input())\nm = int(math.sqrt(N)+1)\nprint(m)\nfor i in range(m):\n if N % (m-i) == 0:\n j = int(N/(m-i))\n num = len(str(j))\n break\nprint(num)\n', 'import math\nN = int(input())\nm = int(math.sqrt(N)+1)\nfor i in range(m):\n if N % (m-i) == 0:\n j = int(N/(m-i))\n num = len(str(j))\n break\nprint(num)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s000663932', 's345000820', 's262373627']
[3060.0, 2940.0, 2940.0]
[35.0, 35.0, 32.0]
[165, 166, 157]
p03775
u557437077
2,000
262,144
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.
['\n\ndef factorization(n):\n R = int(n)\n s = 0\n L = []\n div = 2\n while s == 0:\n for i in range(div, R + 1):\n if n % i == 0:\n n = n / i\n div = i\n if n == 1:\n s = 1\n L.append(i)\n break\n return L\n\n\nn = int(input())\nif n == 1:\n print(1)\n exit()\ndivs = factorization(n)\nN = [i for i in divs] \nmaxDigit = n\n\nprint(N)\nfor i in range(1, 1 << len(N)):\n # output = []\n # nonout = []\n outNum = 1\n nonOutNum = 1\n for j in range(len(N)):\n if ((i >> j) & 1) == 1:\n \n outNum *= N[j]\n # else:\n # nonout.append(N[j])\n \n # print("{} vs {}".format(outNum, nonOutNum))\n nonOutNum = int(n/outNum)\n digitOut = 0\n digitNonOut = 0\n while outNum > 0:\n digitOut += 1\n outNum = int(outNum / 10)\n while nonOutNum > 0:\n digitNonOut += 1\n nonOutNum = int(nonOutNum / 10)\n if max(digitOut, digitNonOut) < maxDigit:\n maxDigit = max(digitOut, digitNonOut)\nprint(maxDigit)\n', '\n\ndef factorize(n):\n fct = [] \n b, e = 2, 0 \n while b * b <= n:\n while n % b == 0:\n n = n // b\n e = e + 1\n if e > 0:\n fct.append((b, e))\n b, e = b + 1, 0\n if n > 1:\n fct.append((n, 1))\n return fct\n\n\ndef divisorize(fct):\n b, e = fct.pop() \n pre_div = divisorize(fct) if fct else [[]]\n suf_div = [[(b, k)] for k in range(e + 1)]\n return [pre + suf for pre in pre_div for suf in suf_div]\n\n\ndef num(fct):\n a = 1\n for base, exponent in fct:\n a = a * base ** exponent\n return a\n\nn = int(input())\nif n == 1:\n print(1)\n exit()\nfct = factorize(n)\nmaxDigit = n\nfor div in divisorize(fct):\n outNum = num(div)\n nonOutNum = int(n/outNum)\n digitOut = 0\n digitNonOut = 0\n while outNum > 0:\n digitOut += 1\n outNum = int(outNum / 10)\n while nonOutNum > 0:\n digitNonOut += 1\n nonOutNum = int(nonOutNum / 10)\n if max(digitOut, digitNonOut) < maxDigit:\n maxDigit = max(digitOut, digitNonOut)\nprint(maxDigit)\n']
['Wrong Answer', 'Accepted']
['s593900623', 's459301569']
[3064.0, 3444.0]
[2104.0, 37.0]
[1325, 1178]
p03775
u559823804
2,000
262,144
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.
['from math import sqrt\nfrom math import log10\nn=int(input())\n\ni=1\nans=13\nj=0\n\nwhile i<=sqrt(n):\n if n%i==0:\n j=n//i\n ans=int(min(ans,max(log10(i)+1,log10(j)+1)))\n print(i,j)\n i+=1\nif j==0:\n ans=int(max(log10(i)+1,log10(j)+1))\nprint(ans)\n \n\n', 'from math import sqrt\nfrom math import log10\nn=int(input())\n\ni=1\nans=13\nj=0\n\nwhile i<=sqrt(n):\n if n%i==0:\n j=n//i\n ans=int(min(ans,max(log10(i)+1,log10(j)+1)))\n i+=1\nif j==0:\n ans=int(max(log10(i)+1,log10(j)+1))\nprint(ans)\n \n\n']
['Wrong Answer', 'Accepted']
['s997073771', 's186442804']
[3316.0, 3060.0]
[65.0, 60.0]
[272, 253]
p03775
u569272329
2,000
262,144
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.
['from math import sqrt\n\nN = int(input())\nans = len(str(N))\nfor i in range(1, int(sqrt(N))+1):\n if N % i == 0:\n B = N//i\n else:\n B = 0\n ans = min(ans, max(len(str(i)), len(str(B))))\nprint(ans)\n', 'from math import sqrt\n\nN = int(input())\nans = len(str(N))\nfor i in range(1, int(sqrt(N))+1):\n if N % i == 0:\n B = N//i\n ans = min(ans, max(len(str(i)), len(str(B))))\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s994844309', 's025421967']
[3060.0, 3060.0]
[120.0, 31.0]
[214, 194]
p03775
u575251582
2,000
262,144
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.
['def f(a, b):\n str_a = str(a)\n len_a = len(str_a)\n str_b = str(b)\n len_b = len(str_b)\n\n return len_a if len_a > len_b else len_b\n\nN = int(input())\n\nmin = 10**10\nfor i in range(1, N//2 + 1):\n a = i\n if N % a == 0:\n b = int(N / a)\n else:\n continue\n\n if len(str(a)) > len(str(N)) // 2 + 1:\n break\n\n ret = f(a, b)\n if min > ret:\n print(a, b, min, ret)\n min = ret\n\nprint(min)\n', 'def f(a, b):\n str_a = str(a)\n len_a = len(str_a)\n str_b = str(b)\n len_b = len(str_b)\n\n return len_a if len_a > len_b else len_b\n\nN = int(input())\n\nmin = 10**10\nmax_iter = 10 ** (len(str(N))//2 + 1)\n\nfor i in range(1, max_iter):\n a = i\n if N % a == 0:\n b = int(N / a)\n else:\n continue\n\n ret = f(a, b)\n if min > ret:\n min = ret\n if min <= len(str(N))//2:\n break\n\nprint(min)\n']
['Wrong Answer', 'Accepted']
['s116061833', 's909834103']
[9052.0, 9160.0]
[2206.0, 177.0]
[438, 441]
p03775
u581309643
2,000
262,144
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.
['def prime_decomposition(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n //= i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\n\nN = int(input())\nif N = 1:\n print(1)\nelse:\n table = prime_decomposition(N)\n digN = len(str(N))\n digMaxEle = len(str(table[-1]))\n if digN / 2 < digMaxEle:\n print(digMaxEle)\n else:\n print(digN//2 + digN%2)\n', 'N = int(input())\n\ndef count_digit(N):\n return(len(str(N)))\n\nans = count_digit(N)\n\nA = 1\nwhile (A * A <= N):\n if N%A != 0: pass\n else:\n B = N//A\n curDig = max(count_digit(A), count_digit(B))\n ans = min(ans, curDig)\n A += 1\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s268146298', 's388144461']
[2940.0, 3060.0]
[17.0, 69.0]
[423, 262]
p03775
u588081069
2,000
262,144
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.
['import math\n\nN = int(input())\n\nmin_l = len(str(N))\n\nif type(math.sqrt(N)) is int:\n for i in range(1, int(math.sqrt(N))):\n if N % i == 0:\n j = int(N / i)\n min_l = min(min_l, max(len(str(i)), len(str(j))))\n print(min_l)\nelse:\n print(min_l)\n', 'import math\n\nN = int(input())\n\nmin_l = len(str(N))\n\nfor i in range(1, int(math.sqrt(N)) + 1):\n if N % i == 0:\n j = int(N / i)\n min_l = min(min_l, max(len(str(i)), len(str(j))))\nprint(min_l)\n']
['Wrong Answer', 'Accepted']
['s474083729', 's205801906']
[3060.0, 3060.0]
[18.0, 30.0]
[276, 207]
p03775
u591287669
2,000
262,144
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.
['import math\nn = int(input())\nnn = int(math.sqrt(n))\nfor i in range(nn,n+1):\n if n%i==0:\n print(len(str(i)))\n break\nprint(0)\n', 'import math\nn = int(input())\nnn = int(math.sqrt(n))\nfor i in range(nn,0,-1):\n if n%i==0:\n print(len(str(n//i)))\n break\n']
['Wrong Answer', 'Accepted']
['s720457727', 's336229083']
[2940.0, 2940.0]
[2104.0, 30.0]
[141, 136]
p03775
u597455618
2,000
262,144
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.
['n = int(input())\nans = n\nfor i in range(int(n**(1/2))):\n if i * (n-i) == n:\n ans = min(ans, i, n-i)\nprint(ans)', 'n = int(input())\nans = len(str(n))\nfor i in range(1, int(n**(1/2))+1):\n if n%i == 0:\n ans = min(ans, max(len(str(i)), len(str(n//i))))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s531587658', 's357812674']
[2940.0, 3060.0]
[39.0, 33.0]
[114, 149]
p03775
u607865971
2,000
262,144
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.
['N = int(input())\n\ndivList = []\n\nn = N\n\nwhile n != 1:\n if n % 2 == 0:\n n = n // 2\n divList.append(2)\n continue\n if n % 3 == 0:\n n = n // 3\n divList.append(3)\n continue\n\n newN = n\n isFind = False\n for i in range(6, (n**(1/2)) + 1, 6):\n if n % (i - 1) == 0:\n divList.append(i - 1)\n newN = newN // (i - 1)\n isFind = True\n if n % (i + 1) == 0:\n divList.append(i + 1)\n newN = newN // (i + 1)\n isFind = True\n\n if isFind == True:\n break\n\n if isFind == False:\n divList.append(n)\n newN = 1\n n = newN\n\n # print(divList)\n\n# print(divList)\n\nt = [([1], [1])]\n\nfor d in divList:\n newT = []\n for ab in t:\n a, b = ab[0], ab[1]\n a_add = a[:]\n a_add.append(d)\n b_add = b[:]\n b_add.append(d)\n\n newT.append((a, b_add))\n newT.append((a_add, b))\n t = newT\n\n# print(t)\n\nfrom functools import reduce\n\na1 = [(reduce(lambda a, b:a * b, ab[0]), reduce(lambda a, b:a * b, ab[1]))\n for ab in t]\n# print(a1)\n\n\na2 = set([(len(str(ab[0])), len(str(ab[1]))) for ab in a1])\n\n# print(a2)\n\na3 = [max(ab[0], ab[1]) for ab in a2]\n\n# print(a3)\n\nprint(min(a3))\n', 'N = int(input())\n\n\ndef countDigits(n):\n return len(str(n))\n\n\nans = countDigits(N)\nA = 1\nwhile A * A <= N:\n if(N % A != 0):\n A += 1\n continue\n B = N // A\n\n cur = max(countDigits(A), countDigits(B))\n if (ans > cur):\n ans = cur\n A += 1\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s184984244', 's675580663']
[3572.0, 3060.0]
[22.0, 46.0]
[1261, 283]
p03775
u620868411
2,000
262,144
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.
['# -*- coding: utf-8 -*-\nimport math\nn = int(input())\nnn = n\n\nprimes = []\nx = 2\nwhile x*x<=n:\n if n%x==0:\n primes.append(x)\n x += 1\n\n\n\ndef digit(x):\n return math.ceil(math.log10(x))\n\nres = digit(nn)\nfor i in range(len(primes)):\n a = primes[i]\n b = n//a\n t = max(digit(a), digit(b))\n # print(a,b,t)\n res = min(res, t)\n\nprint(res)\n', '# -*- coding: utf-8 -*-\nimport math\nn = int(input())\n\nif n==1:\n print(1)\n exit()\nprimes = []\nx = 2\nwhile x*x<=n:\n if n%x==0:\n primes.append(x)\n primes.append(n//x)\n x += 1\n\n\n\ndef digit(x):\n return math.ceil(math.log10(x)) + (1 if x%10==0 else 0)\n\nres = digit(n)\nfor i in range(len(primes)):\n a = primes[i]\n b = n//a\n t = max(digit(a), digit(b))\n # print(a,b,t)\n res = min(res, t)\n\nprint(res)\n']
['Wrong Answer', 'Accepted']
['s506761804', 's325993042']
[3064.0, 3064.0]
[44.0, 48.0]
[374, 451]
p03775
u623814058
2,000
262,144
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.
['N = int(input())\n\nans = 10**18\n\nfor i in range(1, int(N**0.5)+1):\n if N % i == 0:\n b = N//i\n print(b, i)\n ans = min(ans, max( len(str(i)), len(str(b))))\nprint(ans)', 'N = int(input())\n\nans = 10**18\n\nfor i in range(1, int(N**0.5)+1):\n if N % i == 0:\n b = N//i\n ans = min(ans, max( len(str(i)), len(str(b))))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s390249282', 's784773971']
[9440.0, 9216.0]
[41.0, 41.0]
[188, 168]
p03775
u624475441
2,000
262,144
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.
['F=lambda*m:max(len(str(x))for x in m);print(m)\nN=int(input())\nprint(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)\nN=int(input())\nprint(min(F(x,N//x)for x in range(1,int(N**.5)+1)if N%x==0))']
['Runtime Error', 'Accepted']
['s147756019', 's543062976']
[2940.0, 3060.0]
[17.0, 28.0]
[122, 113]
p03775
u626000772
2,000
262,144
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.
['ans = 100000000000000000\nN = int(input())\nfor A in range(1, int(N / 2)+1):\n if N % A == 0:\n B = str(int(N / A))\n A = str(A)\n AL = len(A)\n BL = len(B)\n m = min(AL, BL)\n if ans > m :\n ans = m\n \nprint(ans)', 'from math import sqrt, log10\nans = 100000000000000000\nN = int(input())\nfor i in range(1, int(sqrt(N)+1)) :\n print(i)\n A = i\n B = int(N / A)\n if N % A == 0:\n print(A)\n print(B)\n if A > B :\n m = int(log10(A)) + 1\n else :\n m = int(log10(B)) + 1\n print(m)\n if m < ans :\n ans = m\n \nprint(ans)\n', 'from math import sqrt, log10\nans = 100000000000000000\nN = int(input())\nfor i in range(1, int(sqrt(N))+1) :\n A = i\n B = int(N / A)\n if N % A == 0:\n if A >= B :\n m = int(log10(A)) + 1\n else :\n m = int(log10(B)) + 1\n if m < ans :\n ans = m\n #print(ans)\n \nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s688673409', 's785084174', 's276202985']
[3064.0, 3920.0, 3060.0]
[2104.0, 134.0, 56.0]
[295, 415, 376]
p03775
u626337957
2,000
262,144
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.
['N = int(input())\nlast = N\nfor num in range(1, N):\n if num**2 > N:\n print(len(str(last)))\n break\n elif num**2 == N:\n print(len(str(num)))\n break\n else\n if N%num == 0:\n last = N//num\n ', 'N = int(input())\nlast = N\nfor num in range(1, N+1):\n if num**2 > N:\n print(len(str(last)))\n break\n elif num**2 == N:\n print(len(str(num)))\n break\n else:\n if N%num == 0:\n last = N//num\n \n']
['Runtime Error', 'Accepted']
['s451889657', 's328658656']
[2940.0, 2940.0]
[17.0, 98.0]
[208, 212]
p03775
u626467464
2,000
262,144
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.
['import math\nn = int(input())\nroot = math.ceil(math.sqrt(n))\nnums = []\nfor i in range(1,root+1):\n if n % i == 0:\n count_i = len(str(i))\n count_j = len(str(j))\n ans = max(count_i,count_j) \n nums.append(ans) \nnummm = sorted(nums,reverse = True)\nprint(nummm[0])', 'import math\nn = int(input())\nroot = math.ceil(math.sqrt(n))\nnums = []\nfor i in range(1,root+1):\n if n % i == 0:\n count_i = len(str(i))\n count_j = len(str(int(n/i)))\n ans = max(count_i,count_j) \n nums.append(ans) \nprint(min(nums))\n']
['Runtime Error', 'Accepted']
['s790339719', 's008190349']
[3064.0, 3060.0]
[18.0, 30.0]
[271, 244]
p03775
u637824361
2,000
262,144
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.
['import math\n\ndef alldiv(x):\n div = [[1,x]]\n for i in range(2,math.floor(math.sqrt(x))+1):\n if x % i == 0:\n div.append([i, x//i])\n return div\n\n\ndef digit(N):\n d = 0\n while(N > 0):\n N //= 10\n d += 1\n return d\n\n\nN = int(input())\ndiv = alldiv(N)\nprint(div)\nF = [max(digit(i[0]),digit(i[1])) for i in div]\nprint(min(F))\n\n', 'import math\n\ndef alldiv(x):\n div = [[1,x]]\n for i in range(2,math.floor(math.sqrt(x))+1):\n if x % i == 0:\n div.append([i, x//i])\n return div\n\n\ndef digit(N):\n d = 0\n while(N > 0):\n N //= 10\n d += 1\n return d\n\n\nN = int(input())\ndiv = alldiv(N)\n#print(div)\nF = [max(digit(i[0]),digit(i[1])) for i in div]\nprint(min(F))\n\n']
['Wrong Answer', 'Accepted']
['s489506199', 's324454539']
[3188.0, 3188.0]
[29.0, 32.0]
[366, 367]
p03775
u659100741
2,000
262,144
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.
['import math\n\nN = int(input())\nanswer = []\nb = 0\nfor a in range(1,round(sqrt(N))+1):\n if N%a == 0:\n b = N//a\n answer.append(max(len(str(a)), len(str(b))))\nprint(min(answer))\n', 'N = int(input())\nanswer = []\nanswer.append(1)\nb = 0\nfor a in range(1,round(abs(N))):\n if N%a == 0:\n b = N//a\n answer.append(max(len(str(a)), len(str(b))))\nprint(min(answer))\n', 'N = int(input())\nanswer = []\nanswer.append(1)\nb = 0\nfor a in range(1,round(abs(N))+1):\n if N%a == 0:\n b = N//a\n answer.append(max(len(str(a)), len(str(b))))\nprint(min(answer))\n', 'N = int(input())\nanswer = 1000\nb = 0\nfor a in range(round(abs(N))):\n if N&a == 0:\n b = N/a\n if answer < min(len(str(a)), len(str(b))):\n answer = min(len(str(a)), len(str(b)))\nprint(answer)', 'N = int(input())\nanswer = 1000\nfor a in range(round(abs(N))):\n if N&a == 0:\n b = N/a\n if answer < min(len(str(a)), len(str(b))):\n answer = min(len(str(a)), len(str(b)))\nprint(answer)', 'import math\nN = int(input())\nans = []\nfor i in range(1,round(math.sqrt(N))+1):\n if N%i == 0:\n ans.append(max(len(str(N//i)),len(str(i))))\nprint(min(ans))\n']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s157109569', 's411343132', 's505280894', 's651894420', 's845731308', 's265981319']
[3060.0, 3064.0, 2940.0, 3060.0, 3060.0, 2940.0]
[17.0, 2104.0, 2104.0, 17.0, 17.0, 33.0]
[180, 181, 183, 200, 194, 164]
p03775
u666198201
2,000
262,144
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.
['import math\nimport fractions\nN=int(input())\nA=fractions.sqrt(N)\nA=fractions.ceil(A)\nmini=100000000000\nfor i in range(1,A+1):\n if N%i==0:\n x=len(str(i))\n y=len(str(N//i))\n if mini>max(x,y):\n mini=max(x,y)\nprint(mini)\n', 'import math\nimport fractions\nN=int(input())\nA=math.sqrt(N)\nA=math.ceil(A)\nmini=100000000000\nfor i in range(1,A+1):\n if N%i==0:\n x=len(str(i))\n y=len(str(N//i))\n if mini>max(x,y):\n mini=max(x,y)\nprint(mini)\n']
['Runtime Error', 'Accepted']
['s500601778', 's547418766']
[5564.0, 5052.0]
[44.0, 49.0]
[251, 241]
p03775
u670180528
2,000
262,144
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.
['n=int(input())\nfor i in range(2,int(n**.5)+1):\n\tif n%i==0:\n\t\tprint(len(str(n//i)))\n\t\texit()\nprint(len(str(n)))', 'n=int(input())\nfor i in range(int(0-n**.5//-1),1,-1):\n\tif n%i==0:\n\t\tprint(len(str(n//i)))\n\t\texit()\nprint(len(str(n)))']
['Wrong Answer', 'Accepted']
['s141408839', 's867551278']
[3060.0, 3060.0]
[31.0, 30.0]
[110, 117]
p03775
u671889550
2,000
262,144
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.
["N=int(input())\nans=float('inf')\n\nfor i in range(1,(N+1)//2):\n if N%i==0:\n ans=min(ans,len(str(i)))\nprint(ans)", "N=int(input())\nans=float('inf')\n\nfor i in range(1,(N+1)//2):\n if N%i==0:\n ans=min(ans,len(str(N//i)))\nprint(ans)", "N=int(input())\nans=float('inf')\n\nfor i in range(1,N**0.5+1):\n if N%i==0:\n ans=min(ans,len(str(N//i)))\nprint(ans)", 'N=int(input())\nf=[]\nfor i in range(1,(N+1)//2):\n if N%i==0:\n f.append(min(len(str(i)),len(str(N//i))))\nmax(f)', "N=int(input())\nans=float('inf')\n\nfor i in range(1,int(N**0.5+1)):\n if N%i==0:\n ans=min(ans,len(str(N//i)))\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s039837565', 's232485014', 's311615398', 's764831906', 's986801723']
[8848.0, 9104.0, 9332.0, 8984.0, 9344.0]
[2206.0, 2206.0, 24.0, 2206.0, 43.0]
[123, 126, 122, 119, 127]
p03775
u673101577
2,000
262,144
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.
["# from pprint import pprint\nimport math\n\n# import collections\n\nn = int(input())\n\n\n\n# a = list(map(int, input().split(' ')))\n\n\ndef f(a, b):\n return max(math.ceil(math.log10(a)), math.ceil(math.log10(b)))\n\n\na = 1\nans = 11\nwhile a <= math.sqrt(n):\n if n % a == 0:\n b = n // a\n if n % a == 0 and f(a, b) <= ans:\n ans = f(a, b)\n a += 1\n\nprint(ans)\n", "# from pprint import pprint\nimport math\n\n# import collections\n\nn = int(input())\n\n\n\n# a = list(map(int, input().split(' ')))\n\n\ndef f(a, b):\n return max(math.ceil(math.log10(a)), math.ceil(math.log10(b)))\n\n\na = 1\nans = 11\nwhile a <= math.sqrt(n):\n if n % a == 0 and f(a, n // a) <= ans:\n ans = f(a, n // a)\n a += 1\n\nprint(ans)\n", "# from pprint import pprint\nimport math\n\n# import collections\n\nn = int(input())\n\n\n\n# a = list(map(int, input().split(' ')))\n\n\ndef f(a, b):\n return max(math.floor(math.log10(a)+1), math.floor(math.log10(b))+1)\n\n\na = 1\nans = 11\nwhile a <= math.sqrt(n):\n if n % a == 0 and f(a, n // a) <= ans:\n ans = f(a, n // a)\n a += 1\n\nprint(ans)\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s117999764', 's229760050', 's476939195']
[9260.0, 9292.0, 9096.0]
[56.0, 57.0, 56.0]
[414, 378, 384]
p03775
u677393869
2,000
262,144
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.
['N = int(input())\nmin_num = 10**5\nfor i in range(1, N+1):\n if N % i == 0:\n min_num = min(max(len(i), len(N//i)), min_num)\nprint(min_num)', 'N = int(input())\nmin_num = 10**5\nfor i in range(1, 10**5+1):\n if N % i == 0:\n min_num = min(max(len(str(i)), len(str(N//i))), min_num)\nprint(min_num)']
['Runtime Error', 'Accepted']
['s655699620', 's040901278']
[9168.0, 9064.0]
[26.0, 42.0]
[139, 159]
p03775
u683956577
2,000
262,144
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.
['N = int(input())\n\nx = []\nfor i in range(1, int((N+1)**0.5)+1):\n if N % i == 0:\n x.append(i)\n\ny = int(N/x[-1])\nprint(y)\nprint(len(str(y)))\n', 'N = int(input())\n\nx = []\nfor i in range(1, int((N+1)**0.5)+1):\n if N % i == 0:\n x.append(i)\n\ny = int(N/x[-1])\nprint(len(str(y)))\n']
['Wrong Answer', 'Accepted']
['s339769704', 's325965538']
[3060.0, 3060.0]
[32.0, 33.0]
[142, 133]
p03775
u691501673
2,000
262,144
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.
['import math\n\nN = int(input())\n\nmin_length = -1\nfor i in range(int(math.sqrt(N))):\n for j in range(i + 1):\n A = j + 1\n if N % A == 0:\n B = int(N / A)\n len_a = len(str(A))\n len_b = len(str(B))\n length = len_a if len_a >= len_b else len_b\n if min_length == -1 or length < min_length:\n print("len:{}, A:{}, B:{}".format(length, A, B))\n min_length = length\nprint(min_length)', 'import math\n\nN = int(input())\n\nmin_length = -1\nfor A in range(1, int(math.sqrt(N)) + 1, 1):\n if N % A == 0:\n B = int(N / A)\n len_a = len(str(A))\n len_b = len(str(B))\n length = len_a if len_a >= len_b else len_b\n if min_length == -1 or length < min_length:\n \n min_length = length\nprint(min_length)\n']
['Wrong Answer', 'Accepted']
['s537874231', 's817644255']
[3064.0, 3060.0]
[2104.0, 30.0]
[471, 407]
p03775
u699522269
2,000
262,144
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.
['import math\nN = int(input())\nrt = 0\nA = int(math.sqrt(N))+1\nfor i in range(A,0,-1):\n if N % i == 0:\n rt = len(str(N-i))-len(str(i))\n break\nprint(rt)\n', 'import math\nN = int(input())\nrt = 0\nA = int(math.sqrt(N))\nfor i in range(A,0,-1):\n if N % i == 0:\n rt = len(str(N//i))\n break\nprint(rt)\n']
['Wrong Answer', 'Accepted']
['s387215327', 's623868268']
[9200.0, 9064.0]
[42.0, 41.0]
[162, 149]
p03775
u707870100
2,000
262,144
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.
['# -*- coding: utf-8 -*-\nimport math\n\nn = int(input())\n#tmp = input().split()\n#hoge = list(map(lambda a: int(a), tmp))\n\ntmp= math.ceil(math.sqrt(n))\n\nfor i in range(0,tmp):\n\tif(n%(tmp-i)==0):\n\t\tbreak\n\n#print(tmp-i)\nansn=n//(tmp-i)\n#print(ansn)\nans=math.floor(math.log10(ansn-1)) + 1\n\nprint(ans)\n\n', '# -*- coding: utf-8 -*-\nimport math\n\nn = int(input())\n#tmp = input().split()\n#hoge = list(map(lambda a: int(a), tmp))\n\n\ntmp= math.ceil(math.sqrt(n))\n\nfor i in range(0,n):\n\tif(n%(tmp+i)==0):\n\t\tbreak\n\n#print(tmp+i)\nprint(math.floor(math.log10(tmp+i-1) + 1))\n\n', '# -*- coding: utf-8 -*-\nimport math\n\nn = int(input())\n#tmp = input().split()\n#hoge = list(map(lambda a: int(a), tmp))\n\ntmp= math.ceil(math.sqrt(n))\n\nfor i in range(0,tmp):\n\tif(n%(tmp-i)==0):\n\t\tbreak\n\n#print(tmp-i)\nansn=n//(tmp-i)\n#print(ansn)\nans=math.floor(math.log10(ansn-1)) + 1\n\nprint(ans)\n\n', '# -*- coding: utf-8 -*-\nimport math\n\nn = int(input())\n#tmp = input().split()\n#hoge = list(map(lambda a: int(a), tmp))\n\ntmp= math.ceil(math.sqrt(n))\n#print(n)\n#print(tmp)\nfor i in range(0,tmp):\n\tif(n%(tmp-i)==0):\n\t\tbreak\n\n#print(tmp-i)\nansn=n//(tmp-i)\n#print(ansn)\n#print(math.log10(ansn))\n#print(max(ansn,tmp-i))\n#print(math.floor(0.9))\nans=math.floor(math.log10(max(ansn,tmp-i))) + 1\n\nprint(ans)\n\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s106023570', 's159060279', 's766249013', 's885672948']
[3060.0, 2940.0, 3060.0, 3188.0]
[33.0, 2104.0, 34.0, 34.0]
[295, 257, 295, 398]
p03775
u718949306
2,000
262,144
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.
['N = int(input())\nres = 10**10 + 1\nfor A in range(1, N + 1):\n for B in range(1, A + 1):\n total = A * B\n if total == N:\n a = len(str(A))\n b = len(str(B))\n if a > b:\n num = a\n else:\n num = b\n if res > num:\n res = num\nprint(res)\n', "import math\nN = int(input())\nres = float('Inf')\nM = int(math.sqrt(N))\nfor A in range(1, M+1):\n if N % A == 0:\n B = int(N / A)\n a = len(str(A))\n b = len(str(B))\n c = max(a, b)\n if res > c:\n res = c\nprint(res)"]
['Time Limit Exceeded', 'Accepted']
['s813096869', 's761036305']
[3064.0, 3060.0]
[2104.0, 30.0]
[342, 256]
p03775
u721425712
2,000
262,144
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.
['# ABC 057 C - Digits in Multiplication\n\nn = int(input())\n\ndef F(a, b):\n A = len(str(a))\n B = len(str(b))\n return max(A, B)\n\nans = math.inf\nfor i in range(1, int(n**(1/2))+1):\n j = n / i\n if j%1 == 0:\n j = n // i\n if ans > F(i, j):\n ans = F(i, j)\n \nprint(ans)', 'n = int(input())\n\ndef F(a, b):\n return max(len(str(a)), len(str(b)))\n\nans = 10**10\nfor i in range(1, n**(1/2)+1):\n j = n / i\n if (n/i)%1 == 0:\n j = n // i\n if ans > F(i, j):\n ans = F(i, j)\n \nprint(ans)', 'n = int(input())\n\ndef F(a, b):\n return max(len(str(a)), len(str(b)))\n\nans = 10**10\nfor i in range(1, int(n**(1/2))+1):\n j = n / i\n if (n/i)%1 == 0:\n j = n // i\n if ans > F(i, j):\n ans = F(i, j)\n \nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s049432256', 's355950288', 's174527294']
[3060.0, 3060.0, 3188.0]
[18.0, 18.0, 51.0]
[329, 242, 247]
p03775
u723654028
2,000
262,144
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.
['N = int(input())\n\nscore = len(str(N))\n\ni = 2\nwhile i ** 2 < N:\n a, b = divmod(N, i)\n if b == 0:\n score = len(str(a))\n\ti += 1\nprint(score)\n', 'N = int(input())\n\nscore = len(str(N))\n\ni = 2\nwhile i ** 2 < N:\n a, b = divmod(N, i)\n if b == 0:\n score = len(str(a))\n if score == len(str(i)):\n break\n i = N // (10 ** (score - 1)) - 1\n else:\n i += 1\nprint(score)\n', 'N = int(input())\n\nscore = len(str(N))\n\ni = 2\nwhile i ** 2 < N:\n a, b = divmod(N, i)\n if b == 0:\n score = len(str(a))\n\t\n\ti += 1\nprint(score)\n', 'N = int(input())\n\nscore = len(str(N))\n\ni = 2\nwhile i ** 2 <= N:\n a, b = divmod(N, i)\n if b == 0:\n score = min(score, len(str(a)))\n i += 1\nprint(score)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s009617648', 's117723845', 's901200311', 's667342504']
[2940.0, 3068.0, 2940.0, 2940.0]
[17.0, 2104.0, 17.0, 85.0]
[151, 260, 262, 167]
p03775
u724655543
2,000
262,144
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.
['def fdigit(a,b):\n if len(str(a)) > len(str(b)):\n return len(str(a))\n else:\n return len(str(b))\n\nN = int(input())\nresult = 10000000000\ngoal = int((N**0.5)//1)\n\nfor i in range(1, goal):\n if N%i ==0:\n if result > fdigit(i, N//i):\n result = fdigit(i, N//i)\n print(i, N/i,fdigit(i, N//i))\n\nprint(result)', 'def fdigit(a,b):\n if len(str(a)) > len(str(b)):\n return len(str(a))\n else:\n return len(str(b))\n\nN = int(input())\nresult = 10000000000\ngoal = int((N**0.5)//1)\n\nfor i in range(1, goal+1):\n if N%i ==0:\n #print(i)\n if result > fdigit(i, N//i):\n result = fdigit(i, N//i)\n \n\nprint(result)']
['Wrong Answer', 'Accepted']
['s885605965', 's736553308']
[3064.0, 3188.0]
[30.0, 31.0]
[350, 371]
p03775
u724742135
2,000
262,144
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.
['import math\nfrom sys import exit, stdin\nN = int(stdin.readline().rstrip())\nN = int(math.sqrt(N))\n\nans = 0\nfor i in range(N, 0, -1):\n if N % i == 0:\n ans = N // i\n break\nprint(len(str(ans)))', 'import math\nfrom sys import exit, stdin\nN = int(stdin.readline().rstrip())\nans = 0\nfor i in range(int(math.sqrt(N)), 0, -1):\n if N % i == 0:\n ans = N // i\n break\nprint(len(str(ans)))']
['Wrong Answer', 'Accepted']
['s178688712', 's633605938']
[3060.0, 2940.0]
[18.0, 30.0]
[206, 199]
p03775
u727787724
2,000
262,144
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.
['n=int(input())\nimport fractions\ndef prime_decomposition(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n = n//i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\nd=list(prime_decomposition(n))\ncnt=n\nans=[]\na=1\nif n==1:\n print(1)\nelse:\n if len(list(str(d[len(d)-1])))>=(len(list(str(n)))+1)//2:\n print(len(list(str(d[len(d)-1]))))\n else:\n for i in range(d):\n a*=d[i]\n if a>n**(1/2):\n break\n a=str(a)\n print(len(list(a)))', 'n=int(input())\nimport fractions\ndef prime_decomposition(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n = n//i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\nd=list(prime_decomposition(n))\ncnt=n\nans=[]\na=1\nb=1\nif n==1:\n print(1)\nelse:\n if len(list(str(d[len(d)-1])))>(len(list(str(n)))+1)//2:\n print(len(list(str(d[len(d)-1]))))\n else:\n for i in range(len(d)):\n if i%2==0:\n a*=d[i//2]\n else:\n a*=d[len(d)-i//2]\n if a>n**(1/2):\n break\n a=str(a)\n print(len(list(a)))\n #print(a)\n', 'n=int(input())\ncnt=[]\nfor i in range(1,int(n**(1/2))+1000):\n if n%i==0:\n cnt.append(n//i)\n cnt.append(i)\n#print(cnt)\nans=[]\nfor j in range(len(cnt)//2):\n a=list(str(cnt[2*j]))\n b=list(str(cnt[2*j+1]))\n ans.append(max(len(a),len(b)))\nprint(min(ans))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s276364406', 's503070853', 's337189227']
[5048.0, 5048.0, 3064.0]
[53.0, 53.0, 35.0]
[549, 658, 274]
p03775
u731368968
2,000
262,144
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.
['n=int(input())\nans=0\nfor i in range(1,int(n**0.5+1)):\n if n%i==0:ans=min(ans,len(str(n//i)))\nprint(ans)', 'n=int(input())\nans=10000000000000000\nfor i in range(1,int(n**0.5+1)):\n if n%i==0:ans=min(ans,len(str(n//i)))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s280224350', 's280081459']
[2940.0, 3060.0]
[31.0, 31.0]
[106, 122]
p03775
u731436822
2,000
262,144
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.
['# ABC 057 C - Digits in Multiplication\n\nimport math\nN = int(input())\nans = []\n# N = int(math.sqrt(N))\nfor i in range(1,N+1): \n if N%i == 0: \n ans.append(max(len(str(int(i))),len(str(int(N/i))))) \n print(ans)\nprint(min(ans)) \n\n\n\n\n# print(a) \n\n\n\n\n\n# count = 0\n# while(a>0):\n# count += 1\n# a /= 10\n# a = int(a)\n# print(count)', 'n = int(input())\nimport math\nans = []\nfor i in range(1,int(math.sqrt(n)+1)):\n if n%i == 0:\n ans.append(max(len(str(i)),len(str(int(n//i)))))\nprint(min(ans))']
['Wrong Answer', 'Accepted']
['s784553621', 's326871916']
[9716.0, 3060.0]
[2104.0, 30.0]
[1154, 166]
p03775
u733321071
2,000
262,144
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.
['import math\nn = int(input())\n\nfor i in reversed(range(1, n // 2)):\n if n % i == 0:\n print(max(len(str(i)), len((str(n // i)))))\n break\n', 'import sys,math\nn = int(input())\nans = sys.maxsize\nfor i in reversed(range(1, math.sqrt(n).__int__() + 1)):\n if n % i == 0:\n cur = max(len(str(i)), len((str(n // i))))\n if ans > cur:\n ans = cur\n\nif n == 1:\n print(1)\nelse:\n print(ans)\n']
['Wrong Answer', 'Accepted']
['s922675576', 's798424912']
[2940.0, 3060.0]
[2104.0, 30.0]
[152, 268]
p03775
u735008991
2,000
262,144
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.
['import math\nN = int(input())\nans = math.inf\nfor i in range(1, 1+math.floor(math.sqrt(N))):\n if N % i == 0:\n ans = min(ans, len(str(N/i)))\nprint(ans)\n', 'import math\nN = int(input())\nans = N\nfor i in range(1, 1+math.floor(math.sqrt(N))):\n if N % i == 0:\n ans = min(ans, len(str(N//i)))\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s453904547', 's037529714']
[2940.0, 2940.0]
[16.0, 30.0]
[159, 153]