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().strip().split())

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


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, readline().split())
print(len(Base_10_to_n(n, k)))

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())
import math
print(int(math.log(n,k))+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)

if k!=10:
    print(len(Base_10_to_n(n,k)))
else:
    print(len(str(n)))

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

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

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())
import math
print(int(math.log(n,k)+1))

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

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())
a = 1
while K**a <= N:
  a = a + 1
print(a)

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())
result=""
while N>0:
    result=str(N%K)+result
    N//=K
print(len(result))

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

Solution (Python):


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

a = K
i = 1

while N>=a:
  a *= K
  i += 1

print(i)

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

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 sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, K = MAP()

for i in range(36):
  if N < K**i:
    print(i)
    break

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

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


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

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

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, k = list(map(int, readline().split()))
    for i in range(10 ** 10):
        if n < k ** i:
            print(i)
            exit()


if __name__ == '__main__':
    solve()

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())
ans = 1
while N >= K:
    N = N // K
    ans += 1
print(ans)

Solution (Python):
N,K=[int(i) for i in input().split()] 

i = 1

while N > K - 1:
  N = N // K
  i += 1

print(i)

Solution (Python):
n,k=map(int,input().split())
x=1000
l=0
while x>0:
  if l==0:
    x=n//k
    l+=1
  else:
    x=x//k
    l+=1
print(str(l))

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

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

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

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

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

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

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

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

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

for i in range(31):
    if N < K ** i:
        print(i)
        break

Solution (Python):
N, K = list(map(int, input().split()))
for n in range(1000):
    if K ** n > N:
        print(n)
        break

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

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

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

Solution (Python):
import math
[N,K]=[int(item)for item in input().split()]

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

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

ans = 0
for i in range(10**100):
    if K**i  <= N:
        i = i + 1
    else:
        ans = i
        break
        
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())
n = N
cnt = 0
while True:
    n = n // K
    cnt += 1
    if n == 0:
        break
print(cnt)

Solution (Python):

import math

n, k = map(int, input().split())
print(math.floor(math.log2(n)/math.log2(k))+1)

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

ans = ''
while N > 0:
    ans = str(N%K) + ans
    N = N//K

print(len(ans))

Solution (Python):
n,k=map(int,input().split())
bi=''
while n!=0:
    bi+=str(n%abs(k))
    if k<0:n=-(-n//k)
    else:n=n//k
print(len(bi))

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

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

Solution (Python):
n, k = map(int, input().split())
for i in range(0, 50):
    if n // (k**i) >= 1:
        continue
    else:
        print(i)
        break

Solution (Python):


N, K = map(int, input().split(" "))
i = 0

while (N > 0):
  i = i + 1
  q, mod = divmod(N, K)
  N = q

print(i)

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

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

print(i)

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

N = a[0]
K = a[1]
count = 1
while 1:
    if N <= (K**count-1):
        print(count)
        break
    count += 1

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

Solution (Python):
N, K = map(int,input().split())
count = 1
while(True):
    if N < K**count:
        print(count)
        break
    count += 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())
i = 0
while True:
    if n < k**i:
        print(i)
        break
    else:
        i+=1

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

num = []
while not N < K:
  num.append(N % K)
  N = N // K
num.append(N)

print(len(num))

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

Solution (Python):
n,k=[int(i) for i in input().split()]
ans=0
while n:
    n=n//k
    ans+=1
    
print(ans)

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

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())
nk = Base_10_to_n(n,k)
print(len(nk))

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

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

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

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


ans = 0

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

Solution (Python):

sel='B'

if sel=='B':
    N,K=map(int,input().split())
    cnt=0
    while N>0:
        N//=K
        cnt+=1
    print(cnt)


if sel=='C':
    def ceilT(a,b): 
        return (a+b-1)//b

    N=int(input())
    X=[int(i) for i in input().split()]
    p=ceilT(sum(X),N)
    ans=sum((x-p)**2 for x in X)
    p-=1
    ans=min(ans,sum((x-p)**2 for x in X))
    print(ans)

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())
for i in range(35):
  if K**(i) <= N and N < K**(i+1):
    print(i+1)
    exit()

Solution (Python):
inputted = list(map(int, input().split()))
N = inputted[0]
K = inputted[1]

digits = 0
temp = N
while True:
    digits += 1
    temp = int(temp / K)
    if temp == 0: break

print(digits)

Solution (Python):

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

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

print(i)

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

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

res = 1

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

print(res)

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

Solution (Python):
N,K = map(int,input().split())
if N == 0 or N == 1:
    print(1)
for i in range(1,100):
    if K**i <= N < K**(i+1):
        print(i+1)
        break

Solution (Python):
a, b = (int(i) for i in input().split());
 
res = 0;
 
while a > 0:
    res += 1;
    a //= b;
 
print(res);

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:
        ans = i
        break

print(ans)

Solution (Python):
N,K=map(int,input().split())
x=[]
while True:
    if N>=K:
        x.append(N%K)
        N=int(N/K)
    else:
        x.append(N)
        break
x.reverse()
print(len(x))

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

from math import log, ceil, floor

def solve(dec, base):
    count = 0
    exp = floor(log(dec, base))
    return exp + 1



    

print(solve(N, BASE))

Solution (Python):
N,K = map(int,input().split())
A=[]
while N >= K:
    r = N % K
    A.append(r)
    N = N // K
if N != 0:
    print(len(A)+1)
else:
    print(len(A))

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

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

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

if n==1:
  print(1)
  exit()
  
print(int(math.ceil(math.log(n,k))))

Solution (Python):




import sys


sys.setrecursionlimit(1000000)

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


x = str(Base_10_to_n(N, K))
print(len(x))

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

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

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

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

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

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

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

for i in range(1, 1000000000):
    n = n // k
    if n == 0:
        print(i)
        break

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


def base_10_to(n, b):
    if int(n / b):
        return base_10_to(int(n / b), b) + str(n % b)
    return str(n % b)


print(len(base_10_to(N, K)))

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

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

Solution (Python):
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n,k=n1()

c=1
while True:
    if n<k**c:
        print(c)
        break
    else:
        c+=1

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

s=0
count=0
while N>=1:
	s+=(N%K)*(10**count)
	N=N//K
	count+=1

print(len(str(s)))

Solution (Python):
import math

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


c=math.log(N,K)

if c == round(c):
	print(int(c)+1)
else:
	print(int(c//1+1))

Solution (Python):
N,D=[int(s) for s in input().split()]
d=1
n=D
while n<=N:
  d+=1
  n*=D
print(d)

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

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

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

cnt = 1
i = 0
while True:
    if r**i > n:
        if i != 0:
            cnt -= 1
        break
    else:
        cnt += 1
        i += 1

print(cnt)

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

i=0

while k**i<=n:
  i+=1

result=""
while i>=0:
  result=result+str(n//k**i)
  n=n-(n//k**i)*k**i
  i=i-1

  
  
print(len(str(int(result))))

Solution (Python):
import math

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

count = 0
val = math.floor(N/K)
while val > 0:
    val=math.floor(val/K)
    count += 1

print(count+1)

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

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

Solution (Python):
inp=list(map(int,input().strip().split()))[:2]
n,r=inp[0],inp[1]
count=0
while(n > 0):
    n=n//r
    count+=1
print(count)

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

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

Solution (Python):
n, k = (int(i) for i in input().split());

res = 0;

while n > 0:
    res += 1;
    n //= k;

print(res);

Solution (Python):
base = input().split()
n = int(base[0])
k = int(base[1])
ans = []
lenx = 1
while k**lenx<=n:
    ans.append(1)
    lenx += 1
print(len(ans)+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())
cnt = 0
while n > 0:
    n = int(n/k)
    cnt += 1
print(cnt)

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

aa = []
while N > 0:
    
    
    aa.append(N % K)
    N = N // K

aa = list(reversed(aa))

print(len(aa))

Solution (Python):
n, k = [int(x) for x in input().split()]

ans = 1

while True:
    if n < k:
        break
    else:
        n = n // k
        ans += 1

print(ans)

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

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):
p,q= input().split()
a,b =(int(p), int(q))
ans= 0
for i in range(a + 1):
    rank = a / (b ** i)
    if  rank < 1:
        print(i)
        break

Solution (Python):
def convert(N, K):
  if N // K:
    return convert(N//K, K) + str(N % K)
  else:
    return str(N % K)

print(len(convert(*list(map(int, input().split())))))

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

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  n,k = map(int,input().split())
  cnt = 1
  while n//k != 0:
    cnt += 1
    n //= k
  print(cnt)
if __name__ == '__main__':
  main()

Solution (Python):
import sys
import math

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

tmp = 1
times = 0
while n > tmp-1:
    tmp *= k
    times += 1

print(times)

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

d = 1

while True:
  if n >= k ** d:
    d += 1
  else:
    print(d)
    exit()

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

d = 1

while True:
  if n >= k ** d:
    d += 1
  else:
    print(d)
    exit()

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

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

order=0
digit=0

while( N>=K**order ):
    digit += 1
    order += 1
print(digit)

Solution (Python):

from collections import Counter
def inputlist(): return [int(j) for j in input().split()]

def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)
N,K = inputlist()
print(len(base10to(N,K)))

Solution (Python):
n,k = map(int,input().split())
f = 0
for i in range(31,-1,-1):
    p,q = divmod(n,k**i)
    if p!= 0:
        break
    n = q
print(i+1)

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

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

print(count)

Solution (Python):
N,K = list(map(int,input().split()))
n=0
while 1==1:
    n += 1
    if K**(n-1) <= N < K**n:
        break
print(n)

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

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

print(count)

Solution (Python):
N,K = list(map(int,input().split()))
n=0
while 1==1:
    n += 1
    if K**(n-1) <= N < K**n:
        break
print(n)

Solution (Python):
n,k=map(int,input().split())
for i in range(100):
  if n<k**i:
    print(i)
    exit()

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

Solution (Python):
NK = list(map(int, input().split()))
N = NK[0]
K = NK[1]

a = 0
while pow(K, a) <= N :
  a += 1
  
print(a)

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

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import math
import itertools
import string
import queue
import copy
import time

from fractions import gcd

sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7


def inp(): return int(sys.stdin.readline())


def inp_list(): return list(map(int, sys.stdin.readline().split()))


def lcm(x, y): return (x * y) // gcd(x, y)


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 = inp_list()
n_base_k = base_10_to_n(N, K)
print(len(n_base_k))

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

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

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

def digit(n, k, d):
    if n // (k ** d) > 0:
        d += 1
        return digit(n, k, d)
    else:
        return d
      
print(digit(n, k, 1))

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

i = 1
j = k

while n >= j:
    i += 1
    j *= k

print(i)

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

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

while(n is not 0):
    n = int(n / k)
    cnt = cnt + 1

print(cnt)

Solution (Python):
if __name__ == '__main__':
	N, K = map(int, input().split())

	c = 0
	ans = 0

	while(c < N):
		c = (c+1) * K - 1
		ans += 1

	print(ans)

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

Solution (Python):
n,k=map(int,input().split())
c=1
s=n
for i in range(n):
  if s<k:
    break
  else:
    c+=1
    s=s//k
  
print(c)

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

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

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

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

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

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

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)


a = Base_10_to_n(n, k)

print(len(a))

"""


x10 = 35
x2 = Base_10_to_n(x10, 2)
print( x2 )



"""

Solution (Python):
import numpy as np
n , k = map(int,input().strip().split())
n = np.base_repr(n, base=k)
print(len(n))

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

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

def change_base(n, k):
    if int(n/k):
        return change_base(int(n/k), k)+str(n%k)
    return str(n%k)

print(len(change_base(n, k)))

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

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

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

x = n
judge = True
cnt = 0
while True:
    if x < k:
        break
    x = x // k
    cnt += 1
cnt += 1
print(cnt)

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

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

for i in range(1, 100):
    if N >= K ** (i - 1) and N < K ** i:
        print(i)
        break

Solution (Python):
n, k = [int(i) for i in input().split()]
i = 1
while(n >= k):
    n = n // k
    i += 1

print(i)

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 > 0:
    N //= K
    ans += 1
print(ans)

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())
cnt = 0
while n >= 1:
    n /= k
    cnt += 1
print(cnt)

Solution (Python):
n, k = map(int, input().split())
for i in range(30, -1, -1):
    if n >= k**i:
        print(i + 1)
        break

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

i = 0
while n >= pow(k, i):
    i += 1

print(i)

Solution (Python):
import math

n, k = map(int, input().split())
if n == 1:
  print(1)
else:
  x = int( math.ceil( math.log( n , k )))
  print(x)

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

ans = 0
flag = True
while flag:
    if N // (K**ans) < 1:
        flag = False
    else:
        ans += 1
print(ans)

Solution (Python):
n, k = [int(i) for i in input().split()]

cnt = 0
while(n / k != 0):
  cnt += 1
  n //= k
  
print(cnt)

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

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

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

Solution (Python):
n, k = [int(i) for i in input().split()]

for i in range(100):
  if n < pow(k, i):
    print(i)
    break

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

    for i in range(100):
        if k ** i <= n:
            continue
        else:
            print(i)
            return


if __name__ == '__main__':
    main()

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 >= 1:
    n = n // k
    ans += 1

print(ans)

Solution (Python):

N, K = [int(s) for s in input().split()]

def check_digits(n, k):
    if k == 10:
        return len(str(n))
    
    count = 0
    while n > 0:
        n //= k
        
        count += 1
    return count

print(check_digits(N, K))

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

ans = 0
flag = True
while flag:
  if n // (k**ans) < 1:
    flag = False
  else:
    ans += 1
print(ans)

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

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

print(ans)

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,k = iim()
ans = 0
while k**ans <= n:
    ans += 1

print(ans)

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

ans = 1
while True:
  if K**ans-1 >= N:
    break
  else:
    ans += 1

print(ans)

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

Solution (Python):
N, K = map(int, input().split())
for i in range(10**19):
    if K**i <= N and K**(i+1) > N:
        print(i+1)
        break

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

i = 0
while K ** i <= N:
    ans = i + 1
    i += 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):
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())
digits = []
while N > 0:
    digits.append(N % K)
    N = N // K

print(len(digits))

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())
A = 0
cnt = -1
if N <= K-1:
    print(1)
else:
    while N > A:
        cnt += 1
        A = K**(cnt+1)-1
    print(cnt+1)

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

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

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

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

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

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

Solution (Python):
a,b=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)
  
x = Base_10_to_n(a, b)

print(len(x))

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

print(s)

Solution (Python):
N,K=[int(s) for s in input().split()]

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

Solution (Python):
import math

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

ketasuu = 1

while N >= K:
    N = math.floor(N / K)
    ketasuu += 1

print(ketasuu)

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())
count = 0
while N != 0:
  N //= K 
  count += 1

print(count)

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

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

print(i)

Solution (Python):
N,K=map(int,input().split())
i=0
while N>=K**(i+1):
    i+=1
print(i+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())

c=0

while(1):
  n=int(n/k)
  c+=1
  if n==0:
    break

print(c)

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

list = []

if N==1:
    print(1)
else:
    for i in range(100000000):
        list.append(N % K)
        N = N / K
        i = i + 1
        if N < K:
            print(i + 1)
            break

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

Solution (Python):

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

Solution (Python):

N, K = input().split()
n = int(N)
k = int(K)

ans = 0

for i in range(0,31):
    x = k**i
    if n < x:
        print(ans)
        break
    else:
        ans += 1

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

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

Solution (Python):


def To_Base_number(x, n):
    ret = []
    while x > 0:
        ret.insert(0, x % n)
        x = x // n
    return ''.join(map(str, ret))


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

Solution (Python):
n, k = [int(i) for i in input().split(" ")]

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

print(count)

Solution (Python):

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

 


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

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

cnt = 1
while(True):
    if N // (K**cnt) < 1:
        break
    cnt += 1
print(cnt)

Solution (Python):

N,K = map(int,input().split())
for i in range(N):
    if K**i <= N< K**(i+1):
        print(i+1)
        break
    else:
        pass

Solution (Python):









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

digits = int(1)

for digit in range(1, 30):  
    if k ** digit <= n:
        digits = digits + 1
    else:
        break

print(digits)