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

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

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

amari = []

while n != 0:
    amari.append(n%k)
    n = n // k

print(len(amari))

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

Solution (Python):
import math
N,K = map(int,input().split())
Ans = (int(math.log(N,K)) +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())
digit = 0

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

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

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

Solution (Python):
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]

def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]

def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)

MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)

N, K = MI()
ans = 0

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

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

ans = 0
for i in range(31):
    if k ** i > n:
        ans = i
        break
if ans == 0:
    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())
ans = 0

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

print(ans)

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

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

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





i = 1
now = k
while True:
    if n < now:
        print(i)
        break
    i += 1
    now *= 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 = list(map(int,input().split()))
cnt=0
while n>0:
    n=n//k
    cnt+=1

print(cnt)

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

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

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

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

import math

n,k=nm()

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

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

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


res = 0

while (K**res <= N):
    res += 1

print(res)

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

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

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

Solution (Python):
import sys
import math
from collections import deque
from collections import defaultdict

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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    ans = []
    while n > 0:
        ans.insert(0, n % k)
        n = n // k
    print(len(ans))


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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

def div(a,b):
    cnt = 0
    k = b
    while(True):
        if(a<k):
            break
        k *= b
        cnt += 1
    return cnt

ans = div(n,k) + 1
print(ans)

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

count = 0

while True:
    temp = K**count
    if temp > N:
        break
    count += 1

print(count)

Solution (Python):
def digit(n, k):
    buff = n
    x = ''
    while buff > 0:
        x = str(buff % k) + x
        buff = int(buff / k)
    return x


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

ans = digit(n, k)
print(len(ans))

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n,k=map(int,stdin.readline().split())
curr=1
ans=0
while(curr<=n):
    curr*=k
    ans+=1
print(ans)

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
ns = lambda: stdin.readline().rstrip()
na = lambda: list(map(int, stdin.readline().split()))


N, K = na()
d = 0

while 0 < N:
    N //= K
    d += 1

print(d)

Solution (Python):


import math
def f(n, k):
    a = math.log(n, k)
    print(math.floor(a)+1)

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

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

q, mod = divmod(N, K)
count = 1

while q > 0:
    q, mod = divmod(q, K)
    count += 1
print(count)

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

while n >= k:
    q = n // k
    n = q
    result+= 1
print(result)

Solution (Python):
n,k = map(int,input().split())
q=1
while n>=k:
    [quo,rem]=divmod(n,k)
    n=quo
    q+=1
    
print(q)

Solution (Python):
import sys
import os
import math
import bisect
import collections
import itertools
import heapq

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

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

a=0

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

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

print(i-1)

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

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

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

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

Solution (Python):

import math
n, k = map(int, input().split())
i=0
while True:
    tmp=k**i
    if tmp > n:
        break
    i += 1
print(i)

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

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

for i in range(10**10):
  if n <= k**(i+1) -1:
    print(i+1)
    exit()

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

Solution (Python):

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

Solution (Python):
n,k = map(int, raw_input().split(' '))
def f(n,k):
	count = 0
	while(n):
		n /= k
		count +=1
	return count
print f(n,k)

Solution (Python):
n,k = map(int, input().split())
ans = 0
for i in range(10**9):
    if n < k:
        ans = i+1
        break
    n = n//k

print(ans)

Solution (Python):
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter

from functools import lru_cache

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


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


n, k = inpl()
tmp = math.log(n) / math.log(k) + 1
print(int(tmp))

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


def main():
    N, K = map(int, input().split())
    answer = 1
    while N >= K:
        N //= K
        answer += 1
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
n, k = 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)

ans = Base_10_to_n(n, k)
print(len(ans))

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

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

print(c)

Solution (Python):
import sys
import math
import bisect


def main():
    n, m = map(int, input().split())
    A = []
    while n:
        A.append(n % m)
        n //= m
    if len(A) == 0:
        A.append(0)
    print(len(A))

if __name__ == "__main__":
    main()

Solution (Python):
import math 

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

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

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

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

    res = 1
    x = 1
    for i in range(100):
        if n < x:
            res = i
            break
        else:
            x *= k

    print(res)



main()

Solution (Python):
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1

n,k = readInts()

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

print(i)

Solution (Python):

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

r = 10
c = 0
while r != 0:
    r = n//k
    n = n/k
    c+=1
print(c)

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

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

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

Solution (Python):
import math

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

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

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

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

list = []

for i in range(num, -1, -1):
    n = str(N_//(K**i))
    N_ = N_ % (K**i)
    
    list.append(n)


while list[0] == "0":
    list.remove("0")

print(len(list))

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

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

a = n//k
b = n%k

ans = 1
if a==0:
    ans = ans
elif a > 0:
    while  a > 0 :
        a = a//k
        b = a%k
        ans += 1

print(ans)

Solution (Python):
n,m=map(int,input().split())
s=[]
while n>=m:
    n=n//m
    s.append(n%m)
print(len(s)+1)

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

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

A=[]
while N:
    A.append(N%K)
    N//=K
print(len(A))

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

ans = 0

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

print(ans+1)

Solution (Python):
import math

def main():
    strA = input()
    listA = strA.split(" ")

    N = int(listA[0])
    K = int(listA[1])

    x = N
    y = 0
    while(1):
        x = math.floor(x/K)

        y = y + 1
        if(x < K):
            if (x != 0):
                y = y + 1
            break

    print(y)

if __name__ == '__main__':
    main()

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

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

cnt = 0
while N >= K:
    N, _ = divmod(N, K)
    cnt += 1
print(cnt + 1)

Solution (Python):
import sys
a,b=map(int,input().split())
i=0
while True:
  if b**i>a:
    print(i)
    sys.exit()
  i+=1

Solution (Python):
import sys
a,b=map(int,input().split())
i=0
while True:
  if b**i>a:
    print(i)
    sys.exit()
  i+=1

Solution (Python):
from math import log, ceil

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

Solution (Python):
N, K = list(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
while n>0 :
    n = n//k
    a += 1
print(a)

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

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

import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n, k = MAP()
if(n==1):
    print(1)
else:
    print(ceil(log(n, k)))

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

Solution (Python):


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

for i in range(n):
  n = n // k
  if n == 0:
    print(i + 1)
    exit()

Solution (Python):
N,K  = map(int,input().split())
lis = [K**i for i in range(100)]

for i in range(len(lis)):
    if N -lis[i]< 0 and i ==0:
        print(1)
        break
    if N -lis[i] <0:
        print(i)
        break

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

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

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

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

Solution (Python):
import math
x,y = map(int ,input().split())
m = math.ceil(math.log(x, y))
if m == 0 :m=m+1
print(m)

Solution (Python):
import math

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

ans = int(math.log(N, K) + 1)

print(ans)

Solution (Python):

"""
Created on Thu May  7 21:59:58 2020

@author: shinba
"""
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())
count = 0
s = 1
if K == 10:
  n = list(str(N))
  keta = len(n)
  print(keta)
  exit()
else:
  while N >= K**count:
    count += 1
print(count)

Solution (Python):
from math import floor, log
n, k = [int(s) for s in input().split()]
print(floor(log(n, k)) + 1)

Solution (Python):
import sys

n,k=map(int,input().split())
for i in range(1,60):
    if k**(i-1)<=n<k**i:
        print(i)
        sys.exit()

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):
import math
n,k=map(int,input().split())
a=math.log(n,k)
if a!=int(a):
  print(math.ceil(a))
else:
  print(int(a+1))

Solution (Python):
from sys import stdin


def convert(n, k):
    tmp = n
    ans = ''
    while tmp > 0:
        ans += str(tmp % k)
        tmp = tmp // k
    return ans


def main():
    n, k = map(int, stdin.readline().split())
    print(len(convert(n, k)))


if __name__ == "__main__":
    main()

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

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

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

ans = 0
for i in range(31):
    if n//(k**i)==0:
        ans = i
        break
        
print(ans)

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

cnt = 0
while N != 0:
    N = (N - N%K)/K
    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())

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

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

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

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):
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())
count = 0
while True:
    if N>=(K**count):
        count += 1
    else:
        break
if N == 1:
    count = 1


print(count)

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

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

total=0
for i in range(1,100):
    if int(N/K**i)>0:
        total+=1
    else:
        print(total+1)
        break

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

ans = []
i = 0
while n > 0:
    ans.append(n%k)
    n = n//k

print(len(ans))

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

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

    N, K = map(int, input().split())
    s = []
    while True:
        n = N % K
        N //= K
        if N == 0 and n == 0:
            break
        s.append(n)
    print(len(s))


if __name__ == "__main__":
    main()

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

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






temp = 1
cnt = 0
while n > temp - 1:
    temp *= k
    
    cnt += 1
print(cnt)

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

for i in range(2**31):
    if n <= k ** i - 1:
        print(i)
        exit()

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  
def Is(): return map(int, input().split())  
def LI(): return list(map(int, input().split()))  
def TI(): return tuple(map(int, input().split()))  
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  
def LS(): return list(input())  
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

n, k = Is()

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)

s = str(Base_10_to_n(n, k))
print(len(s))

Solution (Python):

import sys


def solve(N: int, K: int):
    count = 0
    while True:
        N = N // K
        if N >= 1:
            count += 1
        else:
            break
    print (count+1)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    solve(N, K)

if __name__ == '__main__':
    main()

Solution (Python):
n, k =list(map(int, input().split()))
l = []
while True:
    l.append(n % k)
    n = n // k
    if n == 0:
        break
ans = len(l)
print(ans)

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








if k == 10:
    ans = len(str(n))
else:
    l = []
    while True:
        n = n // k
        ans += 1
        if n == 0:
            break
print(ans)

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

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 sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
n,k = [int(i) for i in readline().split()]

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

print(len(Base_10_to_k(n, k)))

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

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

result = ""
while True:
    result = str(n % k) + result
    n = (n - (n % k)) // k
    if n <= 0:
        break
print(len(result))

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

ans = 1
cou = K
while cou <= N:

    cou *= K
    ans += 1

print(ans)

Solution (Python):
def modd(x, y):
    mod(x, y)

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

Solution (Python):
N, K = [int(_) for _ in input().split()]
cnt = 0
while True:
    N = N // K
    cnt += 1
    if N == 0:
        break
print(cnt)

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 = N
x2 = Base_10_to_n(x10, K)
print( len(str(x2)) )

Solution (Python):
n, k = map(int, input().split())
ans = []
while (n):
  ans.insert(0, str(n % k))
  n //= k
print(len("".join(ans)))

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

if N<K:
  print(1)

else:
  for i in range(1,N):
    A=K**i
    if N<A*K:
      print(i+1)
      break

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

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

if N ==0 or N==1:
    print(1)
    exit()

for i in range(1,10000,1):
    if K**i <= N and N <= K**(i+1) -1:
        print(i+1)
        exit()

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

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

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

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

Solution (Python):



import math 



def findNumberOfDigits(n, base): 
	
	
	
	
	
	dig = (math.floor(math.log(n) /math.log(base)) + 1)
	return dig




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


print(findNumberOfDigits(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(1) if N == 1 else print(math.ceil((math.log(N,K))))

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

print(cnt)

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

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

Solution (Python):
N,K=map(int,input().split())
for i in range(10000):
    if N%(K**i)==N:
        print(i)
        exit(0)

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

print(solve())

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

Solution (Python):
import math
a,r=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)

ans=Base_10_to_n(a,r)
print(len(ans))

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

p = math.ceil(math.log(n,k))
if(k**p == n):p += 1
print(p)

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

i = 0

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

print(i)

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

for i in range(int(math.log2(N)+1)):
    if N >= pow(K,i) and N < pow(K,i+1):
        print(i+1)
        exit()

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

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

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

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, K = lr()
answer = 0
while N:
    N //= K
    answer += 1
print(answer)

Solution (Python):

n,k=map(int,input().split())
count=0
for i in range(10000):
    n=n/k
    count+=1
    if n<1:
        break
print(count)

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


while n>=k**i:

    i+=1

else:
    print(i)

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

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

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

digits = 1

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

print(digits)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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