Problem:
 Score : 200 points    Problem Statement Given is an integer N . Find the number of digits that N has in base K .      Notes For information on base- K representation, see Positional notation - Wikipedia .      Constraints  All values in input are integers.  1 \leq N \leq 10^9  2 \leq K \leq 10         Input Input is given from Standard Input in the following format:  N  K       Output Print the number of digits that N has in base K .        Sample Input 1 11 2      Sample Output 1 4  In binary, 11 is represented as 1011 .       Sample Input 2 1010101 10      Sample Output 2 7       Sample Input 3 314159265 3      Sample Output 3 18

Solution (Python):
n,k = map(int,input().split())
a = []
while n > 0:
  a.append(n % k)
  n //= k
print(len(a))

Solution (Python):
N ,K = (int(a) for a in input().split())
ans = 0
while N > 0 :
    N = N // K
    ans += 1
print(ans)

Solution (Python):
N,K = map(int,input().split())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
x10 = 35
x2 = Base_10_to_n(N, K)
print( len(x2) )

Solution (Python):
from string import printable
def func1(x, b):
    assert(x >= 0)
    assert(1< b < 37)
    r = ''
    while x > 0:
        r = printable[x % b] + r
        x //= b
    return r
def func2(s, b):
    assert(1 < b < 37)
    return int(s, b)
def convert(s, a, b):
    return func1(func2(s, a), b)
n, k= map(int, input().split())
x=convert(str(n), 10, k)
print(len(x))

Solution (Python):
n,k = map(int, input().split())

ans = 0

while n > 0:
  n /= k
  n = int(n)
  ans += 1
  
print(ans)

Solution (Python):



n,k = map(int, input().split())
cnt = 1
a = k
while k <= n:
  k = k*a
  cnt += 1

print(cnt)

Solution (Python):
def baseConv(n,ro,ri=10):
    n = int(str(n),base=ri)
    s = ""
    nums = "0123456789abcdefghijklmnopqrstuvwxyz"
    while n:
        s += nums[n%ro]
        n //= ro
    return s[::-1]
  
n,k = map(int,input().split())
print(len(baseConv(n,k)))

Solution (Python):
import math
N,K=(map(int,input().split()))
digits = (math.floor(math.log(N)/math.log(K)) + 1)
print(digits)

Solution (Python):
N, K = map(int, input().split())

def conv(N, K):
    if (int(N/K)):
        return conv(int(N/K), K)+str(N%K)
    return str(N%K)

print(len(conv(N, K)))

Solution (Python):
n,k=map(int,input().split())
i=0
ans=0
while k**i <= n:
  ans+=1
  i+=1
print(ans)

Solution (Python):
N,K = map(int,input().split())
C = 0
while N >0:
    N = N//K
    C +=1
print(C)

Solution (Python):
n,k = map(int,input().split())
c = 0
while n >0:
    n = n//k
    c +=1
print(c)

Solution (Python):
N, K = map(int, input().split())
digits = 0
while(N > 0):
    N = N//K
    digits = digits+1
print(digits)

Solution (Python):
N , K = map(int, input().split())

for x in reversed(range(0,30)):
    if N/(K**x) >= 1:
        print(x+1)
        break

Solution (Python):


n, k = map(int, input().split())
sum = ""
z = n

while z >= 1:
    sum = str((z % k)) + sum
    z = z // k


print(len(sum))

Solution (Python):


n, k = map(int, input().split())
sum = ""
z = n

while z >= 1:
    sum = sum + str((z % k))
    z = z // k

print(len(sum))

Solution (Python):
import math
N,K=[int(i) for i in input().split()]
print(math.floor(math.log(N,K))+1)

Solution (Python):
import numpy as np
def cumsum(x):
    return list(np.cumsum(x))

def cumsum_number(N,K,x):
    ans=[0]*(N-K+1)
    number_cumsum = cumsum(x)
    number_cumsum.insert(0,0)
    for i in range(N-K+1):
        ans[i]=number_cumsum[i+K]-number_cumsum[i]
    return ans
"""
int 
float 


for name in fruits: 
    print(name)


list0 = [] 
list0 = [1,2,3,4] 
list0 = [0]*10 
list1= [i for i in range(10)] 
list1 = list(map(int, input().split()))　
number=[int(input()) for i in range(int(input()))] 
list1 = list1 + [6, 7, 8] 
list2.append(34) 
list.insert(3,10) 
len(list4) 
max(sa) 
list5.count(2) 
list1.sort() 
list1.sort(reverse=True)  
set(list1) 
sum([2,3,   ,3]) 

abs(a) 
max(a,b) min(a,b) 
text1 = text1.replace("34","test") 

exit(0) 

cumsum(リスト) 
cumsum_number(N,K,x) 
"""
N,K=map(int,input().split())
for i in range(10000):
    if K**i<=N<K**(i+1):
        print(i+1)
        exit(0)

Solution (Python):
import numpy as np
def cumsum(x):
    return list(np.cumsum(x))

def cumsum_number(N,K,x):
    ans=[0]*(N-K+1)
    number_cumsum = cumsum(x)
    number_cumsum.insert(0,0)
    for i in range(N-K+1):
        ans[i]=number_cumsum[i+K]-number_cumsum[i]
    return ans
"""
int 
float 


for name in fruits: 
    print(name)


list0 = [] 
list0 = [1,2,3,4] 
list0 = [0]*10 
list1= [i for i in range(10)] 
list1 = list(map(int, input().split()))　
number=[int(input()) for i in range(int(input()))] 
list1 = list1 + [6, 7, 8] 
list2.append(34) 
list.insert(3,10) 
len(list4) 
max(sa) 
list5.count(2) 
list1.sort() 
list1.sort(reverse=True)  
set(list1) 
sum([2,3,   ,3]) 

abs(a) 
max(a,b) min(a,b) 
text1 = text1.replace("34","test") 

exit(0) 

cumsum(リスト) 
cumsum_number(N,K,x) 
"""
N,K=map(int,input().split())
for i in range(10000):
    if K**i<=N<K**(i+1):
        print(i+1)

Solution (Python):
n, k = map(int, input().split())

ans = 1
while True:
    n = n // k
    if n == 0:
        break
    ans += 1
print(ans)

Solution (Python):
import math
a, b = map(int, input().split())
N = 0
i = 1
c = 0
while c >= 0:
  c = a - b**i
  i += 1
  N += 1
print(N)

Solution (Python):
n,k=map(int,input().split())
num=0
while n>0:
    n//=k
    num+=1
print(num)

Solution (Python):
from math import log
n,k=map(int,input().split())
print(int(log(n,k))+1)

Solution (Python):
n, k = map(int, input().split())
ans = 0
while n > 0:
    n //= k
    ans += 1
print(ans)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def conv_num2x(num, x):
    if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
    return str(num%x)

def main():
    N,K = LI()
    num_k = conv_num2x(N,K)
    print(len(str(num_k)))

main()

Solution (Python):
n,k = map(int, input().split())
ans = 0
while n>0:
  n //= k
  ans += 1
print(ans)

Solution (Python):
N, K = map(int, input().split())

M = 0
i = 0

while M < N:
  M += (K-1)*K**i
  i += 1
print(i)

Solution (Python):
N,K = map(int, input().split())
i = 0
while True:
  if N >= K**i:
    i += 1
  else:
    print(i)
    break

Solution (Python):
def solve(N,K):
  if N == 0:
    return 1

  digit_num = 0
  while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
    
N, K = map(int,input().split())
ans = solve(N,K)
print(ans)

Solution (Python):
n,k= map(int,input().split())
temp = 1 
cnt = 0

while n >= temp:
    temp *= k
    cnt += 1
print(max(1,cnt))

Solution (Python):
N, K = map(int, input().split())
ans = 0
num = 1

while num <= N:
  num *= K
  ans += 1
  
print(ans)

Solution (Python):
n,k = map(int,input().split())
digits = 0
while True:
    if n >= k**digits:
        digits += 1
    else:
        print(digits)
        exit()

Solution (Python):
n, k = map(int, input().split())
cnt = 0
while(n > 0):
    n = n//k
    cnt += 1
print(cnt)

Solution (Python):
n,k=map(int,input().split())
i=1
while True:
    if n>=k**i:
        i+=1
    else:
        break
print(i)

Solution (Python):
n,k = map(int,input().split())
a = []
if n//k == 0:
  print(1)

else:
  while n//k != 0:
    a.append(n%k)
    n = n//k
  
    if n//k ==0:
      a.append(n%k)
  a.reverse()
  
  print(len(a))

Solution (Python):
n,k =map(int,input().split())
digitlist = []

while (n/k != 0):
	tmp = n%k
	digitlist.insert(0,(tmp))
	n = n//k

print(len(digitlist))

Solution (Python):
n,k=map(int,input().split())
d=[]
while n>0:
    d.append(str(n%2))
    n=n//k
print(len(d))

Solution (Python):
N,K = (int(x) for x in input().split())
Conv = []
while N!=0:
    Conv.append(N%K)
    N = N//K
    
Disp = ''.join([str(x) for x in Conv[::-1]])
print(len(Disp))

Solution (Python):
n,k = map(int, input().split())

i = 1
while n >= k:
    n //= k
    i += 1

print(i)

Solution (Python):
import math
n,k = map(int, input().split())

N = int(math.floor(math.log(n)/math.log(k)))+1
m = n
L = []
for i in range(N+1):
  L.append(m//(k**(N-i)))
  m = m%(k**(N-i))
  
if L[0] == 0:
  L.pop(0)

print(len(L))

Solution (Python):
n,k = map(int,input().split())
ans = 0
m = 1
while m <= n:
  m *= k
  ans += 1
print(ans)

Solution (Python):
n, k = map(int, input().split())
t = k
ans = 1
while t <= n:
  t = t * k
  ans += 1
print(ans)

Solution (Python):
import math

N, K = map(int, input().split(' '))
print(int(math.log(N, K))+1)

Solution (Python):
n, k = map(int, input().split())
count = 0
res = []
while True:
    if n < k ** count:
        print(count)
        break
    count += 1

Solution (Python):
number, base = map(int, input().split())
result_list = []
while number / base > 0:
  mod = number % base
  result_list.append(str(mod))
  number = number // base

result_list.reverse()
result = "".join(result_list)
print(len(result))

Solution (Python):
N,K = map(int, input().split())
ans = 0
while True:
    if N ==0:
        break
    N = N//K
    ans += 1
print(ans)

Solution (Python):
n,k = map(int,input().split())
ans = 0
while n > 0:
    n = n // k
    ans += 1
print(ans)

Solution (Python):
a, b = map(int, input().split())
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)

print(len(base10to(a,b)))

Solution (Python):
n, k = map(int, input().split())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
a = str(Base_10_to_n(n, k))
print(len(a))

Solution (Python):
N, K = list(map(int, input().split()))
num = K
count = 1
while num <= N:
    num *= K
    count += 1
print(count)

Solution (Python):
n,k = map(int,input().split())
c = 0
while n >= k:
    n = n // k
    c = c + 1

print(c + 1)

Solution (Python):
N,K = map(int,input().split())
ans = 0
while True:
    N = N//K
    ans += 1
    if N == 0:
        break
print(ans)

Solution (Python):
import math
N, K = map(int,input().split())
print(int(math.log(N,K))+1)

Solution (Python):
import math

n, k = map(int, input().split())

x = int(math.log(n, k)) + 1
print(x)

Solution (Python):


def main():
    N, K = map(int, input().split())
    def Base_10_to_n(X, n):
        if (int(X/n)):
            return Base_10_to_n(int(X/n), n)+str(X%n)
        return str(X%n)
    print(len(Base_10_to_n(N, K)))
    
if __name__ == "__main__":
    main()

Solution (Python):
n,k = map(int,input().split())
c = 0

while n > 0:
    n = n // k
    c += 1 

print(c)

Solution (Python):
N,K=map(int,input().split())

D=[]
while N>=K :
    D.append(N%K)
    N=N//K
print(len(D)+1)

Solution (Python):
n,k = map(int, input().split())
count = 0
while n > 0:
    n //= k
    count += 1
print(count)

Solution (Python):
N,K = map(int,input().split())

count = 0

while N > 0:
    N = N // K 
    count += 1

print(count)

Solution (Python):
N,K=map(int,input().split())

ans=1

while True:
  N=N//K
  if N==0:
    break
  ans+=1

print(ans)

Solution (Python):
import math

N, K = [int(i) for i in input().split()]
print(math.floor(math.log(N, K))+1)

Solution (Python):
N,K=map(int,input().split())
ans=0
while 0<N:
  N=N//K
  ans=ans+1
print(ans)

Solution (Python):
def main():
    n, k = map(int, input().split())
    a = 1
    i = 0
    while n >= a:
        a = k ** i
        i += 1
    print(i-1)





    
if __name__ == "__main__":
    main()

Solution (Python):
n,k=map(int,input().split())

ans=0
while n!=0:
  ans+=1
  n//=k

print(ans)

Solution (Python):
import math
n,k=map(int,input().split())
d = max(1, math.ceil(math.log(n,k)))
print(d)

Solution (Python):
import sys

z = list(map(int, input().split()))

N = z[0]

K = z[1]

tmp = 1
inc = 0
while True:
  if tmp <= N:
      tmp = tmp * K
      inc = inc + 1
  else:
      break
print(inc)

Solution (Python):
import math
n,k = map(int, input().split())

N = int(math.floor(math.log(n)/math.log(k)))
L = []
for i in range(N+1):
  L.append(n//(k**(N-i)))
  n = n % k**(N-i)
  
print(len(L))

Solution (Python):
def solve():
    N, K = map(int, input().split())
    i = 0
    while N:
        N //= K
        i += 1
    print(i)



if __name__ == '__main__':
    solve()

Solution (Python):
n, k = map(int, input().split())
count = 0
while n >= k:
  n = n // k
  count += 1
print(count+1)

Solution (Python):
N,K=map(int, input().split())

if K == 10:
    print(len(str(N)))
    exit()
cnt = 1
while True:
    if N / (K ** cnt) < 1:
        print(cnt)
        exit()
    cnt += 1

Solution (Python):
def abc156_b():
    N, K = map(int, input().split())
    i = 1
    while True:
        if N <= K ** i - 1: break
        i += 1
    print(i)

abc156_b()

Solution (Python):
N, K = map(int, input().split())
def transform(X, n):
    if (int(X/n)):
        return transform(int(X/n), n)+str(X%n)
    return str(X%n)

print(len(transform(N, K)))

Solution (Python):
import math

N, K = map(int, input().split())

r = int(math.log(N, K))

print(r+1)

Solution (Python):
N, K = map(int, input().split())
digits = 1

while True:
    if N < (K ** digits):
        break
    else:
        digits += 1

print(digits)

Solution (Python):
n,k=map(int,input().split())
import math
if n != 1:
  print(math.ceil(math.log(n,k)))
else:
  print(1)

Solution (Python):
N,K=map(int,input().split())
i=0
while K**i<=N:
  i+=1
  
print(i)

Solution (Python):
n,k=list(map(int,input().split()))
import sys
ans=1
import copy
num=copy.deepcopy(k)

while(1):
  if num>n:
    print(ans)
    sys.exit()
  num=num*k
  ans=ans+1

Solution (Python):
n, k = map(int, input().split())

if n < k:
   print(1)
   exit()

i = 1
while n >= k**i:
   i += 1
print(i)

Solution (Python):
n, k = map(int, input().split())
num = 1
while n >= k:
    n //= k
    num += 1
print(num)

Solution (Python):
n, k = map(int, input().split())

count = 0
while(True):
    if n >= k ** count:
        count += 1
    else:
        break

print(count)

Solution (Python):
N, K = map(int, input().split())
c = 1
while N//K != 0: 
  N = N//K
  c += 1
print(c)

Solution (Python):
N,K=map(int,input().split())
count=0
while(N>0):
  count+=1
  N=N//K
print(count)

Solution (Python):
n, k = map(int, input().split())

ans = 0

while n > 0:
    n //= k
    ans += 1

print(ans)

Solution (Python):
N,K=map(int,input().split())

count=1

while N//K>=1:
    N=N//K
    count+=1

print(count)

Solution (Python):
N, K = map(int, input().split())
A = ''
while True:
    if N <= 0:
        break
    N = N // K
    B = N % K
    A = A + str(B)
print(len(A))

Solution (Python):
def ans(x,n):
    if (int(x/n)):
        return ans(int(x/n),n)+str(x%n)
    return str(x%n)
x,y=map(int,input().split())
result=ans(x,y)
print(len(str(result)))

Solution (Python):

n, k = map(int, open(0).read().split())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
print(len(Base_10_to_n(n, k)))

Solution (Python):
def actual(n, k):
    """10進数のnをk進数に変換してその桁数を返す"""

    
    s = ''
    
    while True:
        n, y = divmod(n, k)

        s += str(y)

        if n == 0:
            num_as_k = s[::-1]  

            return len(num_as_k)

n, k = map(int, input().split())

print(actual(n, k))

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

x10,a = map(int,input().split())
xa = Base_10_to_n(x10, a)
print( len(xa) )

Solution (Python):
n,k=map(int,input().split())
num=0
while n > 0:
  num+=1
  n=n//k
  
print(num)

Solution (Python):
n, k = map(int , input().split())
digits = 0
while(n > 0):
    n = n//k
    digits = digits + 1
print(digits)

Solution (Python):
N,K = map(int,input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

 
 


x10 = 35
x2 = Base_10_to_n(N,K)
print(len(x2))

Solution (Python):
n, k = map(int, input().split())
ans = 0
while n > 0:
  ans += 1
  n = n // k
print(ans)

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    N, K = map(int, input().split())

    keta = 1
    while N // K > 0:
        N = N // K
        keta += 1

    print(keta)


if __name__ == '__main__':
    solve()

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    N, K = map(int, input().split())

    keta = 1
    while True:
        q = N // K
        if q == 0:
            break
        else:
            N = N // K
            keta += 1

    print(keta)


if __name__ == '__main__':
    solve()

Solution (Python):
def B():
    n,k = list(map(int, input().split()))
    i = 1
    while True:
        if n < k**i:
            print(i)
            return
        i += 1
B()

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

def main():
    n, k = map(int, input().split())
    num = len(list(Base_10_to_n(n, k)))
    print(num)

if __name__ == '__main__':
    main()

Solution (Python):
N, K = map(int, input().split())
result = 0


while N != 0:
    result += 1
    N //= K
print(result)

Solution (Python):
n,k=map(int,input().split())
cnt=0
while n != 0:
  n //= k
  cnt+=1
print(cnt)

Solution (Python):
N,K=map(int,input().split())
A=0
while N>=K**A:
    A=A+1

print(A)

Solution (Python):
import math
n,k = map(int, input().split())

digit = math.floor(math.log(n,k))
print(digit+1)

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque


from collections import Counter

from itertools import accumulate

from heapq import heapify,heappop,heappush


from functools import lru_cache


def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 10**9+7
    

    
    N, K = map(int, input().split())
    
    
    
    ans=math.floor(math.log(N)/math.log(K))+1
    print(ans)




if __name__ == "__main__":
    main()

Solution (Python):
N, K = map(int, input().split())

n = 1

while True:
    if K ** n > N:
        break

    n = n + 1

print(n)

Solution (Python):
import sys
import decimal 

def input():
    return sys.stdin.readline().strip()

def main():
    n, k = map(int, input().split())
    ans = 1
    while n >= k:
        n = n // k
        ans += 1
    print(ans)
    
main()

Solution (Python):
import math
n, k = map( int, input().split())

print( math.floor( math.log( n, k ) ) + 1 )

Solution (Python):
import math
n, k = map( int, input().split() )
print( int( math.log( n, k ) ) + 1 )

Solution (Python):
import math
n, k = map( int, input().split() )
print( int( math.log( n, k ) ) + 1 )

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")



def main():
    N, K = map(int, input().split())
    
    i = 0
    while K**i <= N:
        i += 1
    print(i)


if __name__ == '__main__':
    main()

Solution (Python):
N,K=map(int,input().split())
ans = 1
while N >= K:
  N = N // K
  ans += 1
print(ans)

Solution (Python):
i=0
N,L=map(int,input().split())
while True:
  if N<L**i:
    print(i)
    break
  elif N==L**i:
    print(i+1)
    break
  i=i+1

Solution (Python):
n, k = map(int, input().split())
a = 1
ans = 1

while n >= k**a:
    ans += 1
    a += 1

print(ans)

Solution (Python):
line = input().split(" ")
n = int(line[0])
k = int(line[1])

exp = 1
while pow(k, exp) <= n:
    exp += 1
print(exp)

Solution (Python):
N,K=map(int, input().split())
ans = 0
while (N > 0):
  N //= K
  ans += 1
print(ans)

Solution (Python):
n,k=map(int,input().split())

n=n-n%k
ans=1
while n>=k:
  n//=k
  
  ans+=1
print(ans)

Solution (Python):
import math
n,k = map(int,input().split())

print(math.floor(math.log(n,k)+1))

Solution (Python):
import math
n,k=map(int,input().split())
print(int(math.log(n, k))+1)

Solution (Python):
N, K = map(int, input().split())
cnt = 0
while N > 0:
    N = N // K
    cnt += 1
print(cnt)

Solution (Python):
import math
n,k=map(int,input().split())
l=math.log(n,k)
if n==1:
    print(1)
else:
    print(math.ceil(l))

Solution (Python):
n,k=map(int,input().split())
cnt=0
i=1
 
while True:
    p=n//k**i
    if p==0:
        print(i)
        break
    else:
        i+=1

Solution (Python):
n,k = map(int,input().split())

ans = 0
while(n>0):
    ans = ans+1
    n = int(n/k)

print(ans)

Solution (Python):
x, n = map(int, input().split())
digit = []
while(True):
    if x < n:
        digit.append(str(x))
        break
    d, m = divmod(x, n)
    digit.append(str(m))
    x = d
print(len(digit))

Solution (Python):
import math
N, K = map(int, input().split())
if N == 1:
    print(1)
else:
    print(math.ceil(math.log(N, K)))

Solution (Python):
N, K = map(int, input().split())


for i in range(1,N):
    if N > K**i:
        continue
    elif N == K**i:
        print(i+1)
        exit()
    else:
        print(i)
        exit()
print(1)

Solution (Python):
N, K = map(int, input().split())

n = 1
while N // K >=1:
    n += 1
    N = N//K
print(n)

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

n,k = map(int,input().split())
print(len(str(Base_10_to_n(n,k))))

Solution (Python):
N,K=map(int,input().split())
num=N
ans=0
while num>0:
  num=num//K
  ans+=1
print(ans)

Solution (Python):
n, k = map(int, input().split())

ans = []

while n > 0:
  n = n // k
  ans.append(1)
  
print(sum(ans))

Solution (Python):
n, k = map(int, input().split())
count = 0
while n >0:
    n //= k
    count += 1
print(count)

Solution (Python):
N, K = (int(x) for x in input().split())

D = 0

while N > 0:
    N //= K
    D += 1

print(D)

Solution (Python):
a,b=map(int,input().split())
c=1
d=b

while True:
  if a//b!=0:
    c+=1
    b=d**c
  else:
    break
print(c)

Solution (Python):
a,b = map(int,input().split())
count,rank = 1,b
while a >= rank:
  count += 1
  rank *= b
print(count)

Solution (Python):
import math
N, K = map( int, input().split() )

print( 1 + math.floor( math.log( N, K )))

Solution (Python):
n, k = map(int, input().split())
digit = k
num = 1
while n//digit:
    digit *= k
    num += 1
print(num)

Solution (Python):
import math

N, K = map( int, input().split() )

print( math.floor( math.log( N, K ) ) + 1 )

Solution (Python):
N, K = map(int, input().split())
cnt = 0

while N != 0:
  N = N//K
  cnt += 1
  
print(cnt)

Solution (Python):
N, K = map( int, input().split() )
import math

print( math.floor( math.log( N, K ) ) + 1 )

Solution (Python):
import math

N, K = map( int, input().split() )
print( math.floor( math.log( N, K ) ) + 1 )

Solution (Python):

import math
n, k = map(int, input().split())
print(int(math.log(n, k)) + 1)

Solution (Python):
N, K = map( int, input().split() )

ans = 0
while N:
  ans += 1
  N //= K

print( ans )

Solution (Python):
N,K = map(int,input().split())

ans = 0
n = N
while n:
    ans += 1
    n //= K

print(ans)

Solution (Python):
n, k = map(int, input().split())
i = n
ans = 0

while i >= k:
    ans += 1
    i = i/k

ans += 1
print(ans)

Solution (Python):
n,k = map(int,input().split())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
print(len(Base_10_to_n(n,k)))

Solution (Python):
N, K = map(int, input().split())
g = K
i = 1

while N / g >= 1:
    i = i + 1
    g = K**i
    
print(i)

Solution (Python):
import math

n, k = map(int, input().split())
lint = math.ceil(math.log(n, k))
l = math.log(n, k)
print(lint if lint != l else int(l) + 1)

Solution (Python):
N, K = map(int,input().split())

counter = 1
while N >= K:
    N = N/K
    counter = counter + 1

print(counter)

Solution (Python):
N, K = map(int, input().split())

COUNT = 0

while N != 0:
    N //= K
    COUNT += 1

print(COUNT)

Solution (Python):
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X % n)
    return str(X % n)

n, k = map(int, input().split())
print(len(Base_10_to_n(n, k)))

Solution (Python):
N, K = map(int, input().split())
cnt = 0


while N != 0:
  N = N//K
  cnt += 1

print(cnt)

Solution (Python):
N, K = map(int, input().split())

ans = 0
while N:
    ans += 1
    N //= K

print (ans)

Solution (Python):
n, k = map(int, input().split())
count = 0

while n != 0:
    n = n // k
    count += 1

print(count)

Solution (Python):
def f(N,K):
    if N<K:
        return 1
    return f(N//K,K)+1

N,K=map(int,input().split())
print(f(N,K))

Solution (Python):
n,k=map(int,input().split())
s=0
while n>=k:
  n=n//k
  s+=1
  
print(s+1)

Solution (Python):
n , k = map(int,input().split())

count = 1
while 1 :
  if n < k :
    break
  n = n//k
  count += 1

print(count)

Solution (Python):
N,K = map(int,input().split())

ans = 1
while(N>=K):
    N = N // K
    ans+=1
print(ans)

Solution (Python):
N, K = map(int, input().split())
i = 0

while True:
  if K**i > N:
    print(i)
    exit()
  i += 1

Solution (Python):
N, K = map(int, input().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

print(len(Base_10_to_n(N, K)))

Solution (Python):
n,k=map(int,input().split())
count=1
while n>=k:
  n=n/k
  count+=1
print(count)

Solution (Python):
n, k = map(int, input().split())

for i in range(10**9):
    if n < k**i:
        print(i)
        exit(0)
    else:
        pass

Solution (Python):
x = list(map(int, input().split()))
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
y = Base_10_to_n(x[0], x[1])
print(len(str(y)))

Solution (Python):
n,k = map(int,input().split())
def convert(n,k):
    result = ""
    while n>0:
        result = str(n%k)+result
        n //= k
    return len(str(result))
print(convert(n,k))

Solution (Python):
N,K=map(int,input().split())
count=0
while(N>0):
    N//=K
    count+=1
print(count)

Solution (Python):
counter = 0
n, k = map(int, input().split())
for i in range(100):
  if k ** i <= n:
    counter = i + 1
  else:
    break
print(counter)

Solution (Python):
n,k=map(int,input().split())
ans=0
while n!=0:
  n=n//k
  ans+=1
print(ans)

Solution (Python):
n, k = map(int, input().split())
ans = 0
while n > 0:
    n = int(n / k)
    ans += 1
print(ans)

Solution (Python):
n, k = map(int,input().split())

cnt = 0
tmp = n
while tmp != 0:
    tmp //= k
    cnt += 1

print(cnt)

Solution (Python):
n, k = map(int, input().split())

def base_y(x, y):
    if int(x/y) > 0:
        return base_y(int(x/y), y) + str(x%y)
    return str(x%y)
         
print(len(base_y(n, k)))

Solution (Python):
N, K = map(int, input().split())

def to_n(X, n):
    if (int(X/n)):
        return to_n(int(X/n), n)+str(X % n)
    return str(X % n)


print(len(to_n(N, K)))

Solution (Python):
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+str(X%n)
  return str(X%n)

N, K = map(int, input().split())
print(len(Base_10_to_n(N, K)))

Solution (Python):

import math

n,k=map(int,input().split())
print(int(math.log(n,k))+1)

Solution (Python):
N, K = map(int, input().split())

count = 1
while N >= K:
    N = N // K
    count += 1

print(count)

Solution (Python):
N,K = map(int,input().split())
digits = 0
while (N>0):
  N = N//K
  digits += 1
print(digits)

Solution (Python):
n,k = map(int,input().split())
count = 1
a = k
while n >= a:
    count += 1
    a = a * k
print(count)

Solution (Python):
N, K = map(int, input().split())

judge = False
i = 0
while judge == False:
  if K**i <= N and N < K**(i+1):
    judge == True
    print(i+1)
    exit()
  else:
    i+=1

Solution (Python):
N,K = map(int,input().split())
i = 0
t = 1
while t <= N:
  t = t*K
  i = i+1
print(i)

Solution (Python):
n, k = list(map(int, input().split()))

i = 0
x = 1
while n >= x:
    x *= k
    i += 1

print(i)

Solution (Python):
n, k = map(int, input().split())
def digits(N, K):
    if (int(N/K)):
        return digits(int(N/K), K) + str(N%K)
    return str(N%K)
print(len(digits(n, k)))

Solution (Python):
n,m=map(int,input().split())
from math import log
print(int(log(n)/log(m))+1)

Solution (Python):
N,K=map(int,input().split())
li=[]
A=True
while A==True:
    S=N%K
    N=(N-S)//K
    if N==0:
        break
    li.append(S)
li.append(S)
li=li[::-1]

print(len(li))

Solution (Python):
N,K = map(int,input().split())
ans = 0
while N > 0:
    ans += 1
    N //= K
print(ans)

Solution (Python):
N,K=map(int,input().split())
i=0
while True:
  if pow(K,i) > N:
    break
  i+=1
print(i)

Solution (Python):
N, K = map(int, input().split())
r = 0
n = N
while n > 0:
  r += 1
  n = n//K
print(r)

Solution (Python):
import math
def main():
    N,K = map(int, input().split())
    ans = 1 if N==1 else math.ceil(math.log(N,K))
    print(ans)

main()

Solution (Python):
def main():
    n, k = list(map(int, input().split()))
    c = 0
    while n != 0:
        n //= k
        c += 1
    print(c)

if __name__ == '__main__':
    main()

Solution (Python):
N, K = map(int, input().split())
ans = 0

while N > 0:
    ans += 1
    N //= K

print(ans)

Solution (Python):
N, K = map(int, input().split())
digits = 0
while(N > 0):
    N = N//K
    digits = digits+1
print(digits)

Solution (Python):


n, k = map(int, input().split())

counter = 0
while True:
    n = n // k 

    counter += 1
    if n == 0:
        print(counter)
        break

Solution (Python):
import sys

def ISI(): return map(int, sys.stdin.readline().rstrip().split())

n, k = ISI()
i = 0
val=1
while(val<=n):
	val*=k
	i+=1
print(i)

Solution (Python):
N, K = map(int, input().split())
digits = 0
while(N > 0):
    N = N//K
    digits = digits+1
print(digits)

Solution (Python):
def resolve():
    n,k=map(int,input().split())
    order=1
    while not(k**(order-1)<= n < k**(order)):
        order+=1
    print(order)
resolve()

Solution (Python):
n, k = map(int, input().split())

count = 0
while n != 0:
    
    div, mod = divmod(n, k)
    
    n = div
    
    count += 1
    
print(count)

Solution (Python):
import math

N, K = map(int, input().split())

print(math.floor(math.log(N, K)+1))

Solution (Python):
N, K = map(int, input().split())
a = []
while N != 0:
  div = divmod(N, K)
  N = div[0]
  a.append(div[1])

print(len(a))

Solution (Python):
n, k = map(int, input().split())
zzz = 0

while True:
    if k ** zzz > n:
        maxkun = zzz
        break
    zzz += 1

print(maxkun)

Solution (Python):
N, K = map(int, input().split())
for i in range(10000):
	if N//(K**i) >= K:
	  	continue
	else:
  		print(i+1)
  		exit(0)

Solution (Python):
n,k = map(int,input().split())
ans = 0
while n > 0:
    n = n//k
    ans += 1
print(ans)