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

Solution (Python):


iim = lambda: map(int, input().rstrip().split())

def resolve():
    N, K = iim()
    i = 0
    while N:
        N //= K
        i += 1
    print(i)

if __name__ == "__main__":
    resolve()

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

ans=0
for i in range(10**12):
  if n<k**i:
    ans=i-1
    break
print(ans+1)

Solution (Python):
import sys
import math
import collections

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



p = 1
while (True):
  q = k ** p
  if q > n:
    print(p)
    break
  p += 1

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

Solution (Python):
import numpy as np

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

logK_N = np.log2(N) / np.log2(K)
print(int(logK_N) + 1)

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

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

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

digit = 0

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

print(digit)

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

Solution (Python):
import sys

def base_convert(n, b):
    res = ''
    q = n
    while q:
        q, r = divmod(q, b)
        if r < 0: 
            q += 1
            r -= b
        res = str(r) + res

    return int(res) if res else 0

n, k = map(int, sys.stdin.readline().split())

def main():
    return len(str(base_convert(n, k)))

if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

import string

numbers = "0123456789"
alphabets = string.ascii_letters 
characters = numbers + alphabets

def base_cvt(value, n=2):
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)

    if n < 2 or n > len(characters):
        raise ValueError('Invalid n:', value)

    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result

print(len(base_cvt(N, K)))

Solution (Python):
def I(): return int(input())
def MI(): return map(int, input().split())
def LMI(): return list(map(int, input().split()))


N, K = MI()
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):
n,k = map(int,input().split())

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

print(i)

Solution (Python):


from collections import deque, defaultdict
import itertools as ite
import sys
import math
from decimal import *

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int, K: int):
    def f(x: int, k: int):
        if x < k:
            return 1
        
        return 1+f(x//k, k)

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
n, k = map(int, input().split())
ans = ""
while True:
    ans = ans+str(n % k)
    n = n//k
    if n == 0:
        break
print(len(ans))

Solution (Python):
import sys
input=sys.stdin.readline
n,k=map(int,input().split())
ans=1
while n>=k:
    n=(n-n%k)//k
    ans+=1
print(ans)

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)

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


from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


yn = 'YNeos'
ynflg = False
cnt = 0
ans = None

def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas



N, K = mulinputs()






print(floor(log2(N)/log2(K))+1)

Solution (Python):

import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

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


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

count = 1

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

print(count)

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

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

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

	if N == 0:
		break

print(ans)

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

def Base10toN(x, n):
    if x//n > 0:
        return Base10toN(x//n, n) + str(x%n)
    return str(x%n)

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

Solution (Python):
N, K = [int(i) for i in input().split()]
c = 0
while N > 0:
  c += 1
  N = N //K
print(c)

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

def nsinho(x, N):
    ans = ''
    while x > 0:
        ans = ans+str(x%N)
        x = x//N
    return int(ans[::-1])

print(len(str(nsinho(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())
ans = 1
while k**ans<=n:
    ans +=1
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 = list(map(int, input().split()))
import math
print(int(math.log(n,k)+1))

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

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

print(res)

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

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

Solution (Python):

import sys


def solve(N: int, K: int):
    ans = 0
    while N > 0:
        N = N // K
        ans += 1
    print(ans)
    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 = map(int,input().split())
a = []
while 1:
    a.append(str(N%K))
    N//=K
    if N==0:break
print(len(a))

Solution (Python):
from math import log, ceil


N, K = [int(i) for i in input().split()]
print(max(1, ceil(log(N, K))))

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

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

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

Solution (Python):
import sys
import math
import itertools
from collections import deque
import copy
import bisect

MOD = 10 ** 9 + 7
INF = 10 ** 18 + 7
input = lambda: sys.stdin.readline().strip()

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

Solution (Python):
from math import log, ceil
n, k = map(int, input().split())
print(max(1, ceil(log(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):
N,K = list(map(int,input().split()))
a = 1
for i in range (1000000000):
    N = N//K
    if N == 0:
        print(a)
        break
    else:
        a = a + 1

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())
Atai = K
Ans = 1

while N >= Atai:
  Atai = Atai * K
  Ans = Ans + 1

print(Ans)

Solution (Python):
N,K = map(int,input().split())
ans = 1
for _ in range(40):
    N = N // K
    if N == 0:
        break
    ans += 1
print(ans)

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

ans = 0

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

print(ans)

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

count = 1
while True:
  n //= k
  if n == 0:
    break
  
  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)

 

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



if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
import heapq
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,K = IL()

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

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

Solution (Python):
def nbase(value,n):
    nbasevalue = 0
    digit = 0
    while value > 0:
        nbasevalue += (value%n)*(10**digit)
        value //= n
        digit += 1
    return nbasevalue

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

ans = nbase(N,K)
print(len(str(ans)))

Solution (Python):
def main():

    N, K = map(int, input().split())
    ans = 0
    while N > 0:
        v = N % K
        N = N//K
        ans += 1
    return ans

if __name__ == '__main__':
    print(main())

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

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)

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

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

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

print(ans)

Solution (Python):
NN = 2020202
MOD = 10**9+7
INF = float("inf")

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

print(count)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

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

    print(ans)


if __name__ == '__main__':
    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())

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

Solution (Python):
import string

N,K = list(map(int,input().split()))
numbers = "0123456789"
alphabets = string.ascii_letters
characters = numbers + alphabets

def base_cvt(value, n=2):
    tmp = int(value)  
    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result

print(len(str(base_cvt(N,K))))

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

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

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

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(input()) 
def ifn(): return float(input()) 
def isn(): return input().split() 
def imn(): return map(int, input().split()) 
def fmn(): return map(float, input().split()) 
def iln(): return list(map(int, input().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, input().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD

N,K = imn()

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

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

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

Solution (Python):


from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    n,k = mi()
    cnt = 0
    while n:
        n//=k
        cnt+=1
    print(cnt)



main()

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

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 = map(int, input().split())

x = Base_10_to_n(N, K)

print(len(str(x)))

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

Solution (Python):
N,K = [int(i) for i in input().split()]
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)
k = base10to(N,K)
print(len(k))

Solution (Python):
import math 
  


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

a, b = [int(i) for i in input().split()]

print(findNumberOfDigits(a,b))

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

N, K = map(int, readline().split())
res = 1
while N >= K:
    N //= K
    res += 1
print(res)

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

if N == 0:
	S = "0"
else:
	S = ""
	while N > 0:
		S = str(N % K) + S
		N = N // K

print(len(S))

Solution (Python):
import math
[n,k] = [int(i) for i in input().split()]
if k ** math.log(n,k) == n:
    print(math.ceil(math.log(n,k)) +1)
else:
    print(math.ceil(math.log(n,k)))

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

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

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

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

def dec_to_n(N, n):
    if N == 0:
        return "0"
    digits = []
    base = 1
    while N != 0:
        if N % (base * n) == 0:
            digits.append('0')
        else:
            digits.append(str(N % (base * n) // base))
            N -= N % (base * n)
        base *= n
    return "".join(digits[::-1])

n = dec_to_n(N, K)
print(len(n))

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

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

now = 1
ind = 0

while True:
    now *= K
    ind += 1

    if now > N:
        print (ind)
        sys.exit()

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

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


def func(n, k):
    cnt = 0
    while n > 0:
        n = n // k
        cnt += 1
    return cnt


print(func(N, K))

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

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

k = 0
p = 1
while True:
    if N < p:
        break
    k += 1
    p *= K

print(k)

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

cnt = 0

while(N >= 1):
        N //= K
        cnt += 1

print(cnt)

Solution (Python):
a,b = map(int,input().split())
x = ""
while a > 0:
  x += str(a%b)
  a = a//b
  
print(len(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())

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

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

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

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

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

print(digit)

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

Solution (Python):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n,k  = i2()
def B(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(B(n,k)))

Solution (Python):

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29

DIV = (10**9) + 7

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)

def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max,mod=DIV):
    fac,finv,inv = [0]*max, [0]*max, [0]*max
    fac[0]=fac[1]=1
    finv[0]=finv[1]=1
    inv[1]=1
    for i in range(2,max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod -inv[mod%i] * (mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod
    class CONV:
        def __init__(self):
            pass
        def ncr(self,n,k):
            if(n<k):
                return 0
            if(n<0 or k<0 ):
                return 0
            return fac[n]*(finv[k]*finv[n-k]%mod)%mod
    return CONV()


def main():
    N,K = isRaw()
    ans = 1
    while N !=0:
        N = N//K
        if N==0:
            return ans
        ans+=1
    return ans
    


if __name__ == "__main__":
    print(main())

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

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

if __name__ == '__main__':
    main()

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

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

print(answer)

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

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

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

x=0

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

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())
from math import log, ceil
print(ceil(log(n, k)) if not n==1 else 1)

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

count = 0

while a != 0:
    a = a // b
    count += 1

print(count)

Solution (Python):
from sys import stdin
import math
def input():
	return stdin.readline()[:-1]

def intput():
	return int(input().rstrip())

def sinput():
	return input().rstrip().split()

def intsput():
	return map(int, sinput())

def main():
	n, k = intsput()
	for i in range(1,100):
		if k**i>n:
			print(i)
			return

if __name__ == '__main__':
	main()

Solution (Python):

import sys


def solve(N: int, K: int):
    answer = 1
    while True:
        if K**(answer-1) <= N < K**answer:
            break
        answer += 1
    print(answer)
    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):
import numpy as np
n, k = map(int, input().split())
print(int(np.log(n) / np.log(k)) + 1)

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

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

ans = 0

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

print(ans)

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
count = 0
a, b = MAP()
while 1:

    a = a // b
    count += 1
    if a == 0:
        print(count)
        exit()

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

Solution (Python):
N, K = map(int, input().split())
ans = []
while N > 0:
    ans.append(N%K)
    N = N // K 
print(len(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
print(len(str(Base_10_to_n(n,k))))

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

print(keta)

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

count = 1

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

print(count)

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

while a > 0:
    c += 1
    a //= b

print(c)

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

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

Solution (Python):

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

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


n,k = m()

co = 0

while n:
    co += 1
    n //= k

print(co)

Solution (Python):
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

n, k = na()

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

Solution (Python):
import sys
input = sys.stdin.readline
def shinsu(n,k):
    if n==0:
        return 0
    bi=''
    while n!=0:
        r=n%abs(k)
        n=(n-r)//k
        bi+=str(r)
    return (bi[::-1])
n,k=map(int,input().split())
s=shinsu(n,k)
print(len(s))

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

x2 = Base_10_to_n(n, k)

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

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

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

print(ans)

Solution (Python):
def DecimalNumber(n, k):  
    bi = ''
    while n != 0:
        bi += str(n % abs(k))
        if k < 0:
            n = -(-n // k)
        else:
            n = n // k
    return bi[::-1]


def resolve():
    n, k = map(int, input().split())
    print(len(DecimalNumber(n, k)))


if __name__ == '__main__':
    resolve()

Solution (Python):
import sys
import math
n, k = [int(i) for i in sys.stdin.readline().split()]
print(math.floor(math.log(n, k)) + 1)

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

ans = 1
num = 1
while(1):
    num *= K
    if num > N:
        break
    ans += 1

print(ans)

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