s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s663725290 | p03775 | u371385198 | 1582278881 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 226 | import sys
import math
input = sys.stdin.readline
N = int(input())
a = int(math.sqrt(N))
A = 0
B = 0
for i in reversed(range(1, a + 1)):
if not N % i:
A = i
B = N // A
break
print(max(len(str(A)), len(str(B))) |
s905693782 | p03775 | u326552320 | 1582061620 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3188 | 220 | import math
def main():
N = int(input())
count = 0
for i in range(1,int(math.sqrt(N))):
if N%i==0:
iremono = i
print(len(str(N//iremono)))
if __name__ == '__main__':
main()
|
s758879003 | p03775 | u529630697 | 1581693987 | Python | Python (3.4.3) | py | Runtime Error | 941 | 14492 | 817 | #!/usr/bin/env python3
import sys
import numpy as np
def list_prime(max):
primes = []
for i in range(1, max):
if max % i == 0:
primes.append(i)
if i >= np.sqrt(max):
break
if len(primes) == 1:
primes.append(max)
return primes
def solve(N: int):
print... |
s998673943 | p03775 | u747220349 | 1581479004 | Python | PyPy3 (2.4.0) | py | Runtime Error | 185 | 38384 | 147 | n=int(input())
ans=float(inf)
for x in range(1,min(n,10**5)):
if n%x==0:
m=len(str(x))*len(str(n//x))
ans=min(ans,m)
print(ans) |
s428260711 | p03775 | u868701750 | 1581292769 | Python | Python (3.4.3) | py | Runtime Error | 35 | 2940 | 240 | N = int(input())
def digits(n):
return len(list(str(n)))
digit_list = []
for a in range(1, int(N**(1/2))):
b = N // a if N % a == 0 else 0
if b != 0:
digit_list += [max(digits(a), digits(b))]
print(min(digit_list))
|
s814236554 | p03775 | u112317104 | 1581146862 | Python | Python (3.4.3) | py | Runtime Error | 34 | 3064 | 424 | from itertools import combinations
N = int(input())
def factorize(n):
b = 2
fct = []
while b * b <= n:
while n % b == 0:
n //= b
fct.append(b)
b = b + 1
if n > 1:
fct.append(n)
return fct
A = factorize(N)
list = []
c = 1
for a in A:
c *= a
... |
s401209972 | p03775 | u141574039 | 1579759586 | Python | Python (3.4.3) | py | Runtime Error | 86 | 3060 | 157 | def d(n):
return len(str(n))
N=int(input())
i=1
#print(int(N**0.5))
while N%(int(N**0.5)-i)!=0:
i=i+1
print(max(d(int(N**0.5)-i),d(N//(int(N**0.5)-i)))) |
s828522803 | p03775 | u811000506 | 1579123550 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3064 | 425 | def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
#divisors.sort()
return divisors
N = int(input())
list = make_divisors(N)
ans = 10**9
for i in range(0,len(list... |
s688037379 | p03775 | u772062359 | 1579049731 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38364 | 376 | from tqdm import tqdm
N = int(input())
ans = 0
for i in tqdm(range(N+1//2)):
i += 1
M = N//i
if i*M == N:
M = str(M)
i = str(i)
if len(M)>=len(i):
if ans > len(i):
ans = len(i)
print(ans)
else:
ans = len(M)
print(ans)
i = int(i)
M = int(M)
e... |
s492292616 | p03775 | u989345508 | 1578596343 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3060 | 207 | import math
n=int(input())
l=math.floor(math.sqrt(n))
for i in range(l,1,-1):
if n%i==0:
a,b=i,n//i
k=max(math.floor(math.log10(a))+1,math.floor(math.log10(b))+1)
break
print(k)
|
s707430777 | p03775 | u989345508 | 1578596325 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3060 | 207 | import math
n=int(input())
l=math.floor(math.sqrt(n))
for i in range(l,1,-1):
if n%i==0:
a,b=i,n//i
x=max(math.floor(math.log10(a))+1,math.floor(math.log10(b))+1)
break
print(k)
|
s517282449 | p03775 | u968404618 | 1578569359 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3188 | 364 | n = int(input())
a = []
b = []
for i in range(1, int(n**0.5)+10):
if n % i == 0:
a.append(i)
if i != n//i:
b.append(n//i)
def Check(x):
cont= 0
while x > 0:
x = x//10
cont += 1
return cont
A = []
for i in a:
A.append(Check(i))
B = []
for i in b:
B.... |
s887205337 | p03775 | u968404618 | 1578569133 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3064 | 364 | n = int(input())
a = []
b = []
for i in range(1, int(n**0.5)+1):
if n % i ==0:
a.append(i)
if i != n//i:
b.append(n//i)
def Check(x):
cont= 0
while x > 0:
cont += 1
x = x//10
return cont
A = []
for i in a:
A.append(Check(i))
B = []
for i in b:
B.ap... |
s113412708 | p03775 | u380933932 | 1578466797 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 451 | n=int(input())
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
for i in range(2,1+s):
if n%i==0:
while True:
f.append(i)
n=n//i
if n%i!=0:
break
itr=2**(len(f))-1
l=len(f)
for i in range(2**(len(f)-1)):
itr+=1
litr=str(bin(itr))[3:]
a,b=1,1
for j in range(l):
... |
s423575970 | p03775 | u380933932 | 1578466758 | Python | Python (3.4.3) | py | Runtime Error | 33 | 3064 | 451 | n=int(input())
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
for i in range(2,1+s):
if n%i==0:
while True:
f.append(i)
n=n//i
if n%i!=0:
break
itr=2**(len(f))-1
l=len(f)
for i in range(2**(len(f-1))):
itr+=1
litr=str(bin(itr))[3:]
a,b=1,1
for j in range(l):
... |
s992799836 | p03775 | u353855427 | 1578167745 | Python | Python (3.4.3) | py | Runtime Error | 30 | 2940 | 125 | import math
N = int(input())
A = int(math.sqrt(N))
for i in reversed(range(A)):
if(N%i==0):
print(len(str(N//i)))
exit() |
s931755465 | p03775 | u417014669 | 1576854123 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 33 | N=int(input())
print(Nint(**0.5)) |
s946416754 | p03775 | u614734359 | 1576701723 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3064 | 494 | import heapq
n = int(input())
def prime_factorize(n):
a = []
while n % 2 == 0:
a.append(2)
n //= 2
f = 3
while f * f <= n:
if n % f == 0:
a.append(f)
n //= f
else:
f += 2
if n != 1:
a.append(n)
return a
A = prime_fact... |
s765953726 | p03775 | u905582793 | 1576564823 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 131 | n=int(input())
ans = []
for i in range(1,n**0.5+1):
if n%i==0:
j=n//i
ans.append(len(str(i))+len(str(j)))
print(max(ans)) |
s503070853 | p03775 | u727787724 | 1575235391 | Python | Python (3.4.3) | py | Runtime Error | 53 | 5048 | 658 | n=int(input())
import fractions
def prime_decomposition(n):
i = 2
table = []
while i * i <= n:
while n % i == 0:
n = n//i
table.append(i)
i += 1
if n > 1:
table.append(n)
return table
d=list(prime_decomposition(n))
cnt=n
ans=[]
a=1
b=1
if n==1:
print(1)
else:
if len(list(str(d[... |
s276364406 | p03775 | u727787724 | 1575235047 | Python | Python (3.4.3) | py | Runtime Error | 53 | 5048 | 549 | n=int(input())
import fractions
def prime_decomposition(n):
i = 2
table = []
while i * i <= n:
while n % i == 0:
n = n//i
table.append(i)
i += 1
if n > 1:
table.append(n)
return table
d=list(prime_decomposition(n))
cnt=n
ans=[]
a=1
if n==1:
print(1)
else:
if len(list(str(d[len(... |
s918050493 | p03775 | u727787724 | 1575234324 | Python | Python (3.4.3) | py | Runtime Error | 53 | 5104 | 400 | n=int(input())
import fractions
def prime_decomposition(n):
i = 2
table = []
while i * i <= n:
while n % i == 0:
n = n//i
table.append(i)
i += 1
if n > 1:
table.append(n)
return table
d=list(prime_decomposition(n))
cnt=n
ans=[]
a=1
if len(list(str(d[len(d)-1])))>=len(list(str(n)))//2+1... |
s669968231 | p03775 | u618002097 | 1574427791 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 39024 | 691 | def make_divisors(n):
divisors = []
min_k = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
k = max(len(str(int(i))), len(str(int(n // i))))
min_k.append(k)
... |
s668039721 | p03775 | u618002097 | 1574427438 | Python | PyPy3 (2.4.0) | py | Runtime Error | 178 | 39024 | 681 | def make_divisors(n):
divisors = []
min_k = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
k = max(len(str(i)), len(str(n // i)))
min_k.append(k)
# divisor... |
s486687333 | p03775 | u405660020 | 1574118767 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3060 | 219 | import math
from sys import stdin
input = stdin.readline
n = int(input())
ans=[]
for i in range(1,round(math.sqrt(n))):
if n%i==0:
tmp=max(len(str(i)),len(str(n//i)))
ans.append(tmp)
print(min(ans)) |
s078082772 | p03775 | u840310460 | 1573772198 | Python | Python (3.4.3) | py | Runtime Error | 2107 | 3188 | 274 | n = int(input())
a = []
b = []
for i in range(1, n):
if n%i == 0:
a.append(i)
b.append(int(n/i))
a = list(map(str, a))
b = list(map(str, b))
result = []
for i in range(len(a)):
result.append(max(len(a[i]), len(b[i])))
print(min(result)) |
s064367989 | p03775 | u898336293 | 1573339250 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 228 | divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
return divisors
N=int(input())
div = make_divisors(N)
A = div[-1]
B = N//A
print(max(len(str(A)),len(str(B)))) |
s778131607 | p03775 | u576917603 | 1572799923 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3064 | 329 | n=int(input())
def di(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
return divisors
li=di(n)
a=li[-1]
b=li[-2]
if a**2==n:
print(len(str(a)))
else:
print(max(len(str(a)),len(... |
s731647596 | p03775 | u576917603 | 1572799763 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3060 | 284 | n=int(input())
def di(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
return divisors
li=di(n)
a=li[-1]
b=li[-2]
print(max(len(str(a)),len(str(b)))) |
s102888415 | p03775 | u109617108 | 1572390944 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38384 | 146 | import math
N=int(input())
m=int(len(str(N)))
for j in range(2,math.int(sqrt(N))+1):
a=j
b=N//j
m1=len(str(max(a,b)))
m=min(m,m1)
print(m) |
s074093360 | p03775 | u816645498 | 1571596654 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 337 | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
ll N;
cin >> N;
int res = 30;
for(ll i = 1; i*i <= N; ++i) {
if(N%i) continue;
ll j = N/i;
int cnt = 0;
while(j > 0) ++cnt, j /= 10;
res = min(res, cnt);
}
cout << res << endl... |
s883437178 | p03775 | u193182854 | 1571452139 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3060 | 324 | n = int(input())
def get_divisors(num):
f_divs, l_divs = [], []
for i in range(1, int(num**0.5)+1):
if not num % i:
f_divs.append(i)
if i != num // i:
l_divs.append(num // i)
return f_divs[-1], l_divs[-1]
print(max(*map(lambda x: len(str(x)), get_divisors(n)... |
s559051100 | p03775 | u887207211 | 1570921318 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3188 | 516 | import sys
stdin = sys.stdin
ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
def main():
n = ni()
def divi(n):
res = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
res.append(i)
if i != n // i:
re... |
s514805190 | p03775 | u924374652 | 1570499646 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3060 | 201 | import math
n = int(input())
sqrt_n = math.ceil(math.sqrt(n))
list_cand = []
for i in range(1, sqrt_n):
if n % i == 0:
list_cand.append(max(len(str(i)), len(str(n // i))))
print(min(list_cand)) |
s304976579 | p03775 | u332657092 | 1569652477 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2133 | 517400 | 705 | n = int(input())
if n == 1:
print(0)
else:
PFs = []
PNs = []
for div in range(2, int(n**(0.5) + 1)):
for pn in PNs:
if div % pn == 0:
break
else:
PNs.append(div)
while n % div == 0:
n /= div
PFs.append(div)
if len(PFs) == 0:
PFs = [n]
#print(PFs)
Pats = [[]... |
s167196198 | p03775 | u119655368 | 1569611448 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3188 | 147 | import math
n = int(input())
l = []
for i in range(1, int(math.sqrt(n)//1)):
if n % i == 0:
l.append(int(n / i))
print(len(str(l[-1]))) |
s368971589 | p03775 | u119655368 | 1569611434 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | n = int(input())
l = []
for i in range(1, int(math.sqrt(n)//1)):
if n % i == 0:
l.append(int(n / i))
print(len(str(l[-1]))) |
s214051281 | p03775 | u887207211 | 1569429013 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3188 | 504 | import sys
stdin = sys.stdin
ns = lambda : stdin.readline().rstrip()
na = lambda : map(int, stdin.readline().split())
ni = lambda : int(ns())
def main():
n = ni()
nagasa = lambda x: len(str(x))
def f(a, b):
x = nagasa(a)
y = nagasa(b)
return x if x > y else y
def divi(n):
res = []
for i i... |
s925274572 | p03775 | u774160580 | 1569263362 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38640 | 238 | import math as m
N = int(input())
F_ab = 0
for i in range(1, int(sqrt(N))+1):
if N%i != 0:
continue
if i == 1:
F_ab = len(str(N//i))
else:
F_ab = min(F_ab, max(len(str(i)), len(str(N//i))))
print(F_ab) |
s208838530 | p03775 | u759412327 | 1568174016 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 118 | N = int(input())
K = int(n**(1/2))
a = len(str(N))
for i in range(1,k+1):
if N%i==0:
a=len(str(n//i))
print(a) |
s252053919 | p03775 | u703890795 | 1567993410 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 353 | N, M = map(int, input().split())
AB = []
for i in range(N):
AB.append(list(map(int, input().split())))
CD = []
for i in range(M):
CD.append(list(map(int, input().split())))
idx = 0
for i in range(N):
d0 = 9900000000
for j in range(M):
d = abs(AB[i][0]-CD[j][0])+abs(AB[i][1]-CD[j][1])
if d0 > d:
d0... |
s944628911 | p03775 | u177411511 | 1567666708 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 887 | import sys
import copy
import string
import math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline... |
s597205929 | p03775 | u177411511 | 1567666539 | Python | Python (3.4.3) | py | Runtime Error | 51 | 4208 | 837 | import sys
import copy
import string
import math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline... |
s312816924 | p03775 | u934529721 | 1567617882 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3060 | 231 | import math
N = int(input())
box = []
for A in range(1, math.floor(math.sqrt(N))):
if N % A == 0:
B = N // A
box.append(max(math.floor(math.log10(A)+1),math.floor(math.log10(B)+1)))
print(min(box)) |
s360679429 | p03775 | u934529721 | 1567617631 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3188 | 198 | import math
N = int(input())
box = []
for A in range(1, N):
if N % A == 0:
B = N // A
box.append(max(math.floor(math.log10(A)+1),math.floor(math.log10(B)+1)))
print(min(box)) |
s500601778 | p03775 | u666198201 | 1567568830 | Python | Python (3.4.3) | py | Runtime Error | 44 | 5564 | 251 | import math
import fractions
N=int(input())
A=fractions.sqrt(N)
A=fractions.ceil(A)
mini=100000000000
for i in range(1,A+1):
if N%i==0:
x=len(str(i))
y=len(str(N//i))
if mini>max(x,y):
mini=max(x,y)
print(mini)
|
s033784587 | p03775 | u896741788 | 1567543754 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 162 | n=int(input())
m=n**(1/2)//1+1
l=[]
for i in range(m+1)[:0:-1]:
if n%i==0:
l.append(max(len(str(i)),len(str(n//i))))
if len(l)==3:
break
print(min(l)) |
s297792396 | p03775 | u007550226 | 1567543020 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 627 | #include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
using namespace std;
using ll = long long;
vector<ll> prime_factor(ll n) {
vector<ll> ret;
for(ll i = 2; i * i <= n; i++) {
while(n % i == 0) {
ret.push_back(i);
n /= i;
}
}
if(n != 1) ret.push_back(n)... |
s315433153 | p03775 | u007550226 | 1567542978 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 625 | #include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
using namespace std;
using ll = long long;
vector<ll> prime_factor(ll n) {
vector<ll> ret;
for(ll i = 2; i * i <= n; i++) {
while(n % i == 0) {
ret.push_back(i);
n /= i;
}
}
if(n != 1) ret.push_back(n)... |
s409013757 | p03775 | u928385607 | 1567467862 | Python | Python (3.4.3) | py | Runtime Error | 37 | 3060 | 185 | n = int(input())
ab = []
ans = []
for i in range(1, int(n**(0.5))):
ab.clear()
if n%i == 0:
ab.append(i)
ab.append(int(n/i))
ans.append(len(str(max(ab))))
print(min(ans))
|
s830747677 | p03775 | u433532588 | 1567013678 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3068 | 1 | x |
s208742737 | p03775 | u450904670 | 1566881893 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 149 | n = int(input())
res = 0
for i in int(sqrt(n) + 1):
if(n % i == 0):
tmp = max([len(i), len(n*i)])
if(res > tmp):
res = tmp
print(res) |
s274841299 | p03775 | u338929851 | 1566144367 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 371 | # -*- coding: utf-8 -*-
import math
if __name__ == '__main__':
N = int(input())
val = len(N)
li = []
for i in range(1, math.ceil(math.sqrt(N))+1):
if N % i == 0:
a = len(str(int(i)))
b = len(str(int(N/i)))
print(a, b)
c = max(a, b)
if... |
s755617791 | p03775 | u280853184 | 1565722948 | Python | Python (2.7.6) | py | Runtime Error | 2103 | 2568 | 353 | N = long(raw_input())
def dig(A,B):
if A > B:
return A
else:
return B
A = 0
B = 0
X = []
i = long(1)
while N > i:
if N%i == 0:
A = long(i)
B = long(N/i)
X.append(dig(A,B))
if A in X:
break
... |
s231712984 | p03775 | u280853184 | 1565722919 | Python | Python (2.7.6) | py | Runtime Error | 2103 | 2568 | 361 | N = long(raw_input())
def dig(A,B):
if A > B:
return A
else:
return B
A = 0
B = 0
X = []
i = long(1)
print N
while N > i:
if N%i == 0:
A = long(i)
B = long(N/i)
X.append(dig(A,B))
if A in X:
... |
s330206654 | p03775 | u280853184 | 1565720300 | Python | Python (2.7.6) | py | Runtime Error | 2106 | 68348 | 672 | N = int(raw_input())
a = []
t = []
for i in range(1,N+1):
for j in range(1,N+1):
if i*j == N:
a.append(i)
a.append(j)
a.sort()
if a in t:
break
... |
s456013100 | p03775 | u830054172 | 1565537614 | Python | Python (3.4.3) | py | Runtime Error | 36 | 5048 | 186 | import fractions
n = int(input())
half = int(fractions.sqrt(n))
ans = []
for i in range(half, 0, -1):
if n%i==0:
ans.append(max(len(str(i)), len(str(n//i))))
print(min(ans)) |
s746922948 | p03775 | u830054172 | 1565537341 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3060 | 198 | n = int(input())
half = min(n//10**(len(str(n))//2),n%10**(len(str(n))//2))
ans = []
for i in range(half, 0, -1):
if n%i==0:
ans.append(max(len(str(i)), len(str(n//i))))
print(min(ans)) |
s520611885 | p03775 | u830054172 | 1565537293 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3060 | 198 | n = int(input())
half = min(n//10**(len(str(n))//2),n%10**(len(str(n))//2))
ans = []
for i in range(half, 0, -1):
if n%i==0:
ans.append(max(len(str(i)), len(str(n//i))))
print(min(ans)) |
s579170792 | p03775 | u904804404 | 1565180969 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38640 | 129 | n=int(input())
import math
for i in range (math.sqrt(n),0,-1):
if n%i==0:
print(max(len(str(i)),len(str(n//i))))
quit() |
s451889657 | p03775 | u626337957 | 1564949038 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 208 | N = int(input())
last = N
for num in range(1, N):
if num**2 > N:
print(len(str(last)))
break
elif num**2 == N:
print(len(str(num)))
break
else
if N%num == 0:
last = N//num
|
s766249013 | p03775 | u707870100 | 1563827421 | Python | Python (3.4.3) | py | Runtime Error | 34 | 3060 | 295 | # -*- coding: utf-8 -*-
import math
n = int(input())
#tmp = input().split()
#hoge = list(map(lambda a: int(a), tmp))
tmp= math.ceil(math.sqrt(n))
for i in range(0,tmp):
if(n%(tmp-i)==0):
break
#print(tmp-i)
ansn=n//(tmp-i)
#print(ansn)
ans=math.floor(math.log10(ansn-1)) + 1
print(ans)
|
s106023570 | p03775 | u707870100 | 1563826076 | Python | Python (3.4.3) | py | Runtime Error | 33 | 3060 | 295 | # -*- coding: utf-8 -*-
import math
n = int(input())
#tmp = input().split()
#hoge = list(map(lambda a: int(a), tmp))
tmp= math.ceil(math.sqrt(n))
for i in range(0,tmp):
if(n%(tmp-i)==0):
break
#print(tmp-i)
ansn=n//(tmp-i)
#print(ansn)
ans=math.floor(math.log10(ansn-1)) + 1
print(ans)
|
s159060279 | p03775 | u707870100 | 1563825252 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 2940 | 257 | # -*- coding: utf-8 -*-
import math
n = int(input())
#tmp = input().split()
#hoge = list(map(lambda a: int(a), tmp))
tmp= math.ceil(math.sqrt(n))
for i in range(0,n):
if(n%(tmp+i)==0):
break
#print(tmp+i)
print(math.floor(math.log10(tmp+i-1) + 1))
|
s334269008 | p03775 | u416758623 | 1563536581 | Python | Python (3.4.3) | py | Runtime Error | 2315 | 42484 | 195 | import bisect
n = int(input())
ls = list(range(n+1))
ans = 10**9
for a in range(1,n):
b = bisect.bisect_left(ls, n/a)
ans = min(ans,int(max(len(str(a)),len(str(ls[b])))))
print(ans)
|
s232790602 | p03775 | u131383431 | 1563222063 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3060 | 294 | def ans(N):
v1 = 1
for i in range(2, int(N)+1):
if N % i == 0:
v1 = i
if v1 >= int(N/i):
return v1, int(N/i)
def F(a, b):
c = max(a,b)
return len(str(c))
N = int(input())
value1, value2 = ans(N)
print(F(value1,value2)) |
s466408998 | p03775 | u131383431 | 1563220789 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 616 | def ans(N):
a = []
while(N > 1):
for i in range(2, int(N)+1):
if N % i == 0:
N /= i
a.append(i)
break
return a
def F(a, b):
c = max(a,b)
return len(str(c))
def ans_value(A):
v1 = 1
v2 = 1
v4 = 1
for i in A:... |
s255846913 | p03775 | u243699903 | 1562470534 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3060 | 190 | n=int(input())
ans=len(str(n))
for i in range(1, int(n**0.5)+1):
if n % i != 0:
continue
a=i
if i != n // i:
b=n//i
ans=min(ans,len(str(max(a,b))))
print(ans) |
s910151450 | p03775 | u354916249 | 1562437978 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3188 | 410 | N = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
temp = []
if n % i == 0:
temp.append(i)
if i != n // i:
temp.append(n//i)
divisors.append(temp)
# divisors.sort()
return divisors
X = make_div... |
s745693111 | p03775 | u354916249 | 1562437557 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3188 | 408 | N = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
temp = []
if n % i == 0:
temp.append(i)
if i != n // i:
temp.append(n//i)
divisors.append(temp)
# divisors.sort()
return divisors
X = make_div... |
s710129445 | p03775 | u354916249 | 1562437429 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3444 | 408 | N = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
temp = []
if n % i == 0:
temp.append(i)
if i != n // i:
temp.append(n//i)
divisors.append(temp)
# divisors.sort()
return divisors
X = make_div... |
s681035898 | p03775 | u366959492 | 1562352318 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38256 | 19 | l=make_divisors(n)
|
s827265120 | p03775 | u180058306 | 1562266477 | Python | Python (3.4.3) | py | Runtime Error | 1648 | 1643580 | 620 | import numpy as np
# 整数Nを入力する
N = int(input())
print(N)
# 整数A、Bの桁数のうち、大きい方を返す関数F(A, B)を定義
def F(A, B):
C = np.vstack((A, B))
digit_C = np.array(np.log10(C) + 1, dtype = int)
return np.max(digit_C, axis = 0)
# 被除数の配列を作成
dividend = np.ones(N) * N
# 除数の配列を作成
divisor = np.arange(1, N + 1)
# 商および余りを計算
residue... |
s628196279 | p03775 | u180058306 | 1562265592 | Python | Python (3.4.3) | py | Runtime Error | 2114 | 1972364 | 655 | import numpy as np
# 整数Nを入力する
N = int(input())
# 整数A、Bの桁数のうち、大きい方を返す関数F(A, B)を定義
def F(A, B):
C = np.vstack((A, B))
digit_C = np.array(np.log10(C) + 1, dtype = int)
return np.max(digit_C, axis = 0)
# 被除数の配列を作成
dividend = np.ones(N, dtype = int) * N
# 除数の配列を作成
divisor = np.arange(1, N + 1)
# 商および余りを計算
quo... |
s794641111 | p03775 | u469063372 | 1561214773 | Python | Python (3.4.3) | py | Runtime Error | 52 | 3064 | 564 | import math
n = int(input())
def is_prime(n):
for i in range(2, n + 1):
if i * i > n:
break
if n % i == 0:
return False
return n != 1
def prime_decomposition(n):
i = 2
table = []
while i * i <= n:
while n % i == 0:
n /= i
tabl... |
s081706729 | p03775 | u941753895 | 1560836488 | Python | Python (3.4.3) | py | Runtime Error | 2109 | 86592 | 1341 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()
# Factoring by trial split
def getPrimeLis... |
s542808686 | p03775 | u580904613 | 1560826395 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3188 | 178 | n = int(input())
pf={}
for i in range(2,int(n**0.5) + 1):
if n % i == 0:
pf[i] = pf.get(i,0) + 1
a = max(pf)
b = int(n/a)
ans = max(len(str(a)), len(str(b)))
print(ans) |
s864396252 | p03775 | u430223993 | 1560382580 | Python | Python (3.4.3) | py | Runtime Error | 31 | 3060 | 190 | n = int(input())
f = float('inf')
for a in range(1, int(n**0.5)):
if n % a == 0:
b = n // a
x = max(len(str(a)), len(str(b)))
if f > x:
f = x
print(x) |
s334298508 | p03775 | u057109575 | 1559182140 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 180 | from math import sqrt
N = int(input())
ans = []
for i in range(1, int(sqrt(N)) + 1):
if i * (N // i) == N:
ans.append(max(len(str(i)), len(str(N // i)))
print(min(ans)) |
s016749355 | p03775 | u057109575 | 1559181620 | Python | Python (3.4.3) | py | Runtime Error | 37 | 3060 | 194 | from math import sqrt
N = int(input())
ans = []
for i in range(1, int(sqrt(N))):
if i * (N // i) == N:
ans.append(max(len(str(i)), len(str(N // i))))
print(max(min(ans), 1)) |
s879302112 | p03775 | u057109575 | 1559181483 | Python | Python (3.4.3) | py | Runtime Error | 37 | 3060 | 187 | from math import sqrt
N = int(input())
ans = []
for i in range(1, int(sqrt(N))):
if i * (N // i) == N:
ans.append(max(len(str(i)), len(str(N // i))))
print(min(ans)) |
s276150167 | p03775 | u779455925 | 1559153222 | Python | Python (3.4.3) | py | Runtime Error | 44 | 3060 | 133 | N=int(input())
M=int((N**(1/2)))
print(min([max([len(str(i)),len(str(int(N/i)))]) for i in range(int(N/2)-M,int(N/2)+M) if N%i==0])) |
s292532325 | p03775 | u844005364 | 1559059795 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 324 | def divisible_length(n):
min_length = len(str(n))
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
min_length = min(min_length, len(str(i)))
if i != n // i:
min_length = min(min_length, len(str(n // i)))
return min_length
n = int(input())
print(divisible_length... |
s376128935 | p03775 | u074445770 | 1558712207 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 234 | def func(num):
cnt=0
while(num>0):
num/=10
cnt+=1
return cnt
N=int(input())
ans=100
for i in range(1,N**(1/2)+1):
tmp=0
if(N%i==0):
tmp=max(func(i),func(N/i))
ans=min(ans,tmp)
print(ans) |
s245318923 | p03775 | u074445770 | 1558711857 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 2266 | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>... |
s351160897 | p03775 | u172386990 | 1558653424 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 569 | N = int(input())
def divisor(N):
'''
create divisor_list < sqrt(N) from natural number
'''
divisor_list = []
for num in range(1, math.ceil(math.sqrt(N)) + 1):
if N % num == 0:
divisor_list.append(num)
return divisor_list
def F(A, B):
return max(len(str(A))... |
s797886600 | p03775 | u542932305 | 1558151581 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | N = int(input())
for i in range(math.ceil(math.sqrt(N)), 0, -1):
if N % i == 0:
print(len(str(N//i)))
break |
s486797006 | p03775 | u091051505 | 1556819850 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3188 | 161 | import math
n = int(input())
a = []
for i in range(1, math.ceil(n**(1/2))):
if n % i == 0:
a.append(max(len(str(i)), len(str(n // i))))
print(min(a)) |
s333267970 | p03775 | u091051505 | 1556819526 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3060 | 134 | n = int(input())
a = []
for i in range(1, n//2):
if n % i == 0:
a.append(max(len(str(i)), len(str(n // i))))
print(min(a)) |
s351940645 | p03775 | u893132811 | 1556213542 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3060 | 353 | N = int(input())
Soinsuu = [1]
for i in range(2, N+1):
while N % i == 0:
Soinsuu.append(i)
N = N // i
else:
if N == 1:
break
Soinsuu.sort(reverse=True)
a = Soinsuu[0]
b = Soinsuu[1]
for i in Soinsuu[2:]:
if a > b:
b *= i
else:
a *= i
prin... |
s714875706 | p03775 | u635182517 | 1554943784 | Python | Python (3.4.3) | py | Runtime Error | 44 | 2940 | 151 | N = int(input())
for i in range(1,N):
if i * i <= N:
if N % i == 0:
ans = i
else:
break
print(len(str(N // ans)))
|
s906554691 | p03775 | u501643136 | 1554781201 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 220 | def getdigit(N):
cnt = 0
while(N>0):
cnt++
N //= 10
return cnt
N = int(input())
for i in reversed(range(1,sqrt(N)+1)):
if(N % i == 0):
print(max(getdigit(i), getdigit(N/i)))
exit()
|
s474368466 | p03775 | u513900925 | 1554412712 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 180 | N = map(int,input())
M = int(N**0.5//1)
S = list()
for i in range(M+1):
if i > 0 :
if N%i == 0:
S.append(i)
a = S[-1]
b = N//a
print(len(str(a))+len(str(b))) |
s199378342 | p03775 | u513900925 | 1554412591 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 171 | N = input()
M = int(N**0.5//1)
S = list()
for i in range(M+1):
if i > 0 :
if N%i == 0:
S.append(i)
a = S[-1]
b = N//a
print(len(str(a))+len(str(b))) |
s669931065 | p03775 | u025136560 | 1554182540 | Python | Python (3.4.3) | py | Runtime Error | 34 | 3064 | 521 | def prime_factors(n):
i = 2
factors = []
while i * i <= n:
if n % i:
i += 1
else:
n //= i
factors.append(i)
if n > 1:
factors.append(n)
return factors
N = int(input())
prime_list = prime_factors(N)
X = 0
Y = 0
if prime_list:
X = prim... |
s867347176 | p03775 | u025136560 | 1554182365 | Python | Python (3.4.3) | py | Runtime Error | 34 | 3064 | 466 | def prime_factors(n):
i = 2
factors = []
while i * i <= n:
if n % i:
i += 1
else:
n //= i
factors.append(i)
if n > 1:
factors.append(n)
return factors
N = int(input())
prime_list = prime_factors(N)
X = prime_list.pop(0)
Y = prime_list.po... |
s339247731 | p03775 | u025136560 | 1554182031 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 460 | def prime_factors(n):
i = 2
factors = []
while i * i <= n:
if n % i:
i += 1
else:
n //= i
factors.append(i)
if n > 1:
factors.append(n)
return factors
N = input()
prime_list = prime_factors(N)
X = prime_list.pop(0)
Y = prime_list.pop(-1)
... |
s613000317 | p03775 | u897329068 | 1552597145 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3060 | 160 | import math
N = int(input())
anss = []
for n in range(1,math.ceil(N**0.5)):
if N % n == 0:
anss.append(max(len(str(n)),len(str(N//n))))
print(min(anss)) |
s254087586 | p03775 | u114954806 | 1552160235 | Python | Python (3.4.3) | py | Runtime Error | 36 | 3064 | 393 | def prime_decomposition(n):
i = 2
table = []
while i * i <= n:
while n % i == 0:
n /= i
table.append(i)
i += 1
if n > 1:
table.append(n)
return table
prime_lst=prime_decomposition(int(input()))
A=prime_lst[:-1]
B=int(prime_lst[-1])
_A=1
for a in A:
... |
s704201504 | p03775 | u020604402 | 1551836354 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 177 | N = int(input())
an = 10**10
for i in range(1,1+int(N)):
if N % i == 0:
tmp = i
s = max(len(str(N // tmp)),len(str(tmp)))
ans = min(ans,s)
print(ans) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.